You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The value of 59629 is saved/encoded using the following:
tx.Bucket([]byte("config")).Put([]byte("lastBlockLevel"), inttob(blockLevel))
// itob returns an 8-byte big endian representation of v.
func itob(v int64) []byte {
b := make([]byte, 8)
binary.BigEndian.PutUint64(b, uint64(v))
return b
}
Displays correctly when viewing bucket/kv, but attempting to edit doesn't work.
Am I storing integers correctly or is there a better way?
The text was updated successfully, but these errors were encountered:
You're storing your integers in a fine way. The problem stems from bolt being a type-less database, so there is no built-in way to determine what the "appropriate" data type is for any value stored in it.
This means the application that is interacting with the database is in charge of encoding/decoding the bytes stored in the db. Boltbrowser is, at this point, basically just built to be able to edit string data...
I believe that, in order to resolve this issue, bb needs to have a new workflow added where you can tell it what type of data you are viewing at any given key... Then any edit on that field should be able to encode it correctly. This will probably be a decent amount of work.
The value of 59629 is saved/encoded using the following:
Displays correctly when viewing bucket/kv, but attempting to edit doesn't work.
Am I storing integers correctly or is there a better way?
The text was updated successfully, but these errors were encountered: