utils

package
v0.0.0-...-e215c4f Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//record_data
	Store_Prefix_KV    byte = 1
	Store_Prefix_INDEX byte = 2
)

Variables

View Source
var (
	MaxColumnNameLength = 128
	DefaultRowIDName    = "__row_id"
)

Functions

func DecodeStorePrefix

func DecodeStorePrefix(key []byte) (byte, uint64, uint64)

func EncodePrimaryKey

func EncodePrimaryKey(buf []byte, col *basepb.Column, sval []byte) ([]byte, error)

EncodePrimaryKey encodes the primary key column without encoding the column ID to maintain the sort attribute

func EncodeSplitKeys

func EncodeSplitKeys(keys []string, columns []*basepb.Column) ([][]byte, error)

func EncodeStorePrefix

func EncodeStorePrefix(prefix uint8, id uint64) (start []byte, end []byte)

func MakeRowKeys

func MakeRowKeys(tableID, dataRangeNum uint64) (int64, [][]byte)

func ModifyColumn

func ModifyColumn(table *basepb.Table, source []*basepb.Column) error

func ParseTableProperties

func ParseTableProperties(properties string) (*entity.TableProperty, error)

func ToTableProperty

func ToTableProperty(cols []*basepb.Column) (string, error)

func ValidateName

func ValidateName(name string) error

Types

type ByLetter

type ByLetter [][]byte

func (ByLetter) Len

func (s ByLetter) Len() int

func (ByLetter) Less

func (s ByLetter) Less(i, j int) bool

func (ByLetter) Swap

func (s ByLetter) Swap(i, j int)

Directories

Path Synopsis
Package apd implements arbitrary-precision decimals.
Package apd implements arbitrary-precision decimals.
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.

Jump to

Keyboard shortcuts

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