Documentation ¶
Index ¶
- func DecodePropertyValue(buffer []byte) (int64, []byte, error)
- func MustInt64(got []int64, err error) []int64
- type Delta
- func (d *Delta) Get(index int64) (int64, error)
- func (d *Delta) InsertAt(index, value int64) error
- func (d *Delta) Int64() ([]int64, error)
- func (d *Delta) MustValues() []int64
- func (d *Delta) Next(token DeltaToken) (DeltaToken, error)
- func (d *Delta) Raw() []byte
- func (d *Delta) Size() int
- func (d *Delta) SplitAt(index int64) (left, right *Delta, err error)
- type DeltaToken
- type Dictionary
- type DictionaryRLE
- func (d *DictionaryRLE) Get(index int64) ([]byte, error)
- func (d *DictionaryRLE) InsertAt(index int64, value []byte) error
- func (d *DictionaryRLE) Lookup(value []byte) (int64, error)
- func (d *DictionaryRLE) Next(token DictionaryRLEToken) (DictionaryRLEToken, error)
- func (d *DictionaryRLE) RowCount() int
- func (d *DictionaryRLE) Size() int
- func (d *DictionaryRLE) SplitAt(index int64) (left, right *DictionaryRLE, err error)
- type DictionaryRLEToken
- type LogicalType
- type Plain
- type PlainToken
- type RLE
- func (r *RLE) DeleteAt(index int64) error
- func (r *RLE) Get(index int64) (int64, error)
- func (r *RLE) InsertAt(index, v int64) error
- func (r *RLE) Int64() ([]int64, error)
- func (r *RLE) Next(token RLEToken) (RLEToken, error)
- func (r *RLE) RowCount() int
- func (r *RLE) Size() int
- func (r *RLE) SplitAt(index int64) (left, right *RLE, err error)
- func (r *RLE) Translate(index int64, isDelete func(opType int64) bool) (int64, error)
- type RLEToken
- type RawType
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Delta ¶
type Delta struct {
// contains filtered or unexported fields
}
func (*Delta) MustValues ¶
func (*Delta) Next ¶
func (d *Delta) Next(token DeltaToken) (DeltaToken, error)
type DeltaToken ¶
type DeltaToken struct { Value int64 // contains filtered or unexported fields }
type Dictionary ¶
type Dictionary struct {
// contains filtered or unexported fields
}
func NewDictionary ¶
func NewDictionary(buffer []byte) *Dictionary
func (*Dictionary) LookupString ¶
func (d *Dictionary) LookupString(key string) (int64, error)
func (*Dictionary) Size ¶
func (d *Dictionary) Size() int
type DictionaryRLE ¶
type DictionaryRLE struct {
// contains filtered or unexported fields
}
func NewDictionaryRLE ¶
func NewDictionaryRLE(dict, data []byte) *DictionaryRLE
func (*DictionaryRLE) Next ¶
func (d *DictionaryRLE) Next(token DictionaryRLEToken) (DictionaryRLEToken, error)
func (*DictionaryRLE) RowCount ¶
func (d *DictionaryRLE) RowCount() int
func (*DictionaryRLE) Size ¶
func (d *DictionaryRLE) Size() int
func (*DictionaryRLE) SplitAt ¶
func (d *DictionaryRLE) SplitAt(index int64) (left, right *DictionaryRLE, err error)
type DictionaryRLEToken ¶
type DictionaryRLEToken struct { Value []byte // contains filtered or unexported fields }
type LogicalType ¶
type LogicalType uint8
const ( LogicalTypeUnknown LogicalType = 0 LogicalTypeInt64 LogicalType = 1 LogicalTypeString LogicalType = 2 LogicalTypeProperty LogicalType = 3 )
type Plain ¶
type Plain struct {
// contains filtered or unexported fields
}
func (*Plain) Next ¶
func (p *Plain) Next(token PlainToken) (PlainToken, error)
type PlainToken ¶
type RLE ¶
type RLE struct {
// contains filtered or unexported fields
}
func (*RLE) Translate ¶
Translate returns actual index within the page for the requested element accounting for deletes.
For example, if the page consists of the operations: ins, ins, ins, del, ins and we ask to translate index 2, what we should get is index 4 since we have a del that would cancel out an ins.
type Value ¶
type Value struct { Int int64 Bytes []byte RawType RawType // contains filtered or unexported fields }
func ByteSliceValue ¶
ByteSliceValue encodes to a var int length followed by the bytes
func PropertyValue ¶
PropertyValue encodes to: * var int total length * var int key length * key bytes * var int value length * value bytes
While we could remove total length at the top, this would require a new raw format. Instead, we'll take the var int hit to allow us to encode the property as a byte slice.
func StringValue ¶
StringValue encodes to a var int length followed by a byte array