DB.Iterator

DB Iterator

Can iterate the db

Constructors

this
this(const(ReadOptions) opt)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Aliases

popFront
alias popFront = next
Undocumented in source.

Functions

opApply
int opApply(int delegate(Slice, Slice) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
opApply
int opApply(int delegate(Slice) dg)

For each on iterator

opApplyReverse
int opApplyReverse(int delegate(Slice) dg)
Undocumented in source. Be warned that the author may not have intended to support it.
opApplyReverse
int opApplyReverse(int delegate(Slice, Slice) dg)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

empty
bool empty [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
front
auto front [@property getter]

return the front of the iterator

key
Slice key [@property getter]

Return the current key

next
void next [@property getter]

Move to next item

ok
bool ok [@property getter]

Iterator created

prev
void prev [@property getter]

Move to previous item

ptr
inout(leveldb_iterator_t) ptr [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
seek
T seek [@property setter]

Seek to given slice.

seek_to_first
void seek_to_first [@property getter]

Seek to front of data

seek_to_last
void seek_to_last [@property getter]

Seek to end of data

status
string status [@property getter]

Gets the current error status of the iterator

valid
bool valid [@property getter]

Iterator has more data to read

value
auto value [@property getter]

Return the current value

Throws

LeveldbException

Examples

auto opt = new Options;
opt.create_if_missing = true;
auto db = new DB(opt, "/my/db/")

auto it = db.iterator;
foreach(Slice key, Slice value; it)
{
   writeln(key.as!string, " - ", value.as!string);
}

Meta