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

Method get

packages/db/src/utils/btree.ts:155–157  ·  view source on GitHub ↗

* Finds a pair in the tree and returns the associated value. * @param defaultValue a value to return if the key was not found. * @returns the value, or defaultValue if the key was not found. * @description Computational complexity: O(log size)

(key: K, defaultValue?: V)

Source from the content-addressed store, hash-verified

153 * @description Computational complexity: O(log size)
154 */
155 get(key: K, defaultValue?: V): V | undefined {
156 return this._root.get(key, defaultValue, this)
157 }
158
159 /**
160 * Adds or overwrites a key-value pair in the B+ tree.

Callers 15

getAdapterForCollectionFunction · 0.45
onMessageFunction · 0.45
isLeaderMethod · 0.45
ensureCollectionStateMethod · 0.45
onChannelMessageMethod · 0.45
handlePullSinceMethod · 0.45
constructorMethod · 0.45
postMessageMethod · 0.45
closeMethod · 0.45

Calls

no outgoing calls

Tested by 15

constructorMethod · 0.36
postMessageMethod · 0.36
closeMethod · 0.36
tryGrantNextLockFunction · 0.36
tableExistsFunction · 0.36
createMockCollectionFunction · 0.36
getStateValueFunction · 0.36
getStateValueFunction · 0.36
restoreFunction · 0.36
createBasicTestsFunction · 0.36
testJoinTypeFunction · 0.36
createJoinTestsFunction · 0.36