Documentation
¶
Index ¶
- Constants
- Variables
- func ColDefsToAttrs(colDefs []*catalog.ColDef) (attrs []*engine.Attribute, err error)
- func DefsToSchema(name string, defs []engine.TableDef) (schema *catalog.Schema, err error)
- func EngineToTxnClient(engine TxnEngine) client.TxnClient
- func HandleDefsToSchema(name string, defs []engine.TableDef) (schema *catalog.Schema, err error)
- func NewEngine(impl *db.DB) *txnEngine
- func SchemaToDefs(schema *catalog.Schema) (defs []engine.TableDef, err error)
- func TxnToTxnOperator(tx Txn) client.TxnOperator
- type Database
- type Engine
- type Relation
- type Txn
- type TxnEngine
Constants ¶
View Source
const ADDR = "localhost:20000"
Variables ¶
View Source
var ErrReadOnly = moerr.NewInternalError("tae moengine: read only")
Functions ¶
func ColDefsToAttrs ¶ added in v0.6.0
func DefsToSchema ¶
func EngineToTxnClient ¶ added in v0.6.0
func HandleDefsToSchema ¶ added in v0.6.0
this function used in Precommit. CN won't give PrimaryIndexDef and ComputeIndexDef HandleDefsToSchema assume there is at most one AttributeDef with Primary true. TODO:
func TxnToTxnOperator ¶ added in v0.6.0
func TxnToTxnOperator(tx Txn) client.TxnOperator
Types ¶
type Database ¶ added in v0.6.0
type Database interface { RelationNames(context.Context) ([]string, error) GetRelation(context.Context, string) (Relation, error) GetRelationByID(context.Context, uint64) (Relation, error) DropRelation(context.Context, string) error DropRelationByID(context.Context, uint64) error TruncateRelationWithID(context.Context, string, uint64) error TruncateRelationByID(context.Context, uint64, uint64) error CreateRelation(context.Context, string, []engine.TableDef) error // Create Table - (name, table define) CreateRelationWithID(context.Context, string, uint64, []engine.TableDef) error // Create Table - (name, table define) GetDatabaseID(ctx context.Context) uint64 }
Database is only used by taeStorage
type Engine ¶ added in v0.6.0
type Engine interface { DropDatabase(ctx context.Context, databaseName string, txn Txn) error DropDatabaseByID(ctx context.Context, id uint64, txn Txn) error CreateDatabase(ctx context.Context, databaseName string, txn Txn) error CreateDatabaseWithID(ctx context.Context, databaseName, createSql string, id uint64, txn Txn) error // DatabaseNames returns all database names DatabaseNames(ctx context.Context, txn Txn) (databaseNames []string, err error) // GetDatabase returns a handle for a database GetDatabase(ctx context.Context, databaseName string, txn Txn) (Database, error) GetDatabaseByID(ctx context.Context, id uint64, txn Txn) (Database, error) // GetTAE returns tae db struct GetTAE(ctx context.Context) *db.DB FlushTable(ctx context.Context, tenantID uint32, databaseId, tableId uint64, ts types.TS) error }
moengine.Engine is only used by taeStorage
type Relation ¶ added in v0.6.0
type Relation interface { GetPrimaryKeys(context.Context) ([]*engine.Attribute, error) GetHideKeys(context.Context) ([]*engine.Attribute, error) Write(context.Context, *batch.Batch) error Delete(context.Context, *batch.Batch, string) error DeleteByPhyAddrKeys(context.Context, *vector.Vector) error TableDefs(context.Context) ([]engine.TableDef, error) GetRelationID(context.Context) uint64 //just for test // 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) ([]engine.Reader, error) }
Relation is only used by taeStorage
Click to show internal directories.
Click to hide internal directories.