Skip to content

Commit 485880f

Browse files
committed
Update SupabaseClient#from function signatures to match PostgrestClient#from
1 parent f2b6733 commit 485880f

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/SupabaseClient.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
PostgrestClient,
55
PostgrestFilterBuilder,
66
PostgrestQueryBuilder,
7+
PostgrestQueryBuilderOptions,
78
} from '@supabase/postgrest-js'
89
import {
910
RealtimeChannel,
@@ -182,17 +183,24 @@ export default class SupabaseClient<
182183
from<
183184
TableName extends string & keyof Schema['Tables'],
184185
Table extends Schema['Tables'][TableName]
185-
>(relation: TableName): PostgrestQueryBuilder<ClientOptions, Schema, Table, TableName>
186+
>(
187+
relation: TableName,
188+
options?: PostgrestQueryBuilderOptions
189+
): PostgrestQueryBuilder<ClientOptions, Schema, Table, TableName>
186190
from<ViewName extends string & keyof Schema['Views'], View extends Schema['Views'][ViewName]>(
187-
relation: ViewName
191+
relation: ViewName,
192+
options?: PostgrestQueryBuilderOptions
188193
): PostgrestQueryBuilder<ClientOptions, Schema, View, ViewName>
189194
/**
190195
* Perform a query on a table or a view.
191196
*
192197
* @param relation - The table or view name to query
193198
*/
194-
from(relation: string): PostgrestQueryBuilder<ClientOptions, Schema, any> {
195-
return this.rest.from(relation)
199+
from(
200+
relation: string,
201+
options?: PostgrestQueryBuilderOptions
202+
): PostgrestQueryBuilder<ClientOptions, Schema, any> {
203+
return this.rest.from(relation, options)
196204
}
197205

198206
// NOTE: signatures must be kept in sync with PostgrestClient.schema

0 commit comments

Comments
 (0)