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

Function createTestItemCollection

packages/db/tests/query/indexes.test.ts:231–241  ·  view source on GitHub ↗
(autoIndex: `off` | `eager` = `off`)

Source from the content-addressed store, hash-verified

229]
230
231function createTestItemCollection(autoIndex: `off` | `eager` = `off`) {
232 return createCollection(
233 mockSyncCollectionOptions<TestItem>({
234 id: `test-collection`,
235 getKey: (item) => item.id,
236 initialData: testData,
237 autoIndex,
238 defaultIndexType: BTreeIndex,
239 }),
240 )
241}
242
243describe(`Query Index Optimization`, () => {
244 let collection: ReturnType<typeof createTestItemCollection>

Callers 1

indexes.test.tsFile · 0.85

Calls 2

createCollectionFunction · 0.85

Tested by

no test coverage detected