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

Method inArrayLookup

packages/db/src/indexes/btree-index.ts:395–407  ·  view source on GitHub ↗

* Performs an IN array lookup

(values: Array<any>)

Source from the content-addressed store, hash-verified

393 * Performs an IN array lookup
394 */
395 inArrayLookup(values: Array<any>): Set<TKey> {
396 const result = new Set<TKey>()
397
398 for (const value of values) {
399 const normalizedValue = normalizeForBTree(value)
400 const keys = this.valueMap.get(normalizedValue)
401 if (keys) {
402 keys.forEach((key) => result.add(key))
403 }
404 }
405
406 return result
407 }
408
409 // Getter methods for testing compatibility
410 get indexedKeysSet(): Set<TKey> {

Callers 1

lookupMethod · 0.95

Calls 4

normalizeForBTreeFunction · 0.85
getMethod · 0.45
forEachMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected