Skip to main content

StandardWatchedQueryOptions<RowType>

Options for Query#watch.

Extends

Type Parameters

Type Parameter
RowType

Properties

PropertyTypeDescriptionInherited from
comparator?WatchedQueryComparator<RowType[]>The underlying watched query implementation (re)evaluates the query on any SQLite table change. Providing this optional comparator can be used to filter duplicate result set emissions when the result set is unchanged. The comparator compares the previous and current result set. For an efficient comparator see ArrayComparator. Example comparator: new ArrayComparator({ compareBy: (item) => JSON.stringify(item) })-
placeholderData?RowType[]The initial data state reported while the query is loading for the first time. Default []-
reportFetching?booleanIf 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.WatchedQueryOptions.reportFetching
throttleMs?numberThe minimum interval between queries.WatchedQueryOptions.throttleMs
triggerOnTables?string[]By default, watched queries requery the database on any change to any dependent table of the query. Supplying an override here can be used to limit the tables which trigger querying the database.WatchedQueryOptions.triggerOnTables