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

Method SetUint64

lib/datastore/flydb.go:134–143  ·  view source on GitHub ↗

SetUint64 is used to set Uint64 value for `key`

(key []byte, val uint64)

Source from the content-addressed store, hash-verified

132
133// SetUint64 is used to set Uint64 value for `key`
134func (fds *FlyDbStore) SetUint64(key []byte, val uint64) error {
135 if len(key) == 0 {
136 return _const.ErrKeyIsEmpty
137 }
138 err := fds.conn.Put(key, uint64ToBytes(val))
139 if err != nil {
140 return err
141 }
142 return nil
143}
144
145// GetUint64 is used to retrieve the Uint64 value of `key`
146func (fds *FlyDbStore) GetUint64(key []byte) (uint64, error) {

Callers

nothing calls this directly

Calls 2

uint64ToBytesFunction · 0.85
PutMethod · 0.65

Tested by

no test coverage detected