Open History to see the last commit
1---
2id: LiveQueryWindowController
3title: LiveQueryWindowController
4---
5
6Defined in: [packages/db/src/live-query-window-controller.ts:514](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-controller.ts#L514)
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:525](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-controller.ts#L525)
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:521](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-controller.ts#L521)
45
46Load one more page, resolving only after that page is committed.
47
48#### Returns
49
50`Promise`\<`void`\>
51
52***
53
54### getSnapshot()
55
56```ts
57getSnapshot: () => LiveQueryWindowSnapshot<T, TKey>;
58```
59
60Defined in: [packages/db/src/live-query-window-controller.ts:518](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-controller.ts#L518)
61
62#### Returns
63
64[`LiveQueryWindowSnapshot`](LiveQueryWindowSnapshot.md)\<`T`, `TKey`\>
65
66***
67
68### preload()
69
70```ts
71preload: () => Promise<void>;
72```
73
74Defined in: [packages/db/src/live-query-window-controller.ts:524](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-controller.ts#L524)
75
76#### Returns
77
78`Promise`\<`void`\>
79
80***
81
82### reset()
83
84```ts
85reset: () => Promise<void>;
86```
87
88Defined in: [packages/db/src/live-query-window-controller.ts:523](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-controller.ts#L523)
89
90Reset to the first page, resolving after the smaller window is accepted.
91
92#### Returns
93
94`Promise`\<`void`\>
95
96***
97
98### subscribe()
99
100```ts
101subscribe: (listener) => () => void;
102```
103
104Defined in: [packages/db/src/live-query-window-controller.ts:519](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-controller.ts#L519)
105
106#### Parameters
107
108##### listener
109
110() => `void`
111
112#### Returns
113
114```ts
115(): void;
116```
117
118##### Returns
119
120`void`