Cleanup snapshot memory
test if the snapshot has been created
LeveldbException
1 auto opt = new Options; 2 opt.create_if_missing = true; 3 auto db = new DB(opt, "/my/db/") 4 5 auto snap = db.snapshot; 6 db.put(Slice("Future"), Slice("Stuff")); 7 8 auto ro = new ReadOptions; 9 ro.snapshot(snap); 10 11 string str; 12 assert(db.get(Slice("Future"), str)); 13 assert(!db.get(Slice("Future"), str, ro));
DB Snapshot
Snapshots can be applied to ReadOptions. Created from a DB object