DB.get

Gets an entry from the DB

Only accepts an array for the key. V must be convertable from char array.

class DB
bool
get
(
T
V
)
()
if (
!is(V == interface)
)

Return Value

Type: bool

true if the key was found in the DB

Throws

LeveldbException

Examples

1 auto opt = new Options;
2 opt.create_if_missing = true;
3 auto db = new DB(opt, "/my/db/");
4 db.put("User1", Slice("John Doe"));
5 string name;
6 enforce(db.get("User1", name));
7 assert(name == "John Doe");

Meta