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

Method GetUint64

lib/datastore/flydb.go:146–155  ·  view source on GitHub ↗

GetUint64 is used to retrieve the Uint64 value of `key`

(key []byte)

Source from the content-addressed store, hash-verified

144
145// GetUint64 is used to retrieve the Uint64 value of `key`
146func (fds *FlyDbStore) GetUint64(key []byte) (uint64, error) {
147 if len(key) == 0 {
148 return 0, _const.ErrKeyIsEmpty
149 }
150 val, err := fds.conn.Get(key)
151 if err != nil {
152 return 0, err
153 }
154 return bytesToUint64(val), nil
155}
156
157// min is a helper method on FlyDbStore that returns the smallest index in the log
158func (fds *FlyDbStore) min() uint64 {

Callers

nothing calls this directly

Calls 2

bytesToUint64Function · 0.85
GetMethod · 0.65

Tested by

no test coverage detected