group

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewComplexTx added in v0.5.0

func NewComplexTx(optimizer proto.Optimizer) proto.DBGroupTx

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
}

func (*ComplexTx) Begin added in v0.5.0

func (tx *ComplexTx) Begin(ctx context.Context, executor proto.DBGroupExecutor) (proto.Tx, error)

func (*ComplexTx) Close added in v0.5.0

func (tx *ComplexTx) Close()

func (*ComplexTx) Commit added in v0.5.0

func (tx *ComplexTx) Commit(ctx context.Context) (result proto.Result, err error)

func (*ComplexTx) Execute added in v0.5.0

func (tx *ComplexTx) Execute(ctx context.Context, stmt ast.StmtNode, args ...interface{}) (proto.Result, uint16, error)

func (*ComplexTx) Query added in v0.5.0

func (tx *ComplexTx) Query(ctx context.Context, query string) (proto.Result, uint16, error)

func (*ComplexTx) Rollback added in v0.5.0

func (tx *ComplexTx) Rollback(ctx context.Context) (result proto.Result, err error)

type DBGroup

type DBGroup struct {
	// contains filtered or unexported fields
}

func (*DBGroup) AddDB

func (group *DBGroup) AddDB(db proto.DB)

func (*DBGroup) Begin

func (group *DBGroup) Begin(ctx context.Context) (proto.Tx, proto.Result, error)

func (*DBGroup) Execute

func (group *DBGroup) Execute(ctx context.Context, query string) (proto.Result, uint16, error)

func (*DBGroup) GroupName

func (group *DBGroup) GroupName() string

func (*DBGroup) PrepareExecute

func (group *DBGroup) PrepareExecute(ctx context.Context, query string, args ...interface{}) (proto.Result, uint16, error)

func (*DBGroup) PrepareExecuteStmt

func (group *DBGroup) PrepareExecuteStmt(ctx context.Context, stmt *proto.Stmt) (proto.Result, uint16, error)

func (*DBGroup) PrepareQuery

func (group *DBGroup) PrepareQuery(ctx context.Context, query string, args ...interface{}) (proto.Result, uint16, error)

func (*DBGroup) Query

func (group *DBGroup) Query(ctx context.Context, query string) (proto.Result, uint16, error)

func (*DBGroup) QueryAll

func (group *DBGroup) QueryAll(ctx context.Context, query string) (proto.Result, uint16, error)

func (*DBGroup) RemoveDB

func (group *DBGroup) RemoveDB(name string)

func (*DBGroup) XAStart added in v0.5.0

func (group *DBGroup) XAStart(ctx context.Context, sql string) (proto.Tx, proto.Result, error)

Jump to

Keyboard shortcuts

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