createIterator
constcreateIterator: (transactionId,startKey?,endKey?,reverse?) =>number
Defined in: .work/repos/olmdb/src/lowlevel.ts:137
Creates an iterator for scanning a range of keys within a transaction.
The iterator covers the half-open range [startKey, endKey) — startKey is
the inclusive lower bound and endKey the exclusive upper bound. This holds
regardless of direction: reverse only changes the order in which keys are
emitted, not which bound is inclusive. So a forward scan yields the range
ascending starting at startKey, while a reverse scan yields the same range
descending starting at the largest key below endKey.
Parameters
Section titled “Parameters”transactionId
Section titled “transactionId”number
The ID of the transaction
startKey?
Section titled “startKey?”ArrayBufferLike
Optional inclusive lower bound (defaults to the first key)
endKey?
Section titled “endKey?”ArrayBufferLike
Optional exclusive upper bound (defaults to past the last key)
reverse?
Section titled “reverse?”boolean
If true, keys are returned in descending order
Returns
Section titled “Returns”number
An iterator ID to be used with readIterator() and closeIterator()
Throws
Section titled “Throws”DatabaseError if the operation fails