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

Method constructor

packages/db/src/indexes/basic-index.ts:60–72  ·  view source on GitHub ↗
(
    id: number,
    expression: BasicExpression,
    name?: string,
    options?: any,
  )

Source from the content-addressed store, hash-verified

58 private compareFn: (a: any, b: any) => number = defaultComparator
59
60 constructor(
61 id: number,
62 expression: BasicExpression,
63 name?: string,
64 options?: any,
65 ) {
66 super(id, expression, name, options)
67 this.compareFn = options?.compareFn ?? defaultComparator
68 this.hasCustomComparator = options?.compareFn != null
69 if (options?.compareOptions) {
70 this.compareOptions = options!.compareOptions
71 }
72 }
73
74 protected initialize(_options?: BasicIndexOptions): void {}
75

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected