func (ldbs *Store) getWithSnapshot(key []byte, snapshot *leveldb.Snapshot) ([]byte, error) { options := defaultReadOptions() b, err := snapshot.Get(key, options) if err == leveldb.ErrNotFound { return nil, nil } return b, err }
func newIteratorWithSnapshot(store *Store, snapshot *leveldb.Snapshot) *Iterator { options := defaultReadOptions() iter := snapshot.NewIterator(nil, options) rv := Iterator{ store: store, iterator: iter, } return &rv }