Documentation ¶
Index ¶
- Constants
- Variables
- func BlockExist(s Store, sum []byte) bool
- func BlockIndexExist(s Store, sum []byte) bool
- func BlocksCount(rowsCount uint32) uint32
- func CombineRowBytesIntoBlock(blk [][]byte) []byte
- func CommitExist(s Store, sum []byte) bool
- func DeleteAllCommit(s Store) error
- func DeleteBlock(s Store, sum []byte) error
- func DeleteBlockIndex(s Store, sum []byte) error
- func DeleteCommit(s Store, sum []byte) error
- func DeleteTable(s Store, sum []byte) error
- func DeleteTableIndex(s Store, sum []byte) error
- func DeleteTableProfile(s Store, sum []byte) error
- func GetAllBlockIndexKeys(s Store) ([][]byte, error)
- func GetAllBlockKeys(s Store) ([][]byte, error)
- func GetAllCommitKeys(s Store) ([][]byte, error)
- func GetAllTableIndexKeys(s Store) ([][]byte, error)
- func GetAllTableKeys(s Store) ([][]byte, error)
- func GetAllTableProfileKeys(s Store) ([][]byte, error)
- func GetBlock(s Store, buf, sum []byte) (blk [][]string, dst []byte, err error)
- func GetBlockBytes(s Store, sum []byte) ([]byte, error)
- func GetTableIndex(s Store, sum []byte) ([][]string, error)
- func NopCloser(r io.ReadSeeker) io.ReadSeekCloser
- func Prefixes() []string
- func ReadBlockFrom(r io.Reader) (int64, [][]string, error)
- func SaveBlock(s Store, buf, content []byte) (sum, dst []byte, err error)
- func SaveBlockIndex(s Store, buf, content []byte) (sum, dst []byte, err error)
- func SaveCommit(s Store, content []byte) (sum []byte, err error)
- func SaveCompressedBlock(s Store, content, compressed []byte) (sum []byte, err error)
- func SaveTable(s Store, content []byte) (sum []byte, err error)
- func SaveTableIndex(s Store, sum, content []byte) (err error)
- func SaveTableProfile(s Store, sum, content []byte) (err error)
- func StringSliceIsLess(pk []uint32, a, b []string) bool
- func TableExist(s Store, sum []byte) bool
- func TableIndexExist(s Store, sum []byte) bool
- func ValidateBlockBytes(b []byte) (err error)
- func ValidateStrListBytes(b []byte) (int, error)
- func WriteBlockTo(enc *StrListEncoder, w io.Writer, blk [][]string) (int64, error)
- type BlockIndex
- func GetBlockIndex(s Store, buf, sum []byte) (idx *BlockIndex, dst []byte, err error)
- func IndexBlock(enc *StrListEncoder, hash hash.Hash, blk [][]string, pk []uint32) (*BlockIndex, error)
- func IndexBlockFromBytes(dec *StrListDecoder, hash *meow.Digest, e *StrListEditor, blockBytes []byte, ...) (*BlockIndex, error)
- func ReadBlockIndex(r io.Reader) (int64, *BlockIndex, error)
- type ColumnProfile
- type Commit
- type Diff
- type FloatListDecoder
- type FloatListEncoder
- type Store
- type StrList
- type StrListDecoder
- type StrListEditor
- type StrListEncoder
- type Table
- type TableProfile
- type UintListDecoder
- type UintListEncoder
- type ValueCount
- type ValueCounts
Constants ¶
View Source
const BlockSize = 255
Variables ¶
View Source
var ErrKeyNotFound = fmt.Errorf("key not found")
Functions ¶
func BlockExist ¶
func BlockIndexExist ¶
func BlocksCount ¶
func CommitExist ¶
func DeleteAllCommit ¶
func DeleteBlock ¶
func DeleteBlockIndex ¶
func DeleteCommit ¶
func DeleteTable ¶
func DeleteTableIndex ¶
func DeleteTableProfile ¶ added in v0.8.0
func GetAllBlockIndexKeys ¶ added in v0.8.5
func GetAllBlockKeys ¶
func GetAllCommitKeys ¶
func GetAllTableIndexKeys ¶ added in v0.8.5
func GetAllTableKeys ¶
func GetAllTableProfileKeys ¶ added in v0.8.5
func NopCloser ¶
func NopCloser(r io.ReadSeeker) io.ReadSeekCloser
func SaveBlockIndex ¶
func SaveCompressedBlock ¶ added in v0.6.0
func SaveTableIndex ¶
func SaveTableProfile ¶ added in v0.8.0
func StringSliceIsLess ¶
func TableExist ¶
func TableIndexExist ¶
func ValidateBlockBytes ¶
func ValidateStrListBytes ¶
func WriteBlockTo ¶
Types ¶
type BlockIndex ¶
type BlockIndex struct { Rows [][]byte // contains filtered or unexported fields }
func GetBlockIndex ¶
func GetBlockIndex(s Store, buf, sum []byte) (idx *BlockIndex, dst []byte, err error)
func IndexBlock ¶
func IndexBlock(enc *StrListEncoder, hash hash.Hash, blk [][]string, pk []uint32) (*BlockIndex, error)
func IndexBlockFromBytes ¶
func IndexBlockFromBytes(dec *StrListDecoder, hash *meow.Digest, e *StrListEditor, blockBytes []byte, pk []uint32) (*BlockIndex, error)
IndexBlockFromBytes creates BlockIndex from block bytes
func ReadBlockIndex ¶
func ReadBlockIndex(r io.Reader) (int64, *BlockIndex, error)
func (*BlockIndex) Len ¶
func (idx *BlockIndex) Len() int
func (*BlockIndex) Less ¶
func (idx *BlockIndex) Less(i, j int) bool
func (*BlockIndex) Swap ¶
func (idx *BlockIndex) Swap(i, j int)
type ColumnProfile ¶ added in v0.8.0
type ColumnProfile struct { Name string `json:"name"` NACount uint32 `json:"naCount"` Min *float64 `json:"min,omitempty"` Max *float64 `json:"max,omitempty"` Mean *float64 `json:"mean,omitempty"` Median *float64 `json:"median,omitempty"` StdDeviation *float64 `json:"stdDeviation,omitempty"` MinStrLen uint16 `json:"minStrLen"` MaxStrLen uint16 `json:"maxStrLen"` AvgStrLen uint16 `json:"avgStrLen"` TopValues ValueCounts `json:"topValues,omitempty"` Percentiles []float64 `json:"percentiles,omitempty"` }
type Commit ¶
type FloatListDecoder ¶ added in v0.8.0
type FloatListDecoder struct {
// contains filtered or unexported fields
}
FloatListDecoder decodes string slice.
func NewFloatListDecoder ¶ added in v0.8.0
func NewFloatListDecoder(reuseRecords bool) *FloatListDecoder
func (*FloatListDecoder) Decode ¶ added in v0.8.0
func (d *FloatListDecoder) Decode(b []byte) []float64
type FloatListEncoder ¶ added in v0.8.0
type FloatListEncoder struct {
// contains filtered or unexported fields
}
FloatListEncoder encodes string slice. Max bytes size for each string is 65536 bytes
func NewFloatListEncoder ¶ added in v0.8.0
func NewFloatListEncoder() *FloatListEncoder
func (*FloatListEncoder) Encode ¶ added in v0.8.0
func (e *FloatListEncoder) Encode(sl []float64) []byte
type StrList ¶
type StrList []byte
func (StrList) ReadColumns ¶
type StrListDecoder ¶
type StrListDecoder struct {
// contains filtered or unexported fields
}
StrListDecoder decodes string slice.
func NewStrListDecoder ¶
func NewStrListDecoder(reuseRecords bool) *StrListDecoder
func (*StrListDecoder) Decode ¶
func (d *StrListDecoder) Decode(b []byte) []string
type StrListEditor ¶
type StrListEditor struct {
// contains filtered or unexported fields
}
StrListEditor can either remove certain columns from StrList or remove everything except certain columns. It is built to minimize allocations so given StrList will always be edit in place.
func NewStrListEditor ¶
func NewStrListEditor(columns []uint32) *StrListEditor
func (*StrListEditor) PickFrom ¶
func (r *StrListEditor) PickFrom(dst, src []byte) []byte
func (*StrListEditor) RemoveFrom ¶
func (r *StrListEditor) RemoveFrom(b []byte) []byte
type StrListEncoder ¶
type StrListEncoder struct {
// contains filtered or unexported fields
}
StrListEncoder encodes string slice. Max bytes size for each string is 65536 bytes
func NewStrListEncoder ¶
func NewStrListEncoder(reuseRecords bool) *StrListEncoder
func (*StrListEncoder) Encode ¶
func (e *StrListEncoder) Encode(sl []string) []byte
type Table ¶
type Table struct { Sum []byte Columns []string PK []uint32 RowsCount uint32 Blocks [][]byte BlockIndices [][]byte }
func (*Table) HasValidBlockIndices ¶ added in v0.12.1
func (*Table) PrimaryKey ¶
type TableProfile ¶ added in v0.8.0
type TableProfile struct { Version uint32 `json:"-"` RowsCount uint32 `json:"rowsCount"` Columns []*ColumnProfile `json:"columns"` }
func GetTableProfile ¶ added in v0.8.0
func GetTableProfile(s Store, sum []byte) (*TableProfile, error)
type UintListDecoder ¶
type UintListDecoder struct {
// contains filtered or unexported fields
}
UintListDecoder decodes string slice.
func NewUintListDecoder ¶
func NewUintListDecoder(reuseRecords bool) *UintListDecoder
func (*UintListDecoder) Decode ¶
func (d *UintListDecoder) Decode(b []byte) []uint32
type UintListEncoder ¶
type UintListEncoder struct {
// contains filtered or unexported fields
}
UintListEncoder encodes string slice. Max bytes size for each string is 65536 bytes
func NewUintListEncoder ¶
func NewUintListEncoder() *UintListEncoder
func (*UintListEncoder) Encode ¶
func (e *UintListEncoder) Encode(sl []uint32) []byte
type ValueCount ¶ added in v0.8.0
type ValueCounts ¶ added in v0.8.0
type ValueCounts []ValueCount
func (ValueCounts) IsEmpty ¶ added in v0.8.0
func (a ValueCounts) IsEmpty() bool
func (ValueCounts) Len ¶ added in v0.8.0
func (a ValueCounts) Len() int
func (ValueCounts) Less ¶ added in v0.8.0
func (a ValueCounts) Less(i, j int) bool
func (ValueCounts) Swap ¶ added in v0.8.0
func (a ValueCounts) Swap(i, j int)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.