Cleanup snapshot memory
test if the snapshot has been created
LeveldbException
auto opt = new Options; opt.create_if_missing = true; auto db = new DB(opt, "/my/db/") auto snap = db.snapshot; db.put(Slice("Future"), Slice("Stuff")); auto ro = new ReadOptions; ro.snapshot(snap); string str; assert(db.get(Slice("Future"), str)); assert(!db.get(Slice("Future"), str, ro));
DB Snapshot
Snapshots can be applied to ReadOptions. Created from a DB object