|
4 | 4 | PostgrestClient, |
5 | 5 | PostgrestFilterBuilder, |
6 | 6 | PostgrestQueryBuilder, |
| 7 | + PostgrestQueryBuilderOptions, |
7 | 8 | } from '@supabase/postgrest-js' |
8 | 9 | import { |
9 | 10 | RealtimeChannel, |
@@ -182,17 +183,24 @@ export default class SupabaseClient< |
182 | 183 | from< |
183 | 184 | TableName extends string & keyof Schema['Tables'], |
184 | 185 | 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> |
186 | 190 | from<ViewName extends string & keyof Schema['Views'], View extends Schema['Views'][ViewName]>( |
187 | | - relation: ViewName |
| 191 | + relation: ViewName, |
| 192 | + options?: PostgrestQueryBuilderOptions |
188 | 193 | ): PostgrestQueryBuilder<ClientOptions, Schema, View, ViewName> |
189 | 194 | /** |
190 | 195 | * Perform a query on a table or a view. |
191 | 196 | * |
192 | 197 | * @param relation - The table or view name to query |
193 | 198 | */ |
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) |
196 | 204 | } |
197 | 205 |
|
198 | 206 | // NOTE: signatures must be kept in sync with PostgrestClient.schema |
|
0 commit comments