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