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

Method update

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

* Updates a value in the index

(key: TKey, oldItem: any, newItem: any)

Source from the content-addressed store, hash-verified

148 * Updates a value in the index
149 */
150 update(key: TKey, oldItem: any, newItem: any): void {
151 this.remove(key, oldItem)
152 this.add(key, newItem)
153 }
154
155 /**
156 * Builds the index from a collection of entries

Callers

nothing calls this directly

Calls 2

removeMethod · 0.95
addMethod · 0.95

Tested by

no test coverage detected