Documentation ¶
Index ¶
- Constants
- Variables
- func AttrFromColDef(col *catalog.ColDef) (attrs *engine.Attribute, err error)
- 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 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.NewInternalErrorNoCtx("tae moengine: read only")
Functions ¶
func AttrFromColDef ¶ added in v0.7.0
func ColDefsToAttrs ¶ added in v0.6.0
func DefsToSchema ¶
func EngineToTxnClient ¶ added in v0.6.0
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 ForceCheckpoint(ctx context.Context, ts types.TS, flushDuration time.Duration) 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) GetSchema(ctx context.Context) *catalog.Schema UpdateConstraintWithBin(context.Context, []byte) error //Write just append data into txn's workspace, instead of applying data into state machine. //TODO::Add flag parameter to indicate whether tae need to // do deduplication check with transaction's workspace and snapshot data. Write(context.Context, *batch.Batch) error //AddBlksWithMetaLoc just add non-appendable blocks into txn's workspace. AddBlksWithMetaLoc(ctx context.Context, pks []containers.Vector, file string, metaloc []string, flag int32) error //Delete by primary key or physical addr. 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.