gomodel

package module
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB added in v0.2.6

type DB struct {
	*sql.DB
}

func Open added in v0.2.6

func Open(driverName, dataSourceName string) (*DB, error)

func (*DB) BeginFn added in v0.2.6

func (db *DB) BeginFn(fn func(tx *sql.Tx) error) error

func (*DB) BeginTxFn added in v0.2.6

func (db *DB) BeginTxFn(ctx context.Context, opts *sql.TxOptions, fn func(tx *sql.Tx) error) (err error)

func (*DB) MustBegin added in v0.2.6

func (db *DB) MustBegin() *sql.Tx

func (*DB) MustBeginFn added in v0.2.6

func (db *DB) MustBeginFn(fn func(tx *sql.Tx) error)

func (*DB) MustBeginTx added in v0.2.6

func (db *DB) MustBeginTx(ctx context.Context, opts *sql.TxOptions) *sql.Tx

func (*DB) MustBeginTxFn added in v0.2.6

func (db *DB) MustBeginTxFn(ctx context.Context, opts *sql.TxOptions, fn func(tx *sql.Tx) error)

type Execer

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

Directories

Path Synopsis
cli module
cmd
gomodel module
internal

Jump to

Keyboard shortcuts

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