Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions supabase/_async/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,11 @@ def schema(self, schema: str) -> AsyncPostgrestClient:

The schema needs to be on the list of exposed schemas inside Supabase.
"""
self._postgrest = self._init_postgrest_client(
rest_url=self.rest_url,
headers=self.options.headers,
schema=schema,
timeout=self.options.postgrest_client_timeout,
)
return self._postgrest
if self.options.schema != schema:
self.options.schema = schema
if self._postgrest:
self._postgrest.schema(schema)
return self.postgrest

def from_(self, table_name: str) -> AsyncRequestBuilder:
"""Perform a table operation.
Expand Down
12 changes: 5 additions & 7 deletions supabase/_sync/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,11 @@ def schema(self, schema: str) -> SyncPostgrestClient:

The schema needs to be on the list of exposed schemas inside Supabase.
"""
self._postgrest = self._init_postgrest_client(
rest_url=self.rest_url,
headers=self.options.headers,
schema=schema,
timeout=self.options.postgrest_client_timeout,
)
return self._postgrest
if self.options.schema != schema:
self.options.schema = schema
if self._postgrest:
self._postgrest.schema(schema)
return self.postgrest

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