(key []byte, val uint64)
| 148 | } |
| 149 | |
| 150 | func (rds *RocksDbStore) SetUint64(key []byte, val uint64) error { |
| 151 | if len(key) == 0 { |
| 152 | return _const.ErrKeyIsEmpty |
| 153 | } |
| 154 | wo := gorocksdb.NewDefaultWriteOptions() |
| 155 | wo.SetSync(true) |
| 156 | defer wo.Destroy() |
| 157 | err := rds.conn.Put(wo, key, uint64ToBytes(val)) |
| 158 | if err != nil { |
| 159 | return err |
| 160 | } |
| 161 | return nil |
| 162 | } |
| 163 | |
| 164 | func (rds *RocksDbStore) GetUint64(key []byte) (uint64, error) { |
| 165 | if len(key) == 0 { |
nothing calls this directly
no test coverage detected