Documentation
¶
Index ¶
- type MysqlTransaction
- type TansactionConnection
- func (c *TansactionConnection) Exec(ctx context.Context, sqlStr string, params ...interface{}) (common.Result, error)
- func (c *TansactionConnection) Prepare(sqlStr string) (statement.Statement, error)
- func (c *TansactionConnection) Query(ctx context.Context, result reflection.Object, sqlStr string, ...) error
- type Transaction
- type TransactionStatement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MysqlTransaction ¶
type MysqlTransaction struct {
// contains filtered or unexported fields
}
func NewMysqlTransaction ¶
func NewMysqlTransaction(ds datasource.DataSource, db *sql.DB) *MysqlTransaction
func (*MysqlTransaction) Begin ¶
func (trans *MysqlTransaction) Begin() error
func (*MysqlTransaction) Close ¶
func (trans *MysqlTransaction) Close()
func (*MysqlTransaction) Commit ¶
func (trans *MysqlTransaction) Commit() error
func (*MysqlTransaction) GetConnection ¶
func (trans *MysqlTransaction) GetConnection() connection.Connection
func (*MysqlTransaction) Rollback ¶
func (trans *MysqlTransaction) Rollback() error
type TansactionConnection ¶
type TansactionConnection struct {
// contains filtered or unexported fields
}
func (*TansactionConnection) Exec ¶
func (*TansactionConnection) Prepare ¶
func (c *TansactionConnection) Prepare(sqlStr string) (statement.Statement, error)
func (*TansactionConnection) Query ¶
func (c *TansactionConnection) Query(ctx context.Context, result reflection.Object, sqlStr string, params ...interface{}) error
type Transaction ¶
type Transaction interface { Close() GetConnection() connection.Connection Begin() error Commit() error Rollback() error }
type TransactionStatement ¶
type TransactionStatement struct {
// contains filtered or unexported fields
}
func (*TransactionStatement) Close ¶
func (s *TransactionStatement) Close()
func (*TransactionStatement) Exec ¶
func (*TransactionStatement) Query ¶
func (s *TransactionStatement) Query(ctx context.Context, result reflection.Object, params ...interface{}) error
Source Files
¶
- mysql_transaction.go
- transaction.go
Click to show internal directories.
Click to hide internal directories.