DBIterator class abstract

An iterator yields a sequence of key/value pairs from a source. The following class defines the interface. Multiple implementations are provided by this library. In particular, iterators are provided to access the contents of a Table or a DB.

Implemented types

Constructors

DBIterator.atPosition({required Pointer<leveldb_iterator_t> dbptr, Position<RawData>? initialPosition})
factory

Properties

current → KeyValue<RawData, RawData>?
The current element.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isValid bool
An iterator is either positioned at a key/value pair, or not valid. This method returns true iff the iterator is valid.
no setter
ptr Pointer<NativeType>
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
inherited
getError() Exception?
If an error has occurred, return it. Else return null
key() RawData
Return the key for the current entry. The underlying storage for the returned slice is valid only until the next modification of the iterator. REQUIRES: DBIterator.isValid
moveNext() bool
Advances the iterator to the next element of the iteration.
inherited
next() → void
Moves to the next entry in the source. After this call, DBIterator.isValid is true iff the iterator was not positioned at the last entry in the source. REQUIRES: DBIteratorisValid
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prev() → void
Moves to the previous entry in the source. After this call, DBIterator.isValid is true iff the iterator was not positioned at the first entry in source. REQUIRES: DBIterator.isValid
seek(RawData targetKey) → void
Position at the first key in the source that is at or past target. The iterator DBIterator.isValid after this call iff the source contains an entry that comes at or past target.
seekToFirst() → void
Position at the first key in the source. The iterator DBIterator.isValid after this call iff the source is not empty.
seekToLast() → void
Position at the last key in the source. The iterator DBIterator.isValid after this call iff the source is not empty.
toString() String
A string representation of this object.
inherited
value() RawData
Return the value for the current entry. The underlying storage for the returned slice is valid only until the next modification of the iterator. REQUIRES: DBIterator.isValid

Operators

operator ==(Object other) bool
The equality operator.
inherited