DB.put

Inserts/Updates a given value at a given key.

class DB
void
put
(
K
V
)
(
in K key
,
in V val
,
const(WriteOptions) opt = DefaultWriteOptions
)

Throws

LeveldbException

Examples

auto opt = new Options;
opt.create_if_missing = true;
auto db = new DB(opt, "/my/db/");
db.put(Slice("User1"), "John Doe");

Meta