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

Method keysArray

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

Gets an array of all keys, sorted

()

Source from the content-addressed store, hash-verified

220
221 /** Gets an array of all keys, sorted */
222 keysArray() {
223 const results: Array<K> = []
224 this._root.forRange(
225 this.minKey()!,
226 this.maxKey()!,
227 true,
228 false,
229 this,
230 0,
231 (k, _v) => {
232 results.push(k)
233 },
234 )
235 return results
236 }
237
238 /** Returns the next pair whose key is larger than the specified key (or undefined if there is none).
239 * If key === undefined, this function returns the lowest pair.

Callers 1

orderedEntriesArrayMethod · 0.80

Calls 3

minKeyMethod · 0.95
maxKeyMethod · 0.95
forRangeMethod · 0.45

Tested by

no test coverage detected