MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / GetUint64

Method GetUint64

lib/datastore/rocksdb.go:164–176  ·  view source on GitHub ↗
(key []byte)

Source from the content-addressed store, hash-verified

162}
163
164func (rds *RocksDbStore) GetUint64(key []byte) (uint64, error) {
165 if len(key) == 0 {
166 return 0, _const.ErrKeyIsEmpty
167 }
168 ro := gorocksdb.NewDefaultReadOptions()
169 defer ro.Destroy()
170
171 val, err := rds.conn.Get(ro, key)
172 if err != nil {
173 return 0, err
174 }
175 return bytesToUint64(val.Data()), nil
176}

Callers

nothing calls this directly

Calls 2

bytesToUint64Function · 0.85
GetMethod · 0.65

Tested by

no test coverage detected