Documentation ¶
Index ¶
- type DB
- func (db *DB) Close()
- func (db *DB) CreateDatabase(ctx context.Context, schema *model.DBInfo, supportPolicy bool, ...) error
- func (db *DB) CreatePlacementPolicy(ctx context.Context, policy *model.PolicyInfo) error
- func (db *DB) CreateTable(ctx context.Context, table *metautil.Table, ...) error
- func (db *DB) CreateTablePostRestore(ctx context.Context, table *metautil.Table, ...) error
- func (db *DB) CreateTables(ctx context.Context, tables []*metautil.Table, ...) error
- func (db *DB) ExecDDL(ctx context.Context, ddlJob *model.Job) error
- func (db *DB) RegisterPreallocatedIDs(ids *prealloctableid.PreallocIDs)
- func (db *DB) Session() glue.Session
- func (db *DB) UpdateStatsMeta(ctx context.Context, tableID int64, restoreTS uint64, count uint64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is a TiDB instance, not thread-safe.
func (*DB) CreateDatabase ¶
func (db *DB) CreateDatabase(ctx context.Context, schema *model.DBInfo, supportPolicy bool, policyMap *sync.Map) error
CreateDatabase executes a CREATE DATABASE SQL.
func (*DB) CreatePlacementPolicy ¶
CreatePlacementPolicy check whether cluster support policy and create the policy.
func (*DB) CreateTable ¶
func (db *DB) CreateTable(ctx context.Context, table *metautil.Table, ddlTables map[restore.UniqueTableName]bool, supportPolicy bool, policyMap *sync.Map) error
CreateTable executes a CREATE TABLE SQL.
func (*DB) CreateTablePostRestore ¶
func (*DB) CreateTables ¶
func (db *DB) CreateTables(ctx context.Context, tables []*metautil.Table, ddlTables map[restore.UniqueTableName]bool, supportPolicy bool, policyMap *sync.Map) error
CreateTables execute a internal CREATE TABLES.
func (*DB) RegisterPreallocatedIDs ¶
func (db *DB) RegisterPreallocatedIDs(ids *prealloctableid.PreallocIDs)
Click to show internal directories.
Click to hide internal directories.