key

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2021 License: Apache-2.0 Imports: 1 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key []byte

Key represents high-level Key type.

func (Key) Clone

func (k Key) Clone() Key

Clone returns a copy of the Key.

func (Key) Cmp

func (k Key) Cmp(another Key) int

Cmp returns the comparison result of two keys. The result will be 0 if a==b, -1 if a < b, and +1 if a > b.

func (Key) HasPrefix

func (k Key) HasPrefix(prefix Key) bool

HasPrefix tests whether the Key begins with prefix.

func (Key) Next

func (k Key) Next() Key

Next returns the next key in byte-order.

func (Key) PrefixNext

func (k Key) PrefixNext() Key

PrefixNext returns the next prefix key.

Assume there are keys like:

rowkey1
rowkey1_column1
rowkey1_column2
rowKey2

If we seek 'rowkey1' Next, we will get 'rowkey1_column1'. If we seek 'rowkey1' PrefixNext, we will get 'rowkey2'.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL