MCPcopy Create free account
hub / github.com/TanStack/db / shouldAutoIndex

Function shouldAutoIndex

packages/db/src/indexes/auto-index.ts:12–17  ·  view source on GitHub ↗
(collection: CollectionImpl<any, any, any, any, any>)

Source from the content-addressed store, hash-verified

10}
11
12function shouldAutoIndex(collection: CollectionImpl<any, any, any, any, any>) {
13 // Only proceed if auto-indexing is enabled
14 // Note: autoIndex: 'eager' without defaultIndexType is caught at construction time
15 // in CollectionImpl, so we don't need to check for it here.
16 return collection.config.autoIndex === `eager`
17}
18
19export function ensureIndexForField<
20 T extends Record<string, any>,

Callers 2

ensureIndexForFieldFunction · 0.85
ensureIndexForExpressionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected