MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / Get

Method Get

driver/hybriddb/snapshot.go:13–22  ·  view source on GitHub ↗
(key []byte)

Source from the content-addressed store, hash-verified

11}
12
13func (s *Snapshot) Get(key []byte) ([]byte, error) {
14 v, err := s.snp.Get(key, nil)
15 if err != nil {
16 if err == leveldb.ErrNotFound {
17 return nil, nil // Not found
18 }
19 return nil, err // Other LevelDB error
20 }
21 return v, nil
22}
23
24func (s *Snapshot) NewIterator() driver.IIterator {
25 it := &Iterator{

Callers 4

TestDB_SnapshotFunction · 0.95
TestSnapshotFunction · 0.95
TestSnapshot_CloseFunction · 0.95
TestSnapshot_ConcurrentFunction · 0.95

Calls

no outgoing calls

Tested by 4

TestDB_SnapshotFunction · 0.76
TestSnapshotFunction · 0.76
TestSnapshot_CloseFunction · 0.76
TestSnapshot_ConcurrentFunction · 0.76