Skip to content

Commit b992324

Browse files
authored
fix: schema method should use postgres method directly (#1082)
1 parent 5e59df6 commit b992324

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

Diff for: supabase/_async/client.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,7 @@ def schema(self, schema: str) -> AsyncPostgrestClient:
129129
130130
The schema needs to be on the list of exposed schemas inside Supabase.
131131
"""
132-
if self.options.schema != schema:
133-
self.options.schema = schema
134-
if self._postgrest:
135-
self._postgrest.schema(schema)
136-
return self.postgrest
132+
return self.postgrest.schema(schema)
137133

138134
def from_(self, table_name: str) -> AsyncRequestBuilder:
139135
"""Perform a table operation.

Diff for: supabase/_sync/client.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,7 @@ def schema(self, schema: str) -> SyncPostgrestClient:
128128
129129
The schema needs to be on the list of exposed schemas inside Supabase.
130130
"""
131-
if self.options.schema != schema:
132-
self.options.schema = schema
133-
if self._postgrest:
134-
self._postgrest.schema(schema)
135-
return self.postgrest
131+
return self.postgrest.schema(schema)
136132

137133
def from_(self, table_name: str) -> SyncRequestBuilder:
138134
"""Perform a table operation.

0 commit comments

Comments
 (0)