composite

package
v0.0.0-...-2627f95 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(a, b Key) int

Compare compares two keys -1 means a < b 1 means a > b 0 means a = b

func HasPrefix

func HasPrefix(a, b Key) bool

HasPrefix returns true if b is a prefix of a

Types

type Key

type Key [][]byte

Key is a sequence of keys

type Range

type Range []keys.Range

Range represents all keys such that

k >= Min and k < Max

If Min = nil that indicates the start of all keys If Max = nil that indicatese the end of all keys If multiple modifiers are called on a range the end result is effectively the same as ANDing all the restrictions.

func All

func All() Range

All returns a new key range matching all keys

func (Range) Contains

func (r Range) Contains(key Key) bool

Contains returns true if the range contains key

func (Range) Get

func (r Range) Get(i int) keys.Range

Get returns the range for the ith key level It returns a full range if level i doesn't exist in this range.

Jump to

Keyboard shortcuts

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