engine

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyDefaultExpr = DefaultExpr{Exist: false}

EmptyDefaultExpr means there is no definition for default expr

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Name    string      // name of attribute
	Alg     compress.T  // compression algorithm
	Type    types.Type  // type of attribute
	Default DefaultExpr // default value of this attribute.
	Primary bool        // if true, it is primary key
}

func (*Attribute) Format

func (node *Attribute) Format(buf *bytes.Buffer)

func (Attribute) GetDefaultExpr

func (node Attribute) GetDefaultExpr() (interface{}, bool)

func (Attribute) HasDefaultExpr

func (node Attribute) HasDefaultExpr() bool

type AttributeDef

type AttributeDef struct {
	Attr Attribute
}

func (*AttributeDef) Format

func (node *AttributeDef) Format(buf *bytes.Buffer)

type CommentDef

type CommentDef struct {
	Comment string
}

type Database

type Database interface {
	Relations() []string
	Relation(string) (Relation, error)

	Delete(uint64, string) error
	Create(uint64, string, []TableDef) error // Create Table - (name, table define)
}

type DefaultExpr

type DefaultExpr struct {
	Exist  bool
	Value  interface{} // int64, float32, float64, string, types.Date, types.Datetime
	IsNull bool
}

func MakeDefaultExpr

func MakeDefaultExpr(exist bool, value interface{}, isNull bool) DefaultExpr

MakeDefaultExpr returns a new DefaultExpr

type Engine

type Engine interface {
	Delete(uint64, string) error
	Create(uint64, string, int) error // Create Database - (name, engine type)

	Databases() []string
	Database(string) (Database, error)

	Node(string) *NodeInfo
}

type Filter

type Filter interface {
	Eq(string, interface{}) (*roaring.Bitmap, error)
	Ne(string, interface{}) (*roaring.Bitmap, error)
	Lt(string, interface{}) (*roaring.Bitmap, error)
	Le(string, interface{}) (*roaring.Bitmap, error)
	Gt(string, interface{}) (*roaring.Bitmap, error)
	Ge(string, interface{}) (*roaring.Bitmap, error)
	Btw(string, interface{}, interface{}) (*roaring.Bitmap, error)
}

type IndexT

type IndexT int
const (
	Invalid IndexT = iota
	ZoneMap
	BsiIndex
)

func (IndexT) ToString

func (node IndexT) ToString() string

type IndexTableDef

type IndexTableDef struct {
	Typ      IndexT
	ColNames []string
	Name     string
}

func (*IndexTableDef) Format

func (node *IndexTableDef) Format(buf *bytes.Buffer)

type ListPartition

type ListPartition struct {
	Name         string
	Extends      []extend.Extend
	Subpartition *PartitionByDef
}

type Node

type Node struct {
	Id   string `json:"id"`
	Addr string `json:"address"`
	Data []byte `json:"payload"`
}

func (Node) String

func (n Node) String() string

type NodeInfo

type NodeInfo struct {
	Mcpu int
}

type Nodes

type Nodes []Node

type PartitionByDef

type PartitionByDef struct {
	Fields []string
	List   []ListPartition
	Range  []RangePartition
}

type PrimaryIndexDef

type PrimaryIndexDef struct {
	TableDef
	Names []string
}

func (*PrimaryIndexDef) Format

func (node *PrimaryIndexDef) Format(buf *bytes.Buffer)

type PropertiesDef

type PropertiesDef struct {
	TableDef
	Properties []Property
}

type Property

type Property struct {
	Key   string
	Value string
}

type RangePartition

type RangePartition struct {
	Name         string
	From         []extend.Extend
	To           []extend.Extend
	Subpartition *PartitionByDef
}

type Reader

type Reader interface {
	Read([]uint64, []string) (*batch.Batch, error)
}

type Relation

type Relation interface {
	Statistics

	Close()

	ID() string

	Nodes() Nodes

	TableDefs() []TableDef
	// true: primary key, false: hide key
	GetPriKeyOrHideKey() ([]Attribute, bool)

	Write(uint64, *batch.Batch) error

	AddTableDef(uint64, TableDef) error
	DelTableDef(uint64, TableDef) error

	// first argument is the number of reader, second argument is the filter extend,  third parameter is the payload required by the engine
	NewReader(int, extend.Extend, []byte) []Reader
}

type SparseFilter

type SparseFilter interface {
	Eq(string, interface{}) (Reader, error)
	Ne(string, interface{}) (Reader, error)
	Lt(string, interface{}) (Reader, error)
	Le(string, interface{}) (Reader, error)
	Gt(string, interface{}) (Reader, error)
	Ge(string, interface{}) (Reader, error)
	Btw(string, interface{}, interface{}) (Reader, error)
}

type Statistics

type Statistics interface {
	Rows() int64
	Size(string) int64
}

type Summarizer

type Summarizer interface {
	Count(string, *roaring.Bitmap) (uint64, error)
	NullCount(string, *roaring.Bitmap) (uint64, error)
	Max(string, *roaring.Bitmap) (interface{}, error)
	Min(string, *roaring.Bitmap) (interface{}, error)
	Sum(string, *roaring.Bitmap) (int64, uint64, error)
}

type TableDef

type TableDef interface {
	// contains filtered or unexported methods
}

Directories

Path Synopsis
aoe
mergesort/dates
Package heap provides heap operations for any type that implements heap.Interface.
Package heap provides heap operations for any type that implements heap.Interface.
mergesort/datetimes
Package heap provides heap operations for any type that implements heap.Interface.
Package heap provides heap operations for any type that implements heap.Interface.
mergesort/float32s
Package heap provides heap operations for any type that implements heap.Interface.
Package heap provides heap operations for any type that implements heap.Interface.
mergesort/float64s
Package heap provides heap operations for any type that implements heap.Interface.
Package heap provides heap operations for any type that implements heap.Interface.
mergesort/int16s
Package heap provides heap operations for any type that implements heap.Interface.
Package heap provides heap operations for any type that implements heap.Interface.
mergesort/int32s
Package heap provides heap operations for any type that implements heap.Interface.
Package heap provides heap operations for any type that implements heap.Interface.
mergesort/int64s
Package heap provides heap operations for any type that implements heap.Interface.
Package heap provides heap operations for any type that implements heap.Interface.
mergesort/int8s
Package heap provides heap operations for any type that implements heap.Interface.
Package heap provides heap operations for any type that implements heap.Interface.
mergesort/uint16s
Package heap provides heap operations for any type that implements heap.Interface.
Package heap provides heap operations for any type that implements heap.Interface.
mergesort/uint32s
Package heap provides heap operations for any type that implements heap.Interface.
Package heap provides heap operations for any type that implements heap.Interface.
mergesort/uint64s
Package heap provides heap operations for any type that implements heap.Interface.
Package heap provides heap operations for any type that implements heap.Interface.
mergesort/uint8s
Package heap provides heap operations for any type that implements heap.Interface.
Package heap provides heap operations for any type that implements heap.Interface.
mergesort/varchar
Package heap provides heap operations for any type that implements heap.Interface.
Package heap provides heap operations for any type that implements heap.Interface.
index
bsi
kv
tpe
tuplecodec/test
Package mock_tuplecodec is a generated GoMock package.
Package mock_tuplecodec is a generated GoMock package.

Jump to

Keyboard shortcuts

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