Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateTableQueryExecutor ¶
type CreateTableQueryExecutor struct {
*QueryExecutorBase
}
CreateTableQueryExecutor inherits QueryExecutorBase structure
func NewCreateTableQueryExecutor ¶
func NewCreateTableQueryExecutor(base *QueryExecutorBase) *CreateTableQueryExecutor
NewCreateTableQueryExecutor creates instance of CreateTableQueryExecutor
func (*CreateTableQueryExecutor) Exec ¶
func (e *CreateTableQueryExecutor) Exec() (sql.Result, error)
Exec executes `CREATE TABLE` DDL for shards.
type DeleteQueryExecutor ¶
type DeleteQueryExecutor struct {
*QueryExecutorBase
}
DeleteQueryExecutor inherits QueryExecutorBase structure
func NewDeleteQueryExecutor ¶
func NewDeleteQueryExecutor(base *QueryExecutorBase) *DeleteQueryExecutor
NewDeleteQueryExecutor creates instance of DeleteQueryExecutor
func (*DeleteQueryExecutor) Exec ¶
func (e *DeleteQueryExecutor) Exec() (sql.Result, error)
Exec executes DELETE query for shards.
type DropQueryExecutor ¶
type DropQueryExecutor struct {
*QueryExecutorBase
}
DropQueryExecutor inherits QueryExecutorBase structure
func NewDropQueryExecutor ¶
func NewDropQueryExecutor(base *QueryExecutorBase) *DropQueryExecutor
NewDropQueryExecutor creates instance of DropQueryExecutor
func (*DropQueryExecutor) Exec ¶
func (e *DropQueryExecutor) Exec() (sql.Result, error)
Exec executes `DROP TABLE` DDL for shards
type InsertQueryExecutor ¶
type InsertQueryExecutor struct {
*QueryExecutorBase
}
InsertQueryExecutor inherits QueryExecutorBase structure
func NewInsertQueryExecutor ¶
func NewInsertQueryExecutor(base *QueryExecutorBase) *InsertQueryExecutor
NewInsertQueryExecutor creates instance of InsertQueryExecutor
func (*InsertQueryExecutor) Exec ¶
func (e *InsertQueryExecutor) Exec() (sql.Result, error)
Exec executes INSERT query for shards.
type QueryExecutor ¶
type QueryExecutor interface { Query() ([]*sql.Rows, error) QueryRow() (*sql.Row, error) Prepare() (*sql.Stmt, error) Stmt() (*sql.Stmt, error) Exec() (sql.Result, error) }
QueryExecutor the interface for executing query to shards
func NewQueryExecutor ¶
func NewQueryExecutor(ctx context.Context, conn *connection.DBConnection, tx *connection.TxConnection, query sqlparser.Query) QueryExecutor
NewQueryExecutor creates instance of QueryExecutor interface. If specify unknown query type, returns nil
type QueryExecutorBase ¶
type QueryExecutorBase struct {
// contains filtered or unexported fields
}
QueryExecutorBase a implementation of QueryExecutor interface.
type SelectQueryExecutor ¶
type SelectQueryExecutor struct {
*QueryExecutorBase
}
SelectQueryExecutor inherits QueryExecutorBase structure
func NewSelectQueryExecutor ¶
func NewSelectQueryExecutor(base *QueryExecutorBase) *SelectQueryExecutor
NewSelectQueryExecutor creates instance of SelectQueryExecutor
func (*SelectQueryExecutor) Exec ¶
func (e *SelectQueryExecutor) Exec() (sql.Result, error)
Exec doesn't support in SelectQueryExecutor, returns always error.
type ShowQueryExecutor ¶ added in v1.1.5
type ShowQueryExecutor struct {
*QueryExecutorBase
}
ShowQueryExecutor inherits QueryExecutorBase structure
func NewShowQueryExecutor ¶ added in v1.1.5
func NewShowQueryExecutor(base *QueryExecutorBase) *ShowQueryExecutor
NewShowQueryExecutor creates instance of ShowQueryExecutor
func (*ShowQueryExecutor) Exec ¶ added in v1.1.5
func (e *ShowQueryExecutor) Exec() (sql.Result, error)
Exec doesn't support in ShowQueryExecutor, returns always error.
type TruncateQueryExecutor ¶
type TruncateQueryExecutor struct {
*QueryExecutorBase
}
TruncateQueryExecutor inherits QueryExecutorBase structure
func NewTruncateQueryExecutor ¶
func NewTruncateQueryExecutor(base *QueryExecutorBase) *TruncateQueryExecutor
NewTruncateQueryExecutor creates instance of TruncateQueryExecutor
func (*TruncateQueryExecutor) Exec ¶
func (e *TruncateQueryExecutor) Exec() (sql.Result, error)
Exec executes `TRUNCATE TABLE` DDL for shards.
type UpdateQueryExecutor ¶
type UpdateQueryExecutor struct {
*QueryExecutorBase
}
UpdateQueryExecutor inherits QueryExecutorBase structure
func NewUpdateQueryExecutor ¶
func NewUpdateQueryExecutor(base *QueryExecutorBase) *UpdateQueryExecutor
NewUpdateQueryExecutor creates instance of UpdateQueryExecutor
func (*UpdateQueryExecutor) Exec ¶
func (e *UpdateQueryExecutor) Exec() (sql.Result, error)
Exec executes UPDATE query for shards.