Upgrade versions of vendored libs
This commit is contained in:
38
vendor/github.com/cockroachdb/pebble/internal/base/comparer.go
generated
vendored
38
vendor/github.com/cockroachdb/pebble/internal/base/comparer.go
generated
vendored
@@ -66,6 +66,23 @@ type Separator func(dst, a, b []byte) []byte
|
||||
// key must be valid to pass to Compare.
|
||||
type Successor func(dst, a []byte) []byte
|
||||
|
||||
// ImmediateSuccessor is invoked with a prefix key ([Split(a) == len(a)]) and
|
||||
// returns the smallest key that is larger than the given prefix a.
|
||||
// ImmediateSuccessor must return a prefix key k such that:
|
||||
//
|
||||
// Split(k) == len(k) and Compare(k, a) > 0
|
||||
//
|
||||
// and there exists no representable k2 such that:
|
||||
//
|
||||
// Split(k2) == len(k2) and Compare(k2, a) > 0 and Compare(k2, k) < 0
|
||||
//
|
||||
// As an example, an implementation built on the natural byte ordering using
|
||||
// bytes.Compare could append a `\0` to `a`.
|
||||
//
|
||||
// The dst parameter may be used to store the returned key, though it is valid
|
||||
// to pass nil. The returned key must be valid to pass to Compare.
|
||||
type ImmediateSuccessor func(dst, a []byte) []byte
|
||||
|
||||
// Split returns the length of the prefix of the user key that corresponds to
|
||||
// the key portion of an MVCC encoding scheme to enable the use of prefix bloom
|
||||
// filters.
|
||||
@@ -104,14 +121,15 @@ type Split func(a []byte) int
|
||||
// Comparer defines a total ordering over the space of []byte keys: a 'less
|
||||
// than' relationship.
|
||||
type Comparer struct {
|
||||
Compare Compare
|
||||
Equal Equal
|
||||
AbbreviatedKey AbbreviatedKey
|
||||
FormatKey FormatKey
|
||||
FormatValue FormatValue
|
||||
Separator Separator
|
||||
Split Split
|
||||
Successor Successor
|
||||
Compare Compare
|
||||
Equal Equal
|
||||
AbbreviatedKey AbbreviatedKey
|
||||
FormatKey FormatKey
|
||||
FormatValue FormatValue
|
||||
Separator Separator
|
||||
Split Split
|
||||
Successor Successor
|
||||
ImmediateSuccessor ImmediateSuccessor
|
||||
|
||||
// Name is the name of the comparer.
|
||||
//
|
||||
@@ -193,6 +211,10 @@ var DefaultComparer = &Comparer{
|
||||
return append(dst, a...)
|
||||
},
|
||||
|
||||
ImmediateSuccessor: func(dst, a []byte) (ret []byte) {
|
||||
return append(append(dst, a...), 0x00)
|
||||
},
|
||||
|
||||
// This name is part of the C++ Level-DB implementation's default file
|
||||
// format, and should not be changed.
|
||||
Name: "leveldb.BytewiseComparator",
|
||||
|
||||
Reference in New Issue
Block a user