mysql

package
v2.13.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: LGPL-3.0 Imports: 4 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MySqlStore

type MySqlStore struct {
	*mysql.DB
}

func NewMySqlStore

func NewMySqlStore(db *mysql.DB) *MySqlStore

func NewStore

func NewStore(db *mysql.DB) *MySqlStore

func (*MySqlStore) BeginTx

func (s *MySqlStore) BeginTx(ctx context.Context) context.Context

func (*MySqlStore) Close

func (s *MySqlStore) Close() error

func (*MySqlStore) CommitTx

func (s *MySqlStore) CommitTx(ctx context.Context)

func (*MySqlStore) GetDB

func (s *MySqlStore) GetDB(ctx context.Context) *mysql.DB

func (*MySqlStore) GetError

func (s *MySqlStore) GetError(ctx context.Context) error

func (*MySqlStore) RollbackTx

func (s *MySqlStore) RollbackTx(ctx context.Context)

func (*MySqlStore) Transaction

func (s *MySqlStore) Transaction(ctx context.Context, fc func(txs *MySqlStore) error) (err error)

Transaction start a transaction as a block, return error will rollback, otherwise to commit.

Jump to

Keyboard shortcuts

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