Open History to see the last commit
1---
2id: liveQueryWindowMatches
3title: liveQueryWindowMatches
4---
5
6```ts
7function liveQueryWindowMatches(collection, requiredLimit): boolean;
8```
9
10Defined in: [packages/db/src/live-query-window-controller.ts:107](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-window-controller.ts#L107)
11
12**`Internal`**
13
14Whether a window collection may start from its current window. An adapter
15may then start the collection, or reuse one it started, during render, as
16useLiveQuery does. That holds for exactly the requested rows from offset 0,
17whose first published rows are already correct. It also holds for an
18unbounded window, which the controller cannot narrow before its source
19request anyway. Any other window waits for the controller to adjust it when
20the subscription commits: a shifted or narrower window would publish the
21wrong rows first, and a wider finite one would request rows from an
22on-demand source that the hook does not need.
23
24 This contract is unstable while RFC #1623 is being implemented.
25
26## Parameters
27
28### collection
29
30[`Collection`](../interfaces/Collection.md)\<`any`, `any`, `any`\>
31
32### requiredLimit
33
34`number`
35
36## Returns
37
38`boolean`