mysql

package
v0.0.0-...-286033a Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCustomerRepository

func NewCustomerRepository(db *sql.DB) repository.CustomerRepository

func NewMySQLDB

func NewMySQLDB(ctx context.Context) (*sql.DB, error)

func NewTransactionRepository

func NewTransactionRepository(db *sql.DB) repository.TransactionRepository

func TxFromCtx

func TxFromCtx(ctx context.Context) *sql.Tx

Types

type SQLExecutor

type SQLExecutor interface {
	ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
	QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
	QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
}

type TxKey

type TxKey string

func CtxTxKey

func CtxTxKey() TxKey

Jump to

Keyboard shortcuts

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