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

Method clear

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

Releases the tree so that its size is 0.

()

Source from the content-addressed store, hash-verified

142
143 /** Releases the tree so that its size is 0. */
144 clear() {
145 this._root = EmptyLeaf as BNode<K, V>
146 this._size = 0
147 }
148
149 /**
150 * Finds a pair in the tree and returns the associated value.

Callers 15

useLiveQueryFunction · 0.45
disposeMethod · 0.45
cleanupMethod · 0.45
createWrappedSyncConfigFunction · 0.45
createRecordingAdapterFunction · 0.45
rejectAllPendingRequestsFunction · 0.45
disposeMethod · 0.45
cleanupGlobalsFunction · 0.45

Calls

no outgoing calls

Tested by 10

createRecordingAdapterFunction · 0.36
cleanupGlobalsFunction · 0.36
createMockCollectionFunction · 0.36