diff options
Diffstat (limited to 'bucket.go')
-rw-r--r-- | bucket.go | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -7,6 +7,14 @@ import ( "unsafe" ) +const ( + // MaxKeySize is the maximum length of a key, in bytes. + MaxKeySize = 32768 + + // MaxValueSize is the maximum length of a value, in bytes. + MaxValueSize = 4294967295 +) + var ( // ErrBucketNotFound is returned when trying to access a bucket that has // not been created yet. @@ -37,6 +45,13 @@ var ( ErrSequenceOverflow = errors.New("sequence overflow") ) +const ( + maxUint = ^uint(0) + minUint = 0 + maxInt = int(^uint(0) >> 1) + minInt = -maxInt - 1 +) + // Bucket represents a collection of key/value pairs inside the database. type Bucket struct { *bucket |