ddl

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlterTablePlan

type AlterTablePlan struct {
	plan.BasePlan

	Shards rule.DatabaseTables
	// contains filtered or unexported fields
}

func NewAlterTablePlan

func NewAlterTablePlan(stmt *ast.AlterTableStatement) *AlterTablePlan

func (*AlterTablePlan) ExecIn

func (at *AlterTablePlan) ExecIn(ctx context.Context, conn proto.VConn) (proto.Result, error)

func (*AlterTablePlan) Type

func (at *AlterTablePlan) Type() proto.PlanType

type CheckTablePlan

type CheckTablePlan struct {
	plan.BasePlan
	Stmt         *ast.CheckTableStmt
	Shards       rule.DatabaseTables
	ShardsByName map[string]rule.DatabaseTables
}

func NewCheckTablePlan

func NewCheckTablePlan(
	stmt *ast.CheckTableStmt,
	shards rule.DatabaseTables,
	shardsByName map[string]rule.DatabaseTables,
) *CheckTablePlan

func (*CheckTablePlan) ExecIn

func (c *CheckTablePlan) ExecIn(ctx context.Context, conn proto.VConn) (proto.Result, error)

func (*CheckTablePlan) Type

func (c *CheckTablePlan) Type() proto.PlanType

Type get plan type

type CreateIndexPlan

type CreateIndexPlan struct {
	plan.BasePlan

	Shards rule.DatabaseTables
	// contains filtered or unexported fields
}

func NewCreateIndexPlan

func NewCreateIndexPlan(stmt *ast.CreateIndexStatement) *CreateIndexPlan

func (*CreateIndexPlan) ExecIn

func (c *CreateIndexPlan) ExecIn(ctx context.Context, conn proto.VConn) (proto.Result, error)

func (*CreateIndexPlan) SetShard

func (c *CreateIndexPlan) SetShard(shard rule.DatabaseTables)

func (*CreateIndexPlan) Type

func (c *CreateIndexPlan) Type() proto.PlanType

type CreateTablePlan

type CreateTablePlan struct {
	plan.BasePlan
	Stmt     *ast.CreateTableStmt
	Database string
	Tables   []string
}

func NewCreateTablePlan

func NewCreateTablePlan(
	stmt *ast.CreateTableStmt,
	db string,
	tb []string,
) *CreateTablePlan

func (*CreateTablePlan) ExecIn

func (c *CreateTablePlan) ExecIn(ctx context.Context, conn proto.VConn) (proto.Result, error)

func (*CreateTablePlan) Type

func (c *CreateTablePlan) Type() proto.PlanType

Type get plan type

type DropIndexPlan

type DropIndexPlan struct {
	plan.BasePlan
	// contains filtered or unexported fields
}

func NewDropIndexPlan

func NewDropIndexPlan(stmt *ast.DropIndexStatement) *DropIndexPlan

func (*DropIndexPlan) ExecIn

func (d *DropIndexPlan) ExecIn(ctx context.Context, conn proto.VConn) (proto.Result, error)

func (*DropIndexPlan) SetShard

func (d *DropIndexPlan) SetShard(shard rule.DatabaseTables)

func (*DropIndexPlan) Type

func (d *DropIndexPlan) Type() proto.PlanType

type DropTablePlan

type DropTablePlan struct {
	plan.BasePlan
	// contains filtered or unexported fields
}

func NewDropTablePlan

func NewDropTablePlan(stmt *ast.DropTableStatement) *DropTablePlan

func (*DropTablePlan) ExecIn

func (d *DropTablePlan) ExecIn(ctx context.Context, conn proto.VConn) (proto.Result, error)

func (*DropTablePlan) SetShards

func (d *DropTablePlan) SetShards(shardsMap []rule.DatabaseTables)

func (*DropTablePlan) Type

func (d *DropTablePlan) Type() proto.PlanType

type DropTriggerPlan

type DropTriggerPlan struct {
	plan.BasePlan
	Stmt   *ast.DropTriggerStatement
	Shards rule.DatabaseTables
}

func (*DropTriggerPlan) ExecIn

func (d *DropTriggerPlan) ExecIn(ctx context.Context, conn proto.VConn) (proto.Result, error)

func (*DropTriggerPlan) Type

func (d *DropTriggerPlan) Type() proto.PlanType

type OptimizeTablePlan

type OptimizeTablePlan struct {
	plan.BasePlan
	Stmt         *ast.OptimizeTableStatement
	Shards       rule.DatabaseTables
	ShardsByName map[string]rule.DatabaseTables
}

func NewOptimizeTablePlan

func NewOptimizeTablePlan(
	stmt *ast.OptimizeTableStatement,
	shards rule.DatabaseTables,
	shardsByName map[string]rule.DatabaseTables,
) *OptimizeTablePlan

func (*OptimizeTablePlan) ExecIn

func (a *OptimizeTablePlan) ExecIn(ctx context.Context, conn proto.VConn) (proto.Result, error)

func (*OptimizeTablePlan) Type

func (a *OptimizeTablePlan) Type() proto.PlanType

Type get plan type

type RenameTablePlan

type RenameTablePlan struct {
	plan.BasePlan
	Stmt         *ast.RenameTableStatement
	Shards       rule.DatabaseTables
	ShardsByName map[string]rule.DatabaseTables
}

func NewRenameTablePlan

func NewRenameTablePlan(
	stmt *ast.RenameTableStatement,
	shards rule.DatabaseTables,
	shardsByName map[string]rule.DatabaseTables,
) *RenameTablePlan

func (*RenameTablePlan) ExecIn

func (d *RenameTablePlan) ExecIn(ctx context.Context, conn proto.VConn) (proto.Result, error)

func (*RenameTablePlan) Type

func (d *RenameTablePlan) Type() proto.PlanType

type RepairTablePlan

type RepairTablePlan struct {
	plan.BasePlan
	Stmt         *ast.RepairTableStmt
	Shards       rule.DatabaseTables
	ShardsByName map[string]rule.DatabaseTables
}

func NewRepairTablePlan

func NewRepairTablePlan(
	stmt *ast.RepairTableStmt,
	shards rule.DatabaseTables,
	shardsByName map[string]rule.DatabaseTables,
) *RepairTablePlan

func (*RepairTablePlan) ExecIn

func (c *RepairTablePlan) ExecIn(ctx context.Context, conn proto.VConn) (proto.Result, error)

func (*RepairTablePlan) Type

func (c *RepairTablePlan) Type() proto.PlanType

Type get plan type

type SetVariablePlan

type SetVariablePlan struct {
	plan.BasePlan
	Stmt *ast.SetStatement
}

func (*SetVariablePlan) ExecIn

func (d *SetVariablePlan) ExecIn(ctx context.Context, conn proto.VConn) (proto.Result, error)

func (*SetVariablePlan) Type

func (d *SetVariablePlan) Type() proto.PlanType

type TruncatePlan

type TruncatePlan struct {
	plan.BasePlan
	// contains filtered or unexported fields
}

func NewTruncatePlan

func NewTruncatePlan(stmt *ast.TruncateStatement) *TruncatePlan

NewTruncatePlan creates a truncate plan.

func (*TruncatePlan) ExecIn

func (s *TruncatePlan) ExecIn(ctx context.Context, conn proto.VConn) (proto.Result, error)

func (*TruncatePlan) SetShards

func (s *TruncatePlan) SetShards(shards rule.DatabaseTables)

func (*TruncatePlan) Type

func (s *TruncatePlan) Type() proto.PlanType

Jump to

Keyboard shortcuts

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