Documentation
¶
Index ¶
- Variables
- type AppendCtx
- type ApplySnapshotCtx
- type CreateDBCtx
- type CreateIndexCtx
- type CreateSnapshotCtx
- type CreateTableCtx
- type DB
- func (d *DB) Append(ctx *AppendCtx) (err error)
- func (d *DB) ApplySnapshot(ctx *ApplySnapshotCtx) error
- func (d *DB) CreateDatabase(ctx *CreateDBCtx) (*metadata.Database, error)
- func (d *DB) CreateIndex(ctx *CreateIndexCtx) error
- func (d *DB) CreateSnapshot(ctx *CreateSnapshotCtx) (uint64, error)
- func (d *DB) CreateTable(ctx *CreateTableCtx) (*metadata.Table, error)
- func (d *DB) DropDatabase(ctx *DropDBCtx) (*metadata.Database, error)
- func (d *DB) DropIndex(ctx *DropIndexCtx) error
- func (d *DB) DropTable(ctx *DropTableCtx) (*metadata.Table, error)
- func (d *DB) ExecSplitDatabase(ctx *ExecSplitCtx) error
- func (d *DB) PrepareSplitDatabase(ctx *PrepareSplitCtx) (uint64, uint64, [][]byte, []byte, error)
- func (d *DB) Relation(dbName, tableName string) (*Relation, error)
- type DBMutationCtx
- type DBNameFactory
- type DropDBCtx
- type DropIndexCtx
- type DropTableCtx
- type ExecSplitCtx
- type Impl
- type PrepareSplitCtx
- type Relation
- func (r *Relation) Attribute() []engine.Attribute
- func (r *Relation) Close() error
- func (r *Relation) ID() string
- func (r *Relation) Index() []*engine.IndexTableDef
- func (r *Relation) Rows() int64
- func (r *Relation) Segment(id uint64) aoe.Segment
- func (r *Relation) SegmentIds() dbi.IDS
- func (r *Relation) Size(attr string) int64
- func (r *Relation) Write(ctx *AppendCtx) error
- type TableMutationCtx
Constants ¶
This section is empty.
Variables ¶
View Source
var IDToNameFactory = new(idToNameFactory)
Functions ¶
This section is empty.
Types ¶
type AppendCtx ¶
type AppendCtx struct {
TableMutationCtx
Data *batch.Batch
}
func (*AppendCtx) ToLogIndex ¶
type ApplySnapshotCtx ¶
type CreateDBCtx ¶
type CreateDBCtx = DBMutationCtx
type CreateIndexCtx ¶
type CreateIndexCtx struct {
DBMutationCtx
Table string
Indices *db.IndexSchema
}
type CreateSnapshotCtx ¶
type CreateTableCtx ¶
type CreateTableCtx struct {
DBMutationCtx
Schema *db.TableSchema
Indice *db.IndexSchema
}
type DB ¶
type DB struct {
Impl
}
func (*DB) ApplySnapshot ¶
func (d *DB) ApplySnapshot(ctx *ApplySnapshotCtx) error
func (*DB) CreateDatabase ¶
func (d *DB) CreateDatabase(ctx *CreateDBCtx) (*metadata.Database, error)
FIXME: Log index first. Since the shard is should be defined first, we have to prepare create first to get a shard id and then use the shard id to log wal
func (*DB) CreateIndex ¶
func (d *DB) CreateIndex(ctx *CreateIndexCtx) error
func (*DB) CreateSnapshot ¶
func (d *DB) CreateSnapshot(ctx *CreateSnapshotCtx) (uint64, error)
func (*DB) CreateTable ¶
func (d *DB) CreateTable(ctx *CreateTableCtx) (*metadata.Table, error)
func (*DB) DropDatabase ¶
func (*DB) DropIndex ¶
func (d *DB) DropIndex(ctx *DropIndexCtx) error
func (*DB) DropTable ¶
func (d *DB) DropTable(ctx *DropTableCtx) (*metadata.Table, error)
func (*DB) ExecSplitDatabase ¶
func (d *DB) ExecSplitDatabase(ctx *ExecSplitCtx) error
func (*DB) PrepareSplitDatabase ¶
type DBMutationCtx ¶
func (*DBMutationCtx) ToLogIndex ¶
func (ctx *DBMutationCtx) ToLogIndex(database *metadata.Database) *db.LogIndex
type DBNameFactory ¶
type DropDBCtx ¶
type DropDBCtx = DBMutationCtx
type DropIndexCtx ¶
type DropIndexCtx struct {
DBMutationCtx
Table string
IndexNames []string
}
type DropTableCtx ¶
type DropTableCtx = TableMutationCtx
type ExecSplitCtx ¶
type ExecSplitCtx struct {
DBMutationCtx
NewNames []string
RenameTable db.RenameTableFactory
SplitKeys [][]byte
SplitCtx []byte
}
type PrepareSplitCtx ¶
type Relation ¶
type Relation struct {
Data iface.ITableData
DBImpl *DB
Meta *md.Table
// contains filtered or unexported fields
}
Relation is a high-level abstraction provided for the upper layer, contains the table data, schema, and the segments it refers to.
func NewRelation ¶
func (*Relation) Index ¶
func (r *Relation) Index() []*engine.IndexTableDef
func (*Relation) SegmentIds ¶
type TableMutationCtx ¶
type TableMutationCtx struct {
DBMutationCtx
Table string
}
Click to show internal directories.
Click to hide internal directories.