File tree 2 files changed +26
-2
lines changed
2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,6 @@ def __init__(
74
74
self .auth_url = f"{ supabase_url } /auth/v1"
75
75
self .storage_url = f"{ supabase_url } /storage/v1"
76
76
self .functions_url = f"{ supabase_url } /functions/v1"
77
- self .schema = options .schema
78
77
79
78
# Instantiate clients.
80
79
self .auth = self ._init_supabase_auth_client (
@@ -110,6 +109,19 @@ def table(self, table_name: str) -> AsyncRequestBuilder:
110
109
"""
111
110
return self .from_ (table_name )
112
111
112
+ def schema (self , schema : str ) -> AsyncPostgrestClient :
113
+ """Select a schema to query or perform an function (rpc) call.
114
+
115
+ The schema needs to be on the list of exposed schemas inside Supabase.
116
+ """
117
+ self ._postgrest = self ._init_postgrest_client (
118
+ rest_url = self .rest_url ,
119
+ headers = self .options .headers ,
120
+ schema = schema ,
121
+ timeout = self .options .postgrest_client_timeout ,
122
+ )
123
+ return self ._postgrest
124
+
113
125
def from_ (self , table_name : str ) -> AsyncRequestBuilder :
114
126
"""Perform a table operation.
115
127
Original file line number Diff line number Diff line change @@ -74,7 +74,6 @@ def __init__(
74
74
self .auth_url = f"{ supabase_url } /auth/v1"
75
75
self .storage_url = f"{ supabase_url } /storage/v1"
76
76
self .functions_url = f"{ supabase_url } /functions/v1"
77
- self .schema = options .schema
78
77
79
78
# Instantiate clients.
80
79
self .auth = self ._init_supabase_auth_client (
@@ -110,6 +109,19 @@ def table(self, table_name: str) -> SyncRequestBuilder:
110
109
"""
111
110
return self .from_ (table_name )
112
111
112
+ def schema (self , schema : str ) -> SyncPostgrestClient :
113
+ """Select a schema to query or perform an function (rpc) call.
114
+
115
+ The schema needs to be on the list of exposed schemas inside Supabase.
116
+ """
117
+ self ._postgrest = self ._init_postgrest_client (
118
+ rest_url = self .rest_url ,
119
+ headers = self .options .headers ,
120
+ schema = schema ,
121
+ timeout = self .options .postgrest_client_timeout ,
122
+ )
123
+ return self ._postgrest
124
+
113
125
def from_ (self , table_name : str ) -> SyncRequestBuilder :
114
126
"""Perform a table operation.
115
127
You can’t perform that action at this time.
0 commit comments