preallocdb

package
v1.1.0-beta.0...-b4c719a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2024 License: Apache-2.0, Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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 NewDB

func NewDB(g glue.Glue, store kv.Storage, policyMode string) (*DB, bool, error)

NewDB returns a new DB.

func (*DB) Close

func (db *DB) Close()

Close closes the connection.

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

func (db *DB) CreatePlacementPolicy(ctx context.Context, policy *model.PolicyInfo) error

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 *DB) CreateTablePostRestore(ctx context.Context, table *metautil.Table, toBeCorrectedTables map[restore.UniqueTableName]bool) error

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) ExecDDL

func (db *DB) ExecDDL(ctx context.Context, ddlJob *model.Job) error

ExecDDL executes the query of a ddl job.

func (*DB) RegisterPreallocatedIDs

func (db *DB) RegisterPreallocatedIDs(ids *prealloctableid.PreallocIDs)

func (*DB) Session

func (db *DB) Session() glue.Session

func (*DB) UpdateStatsMeta

func (db *DB) UpdateStatsMeta(ctx context.Context, tableID int64, restoreTS uint64, count uint64) error

UpdateStatsMeta update count and snapshot ts in mysql.stats_meta

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL