Documentation
¶
Index ¶
- func GetTempTableName(DbName string, TblName string) string
- type Attribute
- type AttributeDef
- type ClusterByDef
- type CommentDef
- type Constraint
- type ConstraintDef
- type ConstraintType
- type Database
- type Engine
- type EntireEngine
- func (e *EntireEngine) Commit(ctx context.Context, op client.TxnOperator) error
- func (e *EntireEngine) Create(ctx context.Context, databaseName string, op client.TxnOperator) error
- func (e *EntireEngine) Database(ctx context.Context, databaseName string, op client.TxnOperator) (Database, error)
- func (e *EntireEngine) Databases(ctx context.Context, op client.TxnOperator) (databaseNames []string, err error)
- func (e *EntireEngine) Delete(ctx context.Context, databaseName string, op client.TxnOperator) error
- func (e *EntireEngine) GetNameById(ctx context.Context, op client.TxnOperator, tableId uint64) (dbName string, tblName string, err error)
- func (e *EntireEngine) GetRelationById(ctx context.Context, op client.TxnOperator, tableId uint64) (dbName string, tblName string, rel Relation, err error)
- func (e *EntireEngine) Hints() Hints
- func (e *EntireEngine) New(ctx context.Context, op client.TxnOperator) error
- func (e *EntireEngine) NewBlockReader(ctx context.Context, num int, ts timestamp.Timestamp, expr *plan.Expr, ...) ([]Reader, error)
- func (e *EntireEngine) Nodes() (cnNodes Nodes, err error)
- func (e *EntireEngine) Rollback(ctx context.Context, op client.TxnOperator) error
- type ForeignKeyDef
- type GetClusterDetailsFunc
- type Hints
- type IndexDef
- type IndexT
- type IndexTableDef
- type Node
- type Nodes
- type PartitionDef
- type PrimaryKeyDef
- type PropertiesDef
- type Property
- type Reader
- type RefChildTableDef
- type Relation
- type Statistics
- type TableDef
- type ViewDef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTempTableName ¶ added in v0.7.0
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
// Column ID
ID uint64
// 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
// Clusterby means sort by this column
ClusterBy bool
// Comment of attribute
Comment string
// AutoIncrement is auto incr or not
AutoIncrement bool
}
Attribute is a column
type AttributeDef ¶
type AttributeDef struct {
Attr Attribute
}
func (*AttributeDef) Format ¶
func (node *AttributeDef) Format(buf *bytes.Buffer)
type ClusterByDef ¶ added in v0.7.0
type ClusterByDef struct {
Name string
}
type CommentDef ¶
type CommentDef struct {
Comment string
}
type Constraint ¶ added in v0.7.0
type Constraint interface {
// contains filtered or unexported methods
}
type ConstraintDef ¶ added in v0.7.0
type ConstraintDef struct {
Cts []Constraint
}
func (*ConstraintDef) GetPrimaryKeyDef ¶ added in v0.7.0
func (c *ConstraintDef) GetPrimaryKeyDef() *PrimaryKeyDef
get the primary key definition in the constraint, and return null if there is no primary key
func (*ConstraintDef) MarshalBinary ¶ added in v0.7.0
func (c *ConstraintDef) MarshalBinary() (data []byte, err error)
func (*ConstraintDef) UnmarshalBinary ¶ added in v0.7.0
func (c *ConstraintDef) UnmarshalBinary(data []byte) error
type ConstraintType ¶ added in v0.7.0
type ConstraintType int8
const ( Index ConstraintType = iota RefChildTable ForeignKey PrimaryKey )
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) (uint64, 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)
// Get database name & table name by table id
GetNameById(ctx context.Context, op client.TxnOperator, tableId uint64) (dbName string, tblName string, err error)
// Get relation by table id
GetRelationById(ctx context.Context, op client.TxnOperator, tableId uint64) (dbName string, tblName string, rel Relation, err error)
}
type EntireEngine ¶ added in v0.7.0
type EntireEngine struct {
Engine Engine // original engine
TempEngine Engine // new engine for temporarily table
}
EntireEngine is a wrapper for Engine to support temporary table
func (*EntireEngine) Commit ¶ added in v0.7.0
func (e *EntireEngine) Commit(ctx context.Context, op client.TxnOperator) error
func (*EntireEngine) Create ¶ added in v0.7.0
func (e *EntireEngine) Create(ctx context.Context, databaseName string, op client.TxnOperator) error
func (*EntireEngine) Database ¶ added in v0.7.0
func (e *EntireEngine) Database(ctx context.Context, databaseName string, op client.TxnOperator) (Database, error)
func (*EntireEngine) Databases ¶ added in v0.7.0
func (e *EntireEngine) Databases(ctx context.Context, op client.TxnOperator) (databaseNames []string, err error)
func (*EntireEngine) Delete ¶ added in v0.7.0
func (e *EntireEngine) Delete(ctx context.Context, databaseName string, op client.TxnOperator) error
func (*EntireEngine) GetNameById ¶ added in v0.7.0
func (e *EntireEngine) GetNameById(ctx context.Context, op client.TxnOperator, tableId uint64) (dbName string, tblName string, err error)
func (*EntireEngine) GetRelationById ¶ added in v0.7.0
func (e *EntireEngine) GetRelationById(ctx context.Context, op client.TxnOperator, tableId uint64) (dbName string, tblName string, rel Relation, err error)
func (*EntireEngine) Hints ¶ added in v0.7.0
func (e *EntireEngine) Hints() Hints
func (*EntireEngine) New ¶ added in v0.7.0
func (e *EntireEngine) New(ctx context.Context, op client.TxnOperator) error
func (*EntireEngine) NewBlockReader ¶ added in v0.7.0
func (*EntireEngine) Nodes ¶ added in v0.7.0
func (e *EntireEngine) Nodes() (cnNodes Nodes, err error)
func (*EntireEngine) Rollback ¶ added in v0.7.0
func (e *EntireEngine) Rollback(ctx context.Context, op client.TxnOperator) error
type ForeignKeyDef ¶ added in v0.7.0
type ForeignKeyDef struct {
Fkeys []*plan.ForeignKeyDef
}
type GetClusterDetailsFunc ¶ added in v0.6.0
type GetClusterDetailsFunc = func() (logservicepb.ClusterDetails, error)
type IndexTableDef ¶
func (*IndexTableDef) Format ¶
func (node *IndexTableDef) Format(buf *bytes.Buffer)
type PartitionDef ¶ added in v0.6.0
type PartitionDef struct {
Partition string
}
type PrimaryKeyDef ¶ added in v0.7.0
type PrimaryKeyDef struct {
Pkey *plan.PrimaryKeyDef
}
type PropertiesDef ¶
type PropertiesDef struct {
Properties []Property
}
type RefChildTableDef ¶ added in v0.7.0
type RefChildTableDef struct {
Tables []uint64
}
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
// only ConstraintDef can be modified
UpdateConstraint(context.Context, *ConstraintDef) error
GetTableID(context.Context) uint64
// 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)
//max and min values
MaxAndMinValues(ctx context.Context) ([][2]any, []uint8, error)
}
type Statistics ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
tae
|
|
|
common
A few allocators for TAE
|
A few allocators for TAE |
|
logstore/samples/replay
command
|
|
|
logtail/service
This package implements client and server for logtail push model.
|
This package implements client and server for logtail push model. |
|
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. |
|
samples/sample1
command
|
|
|
samples/sample2
command
|
|
|
samples/sample3
command
|
|
Click to show internal directories.
Click to hide internal directories.