DB.Iterator

DB Iterator

Can iterate the db

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

opApply
int opApply(int delegate(Slice) dg)

For each on iterator

Properties

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

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

1 auto opt = new Options;
2 opt.create_if_missing = true;
3 auto db = new DB(opt, "/my/db/")
4 
5 auto it = db.iterator;
6 foreach(Slice key, Slice value; it)
7 {
8    writeln(key.as!string, " - ", value.as!string);
9 }

Meta