@@ -149,11 +149,6 @@ export default class SupabaseClient<
149
149
return new SupabaseStorageClient ( this . storageUrl , this . headers , this . fetch )
150
150
}
151
151
152
- /**
153
- * Perform a table operation.
154
- *
155
- * @param table The table name to operate on.
156
- */
157
152
from <
158
153
TableName extends string & keyof Schema [ 'Tables' ] ,
159
154
Table extends Schema [ 'Tables' ] [ TableName ]
@@ -162,18 +157,35 @@ export default class SupabaseClient<
162
157
relation : ViewName
163
158
) : PostgrestQueryBuilder < Schema , View >
164
159
from ( relation : string ) : PostgrestQueryBuilder < Schema , any >
160
+ /**
161
+ * Perform a query on a table or a view.
162
+ *
163
+ * @param relation - The table or view name to query
164
+ */
165
165
from ( relation : string ) : PostgrestQueryBuilder < Schema , any > {
166
166
return this . rest . from ( relation )
167
167
}
168
168
169
169
/**
170
170
* Perform a function call.
171
171
*
172
- * @param fn The function name to call.
173
- * @param args The parameters to pass to the function call.
174
- * @param options.head When set to true, no data will be returned.
175
- * @param options.count Count algorithm to use to count rows in a table.
172
+ * @param fn - The function name to call
173
+ * @param args - The arguments to pass to the function call
174
+ * @param options - Named parameters
175
+ * @param options.head - When set to `true`, `data` will not be returned.
176
+ * Useful if you only need the count.
177
+ * @param options.count - Count algorithm to use to count rows returned by the
178
+ * function. Only applicable for [set-returning
179
+ * functions](https://www.postgresql.org/docs/current/functions-srf.html).
180
+ *
181
+ * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
182
+ * hood.
183
+ *
184
+ * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
185
+ * statistics under the hood.
176
186
*
187
+ * `"estimated"`: Uses exact count for low numbers and planned count for high
188
+ * numbers.
177
189
*/
178
190
rpc <
179
191
FunctionName extends string & keyof Schema [ 'Functions' ] ,
0 commit comments