Пример #1
0
// SetSnapshot causes reads to provided as they were when the passed in
// Snapshot was created by DB.NewSnapshot. This is useful for getting
// consistent reads during a bulk operation.
//
// See the LevelDB documentation for details.
func (ro *ReadOptions) SetSnapshot(snap *Snapshot) {
	var s *C.leveldb_snapshot_t
	if snap != nil {
		s = snap.snap
	}
	C.leveldb_readoptions_set_snapshot(ro.Opt, s)
}
Пример #2
0
// SetSnapshot causes reads to provided as they were when the passed in
// Snapshot was created by *DB.NewSnapshot().
//
// See the LevelDB C++ documentation for details.
func (ro *ReadOptions) SetSnapshot(snap *C.leveldb_snapshot_t) {
	C.leveldb_readoptions_set_snapshot(ro.Opt, snap)
}