sqlxcache

package
v0.0.0-...-d2cf98a Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TxContextKey = transactionContextKey("sqlx.tx")

Functions

This section is empty.

Types

type DB

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

func Open

func Open(ctx context.Context, driverName, url string) (*DB, error)

func (*DB) Begin

func (db *DB) Begin(ctx context.Context) (*sqlx.Tx, error)

func (*DB) DriverName

func (db *DB) DriverName() string

func (*DB) ExecContext

func (db *DB) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)

func (*DB) Get

func (db *DB) Get(dest interface{}, query string, args ...interface{}) error

func (*DB) GetContext

func (db *DB) GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error

func (*DB) NamedExecContext

func (db *DB) NamedExecContext(ctx context.Context, query string, arg interface{}) (sql.Result, error)

func (*DB) NamedGetContext

func (db *DB) NamedGetContext(ctx context.Context, dest interface{}, query string, arg interface{}) error

func (*DB) NamedQueryContext

func (db *DB) NamedQueryContext(ctx context.Context, query string, arg interface{}) (*sqlx.Rows, error)

func (*DB) NamedSelectContext

func (db *DB) NamedSelectContext(ctx context.Context, dest interface{}, query string, arg interface{}) error

func (*DB) QueryxContext

func (db *DB) QueryxContext(ctx context.Context, query string, args ...interface{}) (*sqlx.Rows, error)

func (*DB) Rebind

func (db *DB) Rebind(sql string) string

func (*DB) Select

func (db *DB) Select(dest interface{}, query string, args ...interface{}) error

func (*DB) SelectContext

func (db *DB) SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error

func (*DB) Transaction

func (db *DB) Transaction(ctx context.Context) (tx *sqlx.Tx)

func (*DB) WithNewOwnedTransaction

func (db *DB) WithNewOwnedTransaction(ctx context.Context, fn func(context.Context, *sqlx.Tx) error) error

func (*DB) WithNewTransaction

func (db *DB) WithNewTransaction(ctx context.Context, fn func(context.Context) error) error

Jump to

Keyboard shortcuts

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