- Core API Reference
- Collection
- createCollection
- liveQueryCollectionOptions
- createLiveQueryCollection
- createOptimisticAction
- createTransaction
- Electric DB Collection
- electricCollectionOptions
- Query DB Collection
- queryCollectionOptions
- RxDB DB Collection
- rxdbCollectionOptions
- PowerSync Collection
- powerSyncCollectionOptions
- createIndexedDB
- indexedDBCollectionOptions
- React Hooks
- useLiveQuery
HealthNode
Defined in: packages/db/src/types.ts:813
One node of a health tree. A Collection's tree is one node; a live query's has one node for itself and one for each source alias in query order. The shape is fixed by the query, and nodes without a problem are present too.
A node shows at most one problem. failureReason: something went wrong and the sync adapter is still trying, so the problem clears by itself. error: the first load failed, the sync adapter stopped, the Collection crashed, or, on a live query's own node, a request for more data failed.
Properties#
alias#
readonly alias: string;Defined in: packages/db/src/types.ts:815
The query alias, or root for the Collection the tree was read from.
collectionId#
readonly collectionId: string;Defined in: packages/db/src/types.ts:816
error#
readonly error: CollectionErrorInfo | null;Defined in: packages/db/src/types.ts:823
failureReason#
readonly failureReason: CollectionErrorInfo | null;Defined in: packages/db/src/types.ts:822
hasErrors#
readonly hasErrors: boolean;Defined in: packages/db/src/types.ts:821
This node or any node below it has a failureReason or an error.
kind#
readonly kind: "source" | "include" | "live-query";Defined in: packages/db/src/types.ts:818
include is an include's source; its rows feed per-row child Collections.
reloading#
readonly reloading: boolean;Defined in: packages/db/src/types.ts:828
A reload's new sync run is in flight: the rows, status, and problem shown are the previous run's until it commits or fails.
sources#
readonly sources: readonly HealthNode[];Defined in: packages/db/src/types.ts:829
status#
readonly status: CollectionStatus;Defined in: packages/db/src/types.ts:819