MCPcopy Index your code
hub / github.com/TanStack/db / createRootsCollection

Function createRootsCollection

packages/db/tests/query/includes-lazy-loading.test.ts:44–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42
43describe(`includes lazy loading`, () => {
44 function createRootsCollection() {
45 return createCollection<Root>({
46 id: `includes-lazy-roots`,
47 getKey: (r) => r.id,
48 sync: {
49 sync: ({ begin, write, commit, markReady }) => {
50 begin()
51 for (const root of sampleRoots) {
52 write({ type: `insert`, value: root })
53 }
54 commit()
55 markReady()
56 },
57 },
58 })
59 }
60
61 function createItemsCollectionWithTracking() {
62 const loadSubsetCalls: Array<LoadSubsetOptions> = []

Callers 1

Calls 1

createCollectionFunction · 0.85

Tested by

no test coverage detected