Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

InjectLiveQueryResultWithCollection.md

203 lines4.4 KB

1---
2id: InjectLiveQueryResultWithCollection
3title: InjectLiveQueryResultWithCollection
4---
5​
6Defined in: [angular-db/src/index.ts:92](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L92)
7​
8Status, persistence, and health signals every `injectLiveQuery` result has.
9​
10## Extends
11​
12- [`InjectLiveQueryFlags`](InjectLiveQueryFlags.md)
13​
14## Type Parameters
15​
16### TResult
17​
18`TResult` *extends* `object` = `any`
19​
20### TKey
21​
22`TKey` *extends* `string` \| `number` = `string` \| `number`
23​
24### TUtils
25​
26`TUtils` *extends* `Record`\<`string`, `any`\> = \{
27\}
28​
29## Properties
30​
31### collection
32​
33```ts
34collection: Signal<
35 | Collection<TResult, TKey, TUtils, StandardSchemaV1<unknown, unknown>, TResult>
36| null>;
37```
38​
39Defined in: [angular-db/src/index.ts:99](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L99)
40​
41***
42​
43### data
44​
45```ts
46data: Signal<TResult[]>;
47```
48​
49Defined in: [angular-db/src/index.ts:98](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L98)
50​
51***
52​
53### health
54​
55```ts
56health: Signal<HealthNode | undefined>;
57```
58​
59Defined in: [angular-db/src/index.ts:62](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L62)
60​
61A signal containing the health tree for the query and its dependencies
62​
63#### Inherited from
64​
65[`InjectLiveQueryFlags`](InjectLiveQueryFlags.md).[`health`](InjectLiveQueryFlags.md#health)
66​
67***
68​
69### isCleanedUp
70​
71```ts
72isCleanedUp: Signal<boolean>;
73```
74​
75Defined in: [angular-db/src/index.ts:58](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L58)
76​
77A signal indicating whether the collection has been cleaned up
78​
79#### Inherited from
80​
81[`InjectLiveQueryFlags`](InjectLiveQueryFlags.md).[`isCleanedUp`](InjectLiveQueryFlags.md#iscleanedup)
82​
83***
84​
85### isCrashed
86​
87```ts
88isCrashed: Signal<boolean>;
89```
90​
91Defined in: [angular-db/src/index.ts:56](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L56)
92​
93Local storage or an invariant broke. Only a cascade cleanup and a fresh start recover.
94​
95#### Inherited from
96​
97[`InjectLiveQueryFlags`](InjectLiveQueryFlags.md).[`isCrashed`](InjectLiveQueryFlags.md#iscrashed)
98​
99***
100​
101### isIdle
102​
103```ts
104isIdle: Signal<boolean>;
105```
106​
107Defined in: [angular-db/src/index.ts:52](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L52)
108​
109A signal indicating whether the collection is idle
110​
111#### Inherited from
112​
113[`InjectLiveQueryFlags`](InjectLiveQueryFlags.md).[`isIdle`](InjectLiveQueryFlags.md#isidle)
114​
115***
116​
117### isLoading
118​
119```ts
120isLoading: Signal<boolean>;
121```
122​
123Defined in: [angular-db/src/index.ts:48](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L48)
124​
125A signal indicating whether the collection is currently loading
126​
127#### Inherited from
128​
129[`InjectLiveQueryFlags`](InjectLiveQueryFlags.md).[`isLoading`](InjectLiveQueryFlags.md#isloading)
130​
131***
132​
133### isLoadingError
134​
135```ts
136isLoadingError: Signal<boolean>;
137```
138​
139Defined in: [angular-db/src/index.ts:54](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L54)
140​
141The first load failed: there is nothing to show.
142​
143#### Inherited from
144​
145[`InjectLiveQueryFlags`](InjectLiveQueryFlags.md).[`isLoadingError`](InjectLiveQueryFlags.md#isloadingerror)
146​
147***
148​
149### isReady
150​
151```ts
152isReady: Signal<boolean>;
153```
154​
155Defined in: [angular-db/src/index.ts:50](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L50)
156​
157A signal indicating whether the collection is ready
158​
159#### Inherited from
160​
161[`InjectLiveQueryFlags`](InjectLiveQueryFlags.md).[`isReady`](InjectLiveQueryFlags.md#isready)
162​
163***
164​
165### isSyncError
166​
167```ts
168isSyncError: Signal<boolean>;
169```
170​
171Defined in: [angular-db/src/index.ts:60](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L60)
172​
173The data is shown, and a sync problem or failed request is in `health`.
174​
175#### Inherited from
176​
177[`InjectLiveQueryFlags`](InjectLiveQueryFlags.md).[`isSyncError`](InjectLiveQueryFlags.md#issyncerror)
178​
179***
180​
181### state
182​
183```ts
184state: Signal<Map<TKey, TResult>>;
185```
186​
187Defined in: [angular-db/src/index.ts:97](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L97)
188​
189***
190​
191### status
192​
193```ts
194status: Signal<CollectionStatus | "disabled">;
195```
196​
197Defined in: [angular-db/src/index.ts:46](https://github.com/TanStack/db/blob/main/packages/angular-db/src/index.ts#L46)
198​
199A signal containing the current status of the collection
200​
201#### Inherited from
202​
203[`InjectLiveQueryFlags`](InjectLiveQueryFlags.md).[`status`](InjectLiveQueryFlags.md#status)