Interface: UseQueryOpts<IS, CTX, OS>
Defined in: react/hooks.ts:361
Options for the useQuery hook.
Extends
Omit<QueryConfig<IS,OS,CTX>,"db">
Type Parameters
| Type Parameter | Default type |
|---|---|
IS extends Schema | - |
CTX extends ReadonlyJSONValue | - |
OS extends IS | IS |
Properties
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
ctx? | CTX | Optional context data passed to predicate and sort functions | Omit.ctx | repo/query.ts:146 |
id? | string | Optional unique identifier for this query | Omit.id | repo/query.ts:144 |
limit? | number | Optional maximum number of results to return | Omit.limit | repo/query.ts:148 |
predicate? | Predicate<IS, CTX> | Optional predicate function to filter items | Omit.predicate | repo/query.ts:133 |
schema? | IS | Optional schema to restrict query results to | Omit.schema | repo/query.ts:142 |
showIntermittentResults? | boolean | If true, updates UI during the initial scan. If false, waits until scanning is complete. | - | react/hooks.ts:370 |
sortBy? | SortDescriptor<OS, CTX> | keyof OS["fields"] | Optional function or field name to determine sort order of results. If a function is provided, it will be used as a custom comparator. If a field name is provided, results will be sorted by that field's values using standard comparison rules. | Omit.sortBy | repo/query.ts:138 |
sortDescending? | boolean | Optional flag that if true, flips the natural order of the sortBy | Omit.sortDescending | repo/query.ts:140 |
source | QuerySource<IS, OS> | The source repository, query or path to query from | Omit.source | repo/query.ts:131 |