Documentation ¶
Index ¶
- Constants
- type CreateIndexCommand
- func (c *CreateIndexCommand) AfterPhase(phase int32) error
- func (c *CreateIndexCommand) Before() error
- func (c *CreateIndexCommand) CommandType() DDLCommandType
- func (c *CreateIndexCommand) LockName() string
- func (c *CreateIndexCommand) NumPhases() int
- func (c *CreateIndexCommand) OnPhase(phase int32) error
- func (c *CreateIndexCommand) SQL() string
- func (c *CreateIndexCommand) SchemaName() string
- func (c *CreateIndexCommand) TableSequences() []uint64
- type CreateMVCommand
- func (c *CreateMVCommand) AfterPhase(phase int32) error
- func (c *CreateMVCommand) Before() error
- func (c *CreateMVCommand) CommandType() DDLCommandType
- func (c *CreateMVCommand) LockName() string
- func (c *CreateMVCommand) NumPhases() int
- func (c *CreateMVCommand) OnPhase(phase int32) error
- func (c *CreateMVCommand) SQL() string
- func (c *CreateMVCommand) SchemaName() string
- func (c *CreateMVCommand) TableSequences() []uint64
- type CreateSourceCommand
- func (c *CreateSourceCommand) AfterPhase(phase int32) error
- func (c *CreateSourceCommand) Before() error
- func (c *CreateSourceCommand) CommandType() DDLCommandType
- func (c *CreateSourceCommand) LockName() string
- func (c *CreateSourceCommand) NumPhases() int
- func (c *CreateSourceCommand) OnPhase(phase int32) error
- func (c *CreateSourceCommand) SQL() string
- func (c *CreateSourceCommand) SchemaName() string
- func (c *CreateSourceCommand) TableSequences() []uint64
- type DDLCommand
- type DDLCommandRunner
- type DDLCommandType
- type DropIndexCommand
- func (c *DropIndexCommand) AfterPhase(phase int32) error
- func (c *DropIndexCommand) Before() error
- func (c *DropIndexCommand) CommandType() DDLCommandType
- func (c *DropIndexCommand) LockName() string
- func (c *DropIndexCommand) NumPhases() int
- func (c *DropIndexCommand) OnPhase(phase int32) error
- func (c *DropIndexCommand) SQL() string
- func (c *DropIndexCommand) SchemaName() string
- func (c *DropIndexCommand) TableSequences() []uint64
- type DropMVCommand
- func (c *DropMVCommand) AfterPhase(phase int32) error
- func (c *DropMVCommand) Before() error
- func (c *DropMVCommand) CommandType() DDLCommandType
- func (c *DropMVCommand) LockName() string
- func (c *DropMVCommand) NumPhases() int
- func (c *DropMVCommand) OnPhase(phase int32) error
- func (c *DropMVCommand) SQL() string
- func (c *DropMVCommand) SchemaName() string
- func (c *DropMVCommand) TableSequences() []uint64
- type DropSourceCommand
- func (c *DropSourceCommand) AfterPhase(phase int32) error
- func (c *DropSourceCommand) Before() error
- func (c *DropSourceCommand) CommandType() DDLCommandType
- func (c *DropSourceCommand) LockName() string
- func (c *DropSourceCommand) NumPhases() int
- func (c *DropSourceCommand) OnPhase(phase int32) error
- func (c *DropSourceCommand) SQL() string
- func (c *DropSourceCommand) SchemaName() string
- func (c *DropSourceCommand) TableSequences() []uint64
- type Executor
- func (e *Executor) CreateExecutionContext(schema *common.Schema) *execctx.ExecutionContext
- func (e *Executor) ExecuteSQLStatement(execCtx *execctx.ExecutionContext, sql string, argTypes []common.ColumnType, ...) (exec.PullExecutor, error)
- func (e *Executor) FailureInjector() failinject.Injector
- func (e *Executor) GetPullEngine() *pull.Engine
- func (e *Executor) GetPushEngine() *push.Engine
- func (e *Executor) HandleMessage(notification remoting.ClusterMessage) (remoting.ClusterMessage, error)
- func (e *Executor) RunningCommands() int
- func (e *Executor) Start() error
- func (e *Executor) Stop() error
Constants ¶
View Source
const ( DDLCommandTypeCreateSource = iota DDLCommandTypeDropSource DDLCommandTypeCreateMV DDLCommandTypeDropMV DDLCommandTypeCreateIndex DDLCommandTypeDropIndex )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateIndexCommand ¶
type CreateIndexCommand struct {
// contains filtered or unexported fields
}
func NewCreateIndexCommand ¶
func NewCreateIndexCommand(e *Executor, schemaName string, createIndexSQL string, tableSequences []uint64) *CreateIndexCommand
func NewOriginatingCreateIndexCommand ¶
func NewOriginatingCreateIndexCommand(e *Executor, pl *parplan.Planner, schema *common.Schema, createIndexSQL string, tableSequences []uint64, ast *parser.CreateIndex) *CreateIndexCommand
func (*CreateIndexCommand) AfterPhase ¶
func (c *CreateIndexCommand) AfterPhase(phase int32) error
func (*CreateIndexCommand) Before ¶
func (c *CreateIndexCommand) Before() error
func (*CreateIndexCommand) CommandType ¶
func (c *CreateIndexCommand) CommandType() DDLCommandType
func (*CreateIndexCommand) LockName ¶
func (c *CreateIndexCommand) LockName() string
func (*CreateIndexCommand) NumPhases ¶
func (c *CreateIndexCommand) NumPhases() int
func (*CreateIndexCommand) OnPhase ¶
func (c *CreateIndexCommand) OnPhase(phase int32) error
func (*CreateIndexCommand) SQL ¶
func (c *CreateIndexCommand) SQL() string
func (*CreateIndexCommand) SchemaName ¶
func (c *CreateIndexCommand) SchemaName() string
func (*CreateIndexCommand) TableSequences ¶
func (c *CreateIndexCommand) TableSequences() []uint64
type CreateMVCommand ¶
type CreateMVCommand struct {
// contains filtered or unexported fields
}
func NewCreateMVCommand ¶
func NewCreateMVCommand(e *Executor, schemaName string, createMVSQL string, tableSequences []uint64) *CreateMVCommand
func NewOriginatingCreateMVCommand ¶
func NewOriginatingCreateMVCommand(e *Executor, pl *parplan.Planner, schema *common.Schema, sql string, tableSequences []uint64, ast *parser.CreateMaterializedView) *CreateMVCommand
func (*CreateMVCommand) AfterPhase ¶
func (c *CreateMVCommand) AfterPhase(phase int32) error
func (*CreateMVCommand) Before ¶
func (c *CreateMVCommand) Before() error
func (*CreateMVCommand) CommandType ¶
func (c *CreateMVCommand) CommandType() DDLCommandType
func (*CreateMVCommand) LockName ¶
func (c *CreateMVCommand) LockName() string
func (*CreateMVCommand) NumPhases ¶
func (c *CreateMVCommand) NumPhases() int
func (*CreateMVCommand) OnPhase ¶
func (c *CreateMVCommand) OnPhase(phase int32) error
func (*CreateMVCommand) SQL ¶
func (c *CreateMVCommand) SQL() string
func (*CreateMVCommand) SchemaName ¶
func (c *CreateMVCommand) SchemaName() string
func (*CreateMVCommand) TableSequences ¶
func (c *CreateMVCommand) TableSequences() []uint64
type CreateSourceCommand ¶
type CreateSourceCommand struct {
// contains filtered or unexported fields
}
func NewCreateSourceCommand ¶
func NewCreateSourceCommand(e *Executor, schemaName string, sql string, tableSequences []uint64) *CreateSourceCommand
func NewOriginatingCreateSourceCommand ¶
func NewOriginatingCreateSourceCommand(e *Executor, schemaName string, sql string, tableSequences []uint64, ast *parser.CreateSource) *CreateSourceCommand
func (*CreateSourceCommand) AfterPhase ¶
func (c *CreateSourceCommand) AfterPhase(phase int32) error
func (*CreateSourceCommand) Before ¶
func (c *CreateSourceCommand) Before() error
func (*CreateSourceCommand) CommandType ¶
func (c *CreateSourceCommand) CommandType() DDLCommandType
func (*CreateSourceCommand) LockName ¶
func (c *CreateSourceCommand) LockName() string
func (*CreateSourceCommand) NumPhases ¶
func (c *CreateSourceCommand) NumPhases() int
func (*CreateSourceCommand) OnPhase ¶
func (c *CreateSourceCommand) OnPhase(phase int32) error
func (*CreateSourceCommand) SQL ¶
func (c *CreateSourceCommand) SQL() string
func (*CreateSourceCommand) SchemaName ¶
func (c *CreateSourceCommand) SchemaName() string
func (*CreateSourceCommand) TableSequences ¶
func (c *CreateSourceCommand) TableSequences() []uint64
type DDLCommand ¶
type DDLCommand interface { CommandType() DDLCommandType SchemaName() string SQL() string TableSequences() []uint64 // Before is called on the originating node before the first phase Before() error // OnPhase is called on every node in the cluster passing in the phase OnPhase(phase int32) error // AfterPhase is called on the originating node once successful responses from the specified phase have been returned AfterPhase(phase int32) error LockName() string // NumPhases returns the number of phases in the command NumPhases() int }
func NewDDLCommand ¶
func NewDDLCommand(e *Executor, commandType DDLCommandType, schemaName string, sql string, tableSequences []uint64) DDLCommand
type DDLCommandRunner ¶
type DDLCommandRunner struct {
// contains filtered or unexported fields
}
func NewDDLCommandRunner ¶
func NewDDLCommandRunner(ce *Executor) *DDLCommandRunner
func (*DDLCommandRunner) HandleNotification ¶
func (d *DDLCommandRunner) HandleNotification(notification remoting.ClusterMessage) error
func (*DDLCommandRunner) RunCommand ¶
func (d *DDLCommandRunner) RunCommand(command DDLCommand) error
func (*DDLCommandRunner) RunWithLock ¶
func (d *DDLCommandRunner) RunWithLock(command DDLCommand, ddlInfo *notifications.DDLStatementInfo) error
type DDLCommandType ¶
type DDLCommandType int
type DropIndexCommand ¶
type DropIndexCommand struct {
// contains filtered or unexported fields
}
func NewDropIndexCommand ¶
func NewDropIndexCommand(e *Executor, schemaName string, sql string) *DropIndexCommand
func (*DropIndexCommand) AfterPhase ¶
func (c *DropIndexCommand) AfterPhase(phase int32) error
func (*DropIndexCommand) Before ¶
func (c *DropIndexCommand) Before() error
func (*DropIndexCommand) CommandType ¶
func (c *DropIndexCommand) CommandType() DDLCommandType
func (*DropIndexCommand) LockName ¶
func (c *DropIndexCommand) LockName() string
func (*DropIndexCommand) NumPhases ¶
func (c *DropIndexCommand) NumPhases() int
func (*DropIndexCommand) OnPhase ¶
func (c *DropIndexCommand) OnPhase(phase int32) error
func (*DropIndexCommand) SQL ¶
func (c *DropIndexCommand) SQL() string
func (*DropIndexCommand) SchemaName ¶
func (c *DropIndexCommand) SchemaName() string
func (*DropIndexCommand) TableSequences ¶
func (c *DropIndexCommand) TableSequences() []uint64
type DropMVCommand ¶
type DropMVCommand struct {
// contains filtered or unexported fields
}
func NewDropMVCommand ¶
func NewDropMVCommand(e *Executor, schemaName string, sql string) *DropMVCommand
func NewOriginatingDropMVCommand ¶
func NewOriginatingDropMVCommand(e *Executor, schemaName string, sql string, mvName string) *DropMVCommand
func (*DropMVCommand) AfterPhase ¶
func (c *DropMVCommand) AfterPhase(phase int32) error
func (*DropMVCommand) Before ¶
func (c *DropMVCommand) Before() error
func (*DropMVCommand) CommandType ¶
func (c *DropMVCommand) CommandType() DDLCommandType
func (*DropMVCommand) LockName ¶
func (c *DropMVCommand) LockName() string
func (*DropMVCommand) NumPhases ¶
func (c *DropMVCommand) NumPhases() int
func (*DropMVCommand) OnPhase ¶
func (c *DropMVCommand) OnPhase(phase int32) error
func (*DropMVCommand) SQL ¶
func (c *DropMVCommand) SQL() string
func (*DropMVCommand) SchemaName ¶
func (c *DropMVCommand) SchemaName() string
func (*DropMVCommand) TableSequences ¶
func (c *DropMVCommand) TableSequences() []uint64
type DropSourceCommand ¶
type DropSourceCommand struct {
// contains filtered or unexported fields
}
func NewDropSourceCommand ¶
func NewDropSourceCommand(e *Executor, schemaName string, sql string) *DropSourceCommand
func NewOriginatingDropSourceCommand ¶
func NewOriginatingDropSourceCommand(e *Executor, schemaName string, sql string, sourceName string) *DropSourceCommand
func (*DropSourceCommand) AfterPhase ¶
func (c *DropSourceCommand) AfterPhase(phase int32) error
func (*DropSourceCommand) Before ¶
func (c *DropSourceCommand) Before() error
func (*DropSourceCommand) CommandType ¶
func (c *DropSourceCommand) CommandType() DDLCommandType
func (*DropSourceCommand) LockName ¶
func (c *DropSourceCommand) LockName() string
func (*DropSourceCommand) NumPhases ¶
func (c *DropSourceCommand) NumPhases() int
func (*DropSourceCommand) OnPhase ¶
func (c *DropSourceCommand) OnPhase(phase int32) error
func (*DropSourceCommand) SQL ¶
func (c *DropSourceCommand) SQL() string
func (*DropSourceCommand) SchemaName ¶
func (c *DropSourceCommand) SchemaName() string
func (*DropSourceCommand) TableSequences ¶
func (c *DropSourceCommand) TableSequences() []uint64
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewCommandExecutor ¶
func (*Executor) CreateExecutionContext ¶
func (e *Executor) CreateExecutionContext(schema *common.Schema) *execctx.ExecutionContext
func (*Executor) ExecuteSQLStatement ¶
func (e *Executor) ExecuteSQLStatement(execCtx *execctx.ExecutionContext, sql string, argTypes []common.ColumnType, args []interface{}) (exec.PullExecutor, error)
ExecuteSQLStatement executes a synchronous SQL statement.
func (*Executor) FailureInjector ¶
func (e *Executor) FailureInjector() failinject.Injector
func (*Executor) GetPullEngine ¶
func (*Executor) GetPushEngine ¶
GetPushEngine is only used in testing
func (*Executor) HandleMessage ¶
func (e *Executor) HandleMessage(notification remoting.ClusterMessage) (remoting.ClusterMessage, error)
func (*Executor) RunningCommands ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.