Open History to see the last commit
1---
2id: getPublicCollection
3title: getPublicCollection
4---
5
6```ts
7function getPublicCollection<T>(collection): T;
8```
9
10Defined in: [packages/db/src/live-query-primitives.ts:31](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-primitives.ts#L31)
11
12The Collection an adapter hands users as `collection`. A pooled live query
13stands in for its live-query Collection and builds it only when touched.
14
15## Type Parameters
16
17### T
18
19`T` *extends*
20 \| [`Collection`](../interfaces/Collection.md)\<`any`, `any`, `any`, `StandardSchemaV1`\<`unknown`, `unknown`\>, `any`\>
21 \| `null`
22 \| `undefined`
23
24## Parameters
25
26### collection
27
28`T`
29
30## Returns
31
32`T`