Open History to see the last commit
1---
2id: LiveQueryWindowController
3title: LiveQueryWindowController
4---
5
6Defined in: [packages/db/src/live-query-window-controller.ts:552](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-controller.ts#L552)
7
8**`Internal`**
9
10This contract is unstable while RFC #1623 is being implemented.
11
12## Type Parameters
13
14### T
15
16`T` *extends* `object`
17
18### TKey
19
20`TKey` *extends* `string` \| `number`
21
22## Properties
23
24### dispose()
25
26```ts
27dispose: () => void;
28```
29
30Defined in: [packages/db/src/live-query-window-controller.ts:564](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-controller.ts#L564)
31
32#### Returns
33
34`void`
35
36***
37
38### fetchNextPage()
39
40```ts
41fetchNextPage: () => Promise<void>;
42```
43
44Defined in: [packages/db/src/live-query-window-controller.ts:560](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-controller.ts#L560)
45
46Load one more page, resolving only after that page is committed.
47
48#### Returns
49
50`Promise`\<`void`\>
51
52***
53
54### getServerSnapshot()
55
56```ts
57getServerSnapshot: () => LiveQueryWindowSnapshot<T, TKey>;
58```
59
60Defined in: [packages/db/src/live-query-window-controller.ts:557](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-controller.ts#L557)
61
62#### Returns
63
64[`LiveQueryWindowSnapshot`](LiveQueryWindowSnapshot.md)\<`T`, `TKey`\>
65
66***
67
68### getSnapshot()
69
70```ts
71getSnapshot: () => LiveQueryWindowSnapshot<T, TKey>;
72```
73
74Defined in: [packages/db/src/live-query-window-controller.ts:556](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-controller.ts#L556)
75
76#### Returns
77
78[`LiveQueryWindowSnapshot`](LiveQueryWindowSnapshot.md)\<`T`, `TKey`\>
79
80***
81
82### preload()
83
84```ts
85preload: () => Promise<void>;
86```
87
88Defined in: [packages/db/src/live-query-window-controller.ts:563](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-controller.ts#L563)
89
90#### Returns
91
92`Promise`\<`void`\>
93
94***
95
96### reset()
97
98```ts
99reset: () => Promise<void>;
100```
101
102Defined in: [packages/db/src/live-query-window-controller.ts:562](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-controller.ts#L562)
103
104Reset to the first page, resolving after the smaller window is accepted.
105
106#### Returns
107
108`Promise`\<`void`\>
109
110***
111
112### subscribe()
113
114```ts
115subscribe: (listener) => () => void;
116```
117
118Defined in: [packages/db/src/live-query-window-controller.ts:558](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-controller.ts#L558)
119
120#### Parameters
121
122##### listener
123
124() => `void`
125
126#### Returns
127
128```ts
129(): void;
130```
131
132##### Returns
133
134`void`