engine

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	// IsHide whether the attribute is hidden or not
	IsHidden bool
	// IsRowId whether the attribute is rowid or not
	IsRowId bool
	// Name name of attribute
	Name string
	// Alg compression algorithm
	Alg compress.T
	// Type attribute's type
	Type types.Type
	// DefaultExpr default value of this attribute
	Default *plan.Default
	// to update col when define in create table
	OnUpdate *plan.OnUpdate
	// Primary is primary key or not
	Primary bool
	// Comment of attribute
	Comment string
	// AutoIncrement is auto incr or not
	AutoIncrement bool
}

Attribute is a column

func (*Attribute) Format

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

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 ComputeIndexDef added in v0.6.0

type ComputeIndexDef struct {
	IndexNames []string
	TableNames []string
	Uniques    []bool
	Fields     [][]string
}

type Database

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

	Delete(context.Context, string) error
	Create(context.Context, string, []TableDef) error // Create Table - (name, table define)
	Truncate(context.Context, string) error
	GetDatabaseId(context.Context) string
}

type Engine

type Engine interface {
	// transaction interface
	New(ctx context.Context, op client.TxnOperator) error
	Commit(ctx context.Context, op client.TxnOperator) error
	Rollback(ctx context.Context, op client.TxnOperator) error

	// Delete deletes a database
	Delete(ctx context.Context, databaseName string, op client.TxnOperator) error

	// Create creates a database
	Create(ctx context.Context, databaseName string, op client.TxnOperator) error

	// Databases returns all database names
	Databases(ctx context.Context, op client.TxnOperator) (databaseNames []string, err error)

	// Database creates a handle for a database
	Database(ctx context.Context, databaseName string, op client.TxnOperator) (Database, error)

	// Nodes returns all nodes for worker jobs
	Nodes() (cnNodes Nodes, err error)

	// Hints returns hints of engine features
	// return value should not be cached
	// since implementations may update hints after engine had initialized
	Hints() Hints

	NewBlockReader(ctx context.Context, num int, ts timestamp.Timestamp,
		expr *plan.Expr, ranges [][]byte, tblDef *plan.TableDef) ([]Reader, error)
}

type GetClusterDetailsFunc added in v0.6.0

type GetClusterDetailsFunc = func() (logservicepb.ClusterDetails, error)

type Hints added in v0.6.0

type Hints struct {
	CommitOrRollbackTimeout time.Duration
}

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 Node

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

type Nodes

type Nodes []Node

type PartitionDef added in v0.6.0

type PartitionDef struct {
	Partition string
}

type PrimaryIndexDef

type PrimaryIndexDef struct {
	Names []string
}

func (*PrimaryIndexDef) Format

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

type PropertiesDef

type PropertiesDef struct {
	Properties []Property
}

type Property

type Property struct {
	Key   string
	Value string
}

type Reader

type Reader interface {
	Close() error
	Read([]string, *plan.Expr, *mpool.MPool) (*batch.Batch, error)
}

type Relation

type Relation interface {
	Statistics

	Ranges(context.Context, *plan.Expr) ([][]byte, error)

	TableDefs(context.Context) ([]TableDef, error)

	GetPrimaryKeys(context.Context) ([]*Attribute, error)

	GetHideKeys(context.Context) ([]*Attribute, error)

	Write(context.Context, *batch.Batch) error

	Update(context.Context, *batch.Batch) error

	// Delete(context.Context, *vector.Vector, string) error
	Delete(context.Context, *batch.Batch, string) error

	AddTableDef(context.Context, TableDef) error
	DelTableDef(context.Context, TableDef) error

	GetTableID(context.Context) string

	// second argument is the number of reader, third argument is the filter extend, foruth parameter is the payload required by the engine
	NewReader(context.Context, int, *plan.Expr, [][]byte) ([]Reader, error)

	TableColumns(ctx context.Context) ([]*Attribute, error)
}

type Statistics

type Statistics interface {
	Rows(ctx context.Context) (int64, error)
	Size(ctx context.Context, columnName string) (int64, error)
}

type TableDef

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

type ViewDef added in v0.6.0

type ViewDef struct {
	View string
}

Directories

Path Synopsis
tae
common
A few allocators for TAE
A few allocators for TAE
db
mergesort/bools
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/decimal128s
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/decimal64s
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/numerics
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/rowid
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/txnts
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/uuids
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.
rpc
samples/sample1 command
samples/sample2 command
samples/sample3 command
stl
wal

Jump to

Keyboard shortcuts

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