rawTableNames? | boolean | Deprecated All tables specified in tables will be watched, including PowerSync tables with prefixes. Allows for watching any SQL table by not removing PowerSync table name prefixes | Omit.rawTableNames |
reportFetching? | boolean | If true (default) the watched query will update its state to report on the fetching state of the query. Setting to false reduces the number of state changes if the fetch status is not relevant to the consumer. | - |
rowComparator? | DifferentialWatchedQueryComparator<RowType> | Used to compare query result sets. By default the hook will requery on any dependent table change. This will emit a new hook result even if the result set has not changed. Specifying a DifferentialWatchedQueryComparator will remove emissions for unchanged result sets. Furthermore, emitted data arrays will preserve object references between result set emissions for unchanged rows. Example { rowComparator: { keyBy: (item) => item.id, compareBy: (item) => JSON.stringify(item) } } | - |
runQueryOnce? | boolean | - | - |
streams? | QuerySyncStreamOptions[] | Experimental An optional array of sync streams (with names and parameters) backing the query. When set, useQuery will subscribe to those streams (and automatically handle unsubscribing from them, too). If QuerySyncStreamOptions is set on a stream, useQuery will remain in a loading state until that stream is marked as SyncSubscriptionDescription.hasSynced. This ensures the query is not missing rows that haven't been downloaded. Note however that after an initial sync, the query will not block itself while new rows are downloading. Instead, consistent sync snapshots will be made available as they've been processed by PowerSync. Sync streams are currently in alpha. | - |
tables? | string[] | - | Omit.tables |
throttleMs? | number | The minimum interval between queries. | Omit.throttleMs |
triggerImmediate? | boolean | Emits an empty result set immediately | Omit.triggerImmediate |