Documentation ¶
Index ¶
- func NewComplexTx(optimizer proto.Optimizer) proto.DBGroupTx
- func NewDBGroup(appid, name string, algorithm config.LoadBalanceAlgorithm, ...) (proto.DBGroupExecutor, error)
- type ComplexTx
- func (tx *ComplexTx) Begin(ctx context.Context, executor proto.DBGroupExecutor) (proto.Tx, error)
- func (tx *ComplexTx) Close()
- func (tx *ComplexTx) Commit(ctx context.Context) (result proto.Result, err error)
- func (tx *ComplexTx) Execute(ctx context.Context, stmt ast.StmtNode, args ...interface{}) (proto.Result, uint16, error)
- func (tx *ComplexTx) Query(ctx context.Context, query string) (proto.Result, uint16, error)
- func (tx *ComplexTx) Rollback(ctx context.Context) (result proto.Result, err error)
- type DBGroup
- func (group *DBGroup) AddDB(db proto.DB)
- func (group *DBGroup) Begin(ctx context.Context) (proto.Tx, proto.Result, error)
- func (group *DBGroup) Execute(ctx context.Context, query string) (proto.Result, uint16, error)
- func (group *DBGroup) GroupName() string
- func (group *DBGroup) PrepareExecute(ctx context.Context, query string, args ...interface{}) (proto.Result, uint16, error)
- func (group *DBGroup) PrepareExecuteStmt(ctx context.Context, stmt *proto.Stmt) (proto.Result, uint16, error)
- func (group *DBGroup) PrepareQuery(ctx context.Context, query string, args ...interface{}) (proto.Result, uint16, error)
- func (group *DBGroup) Query(ctx context.Context, query string) (proto.Result, uint16, error)
- func (group *DBGroup) QueryAll(ctx context.Context, query string) (proto.Result, uint16, error)
- func (group *DBGroup) RemoveDB(name string)
- func (group *DBGroup) XAStart(ctx context.Context, sql string) (proto.Tx, proto.Result, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDBGroup ¶
func NewDBGroup(appid, name string, algorithm config.LoadBalanceAlgorithm, dataSources []*config.DataSourceRef) (proto.DBGroupExecutor, error)
Types ¶
type ComplexTx ¶ added in v0.5.0
type ComplexTx struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.