Categorygithub.com/hnakamur/sortedbytes
repositorypackage
0.2.0
Repository: https://github.com/hnakamur/sortedbytes.git
Documentation: pkg.go.dev

# README

keybytes

Package keybytes provides feature for encoding and decoding key bytes. Two encoded key bytes of two different keys keeps the order so that you can use encoded key bytes for keys in a key-value-store which is capable to do range scans.

Supported types are bool, int32, int64, float64, string, sql.NulBool, sql.NullInt32, sql.NullInt64, sql.NullFloat64, and sql.NullString.

Note time.Time and sql.NullTime are not supported. You can use int64 or sql.NullInt64 for timestamps with time.Time.Unix() or time.Time.UnixNano().

The encoding in this package is a subset of the FDB Tuple layer typecodes encoding.