sqlxutil

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: MIT Imports: 3 Imported by: 0

README

go-sqlxutil

go-sqlxutil is a simple library enhance the sqlx library.

Install

go get github.com/cosiner/go-sqlxutil

License

MIT.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(ext sqlx.Ext, sql string, args ...interface{}) (sql.Result, error)

func ExecContext

func ExecContext(ctx context.Context, ext sqlx.ExtContext, sql string, args ...interface{}) (sql.Result, error)

==============================================================================

Exec

==============================================================================

func Get

func Get(ext sqlx.Ext, ptr interface{}, sql string, args ...interface{}) error

func GetContext

func GetContext(ctx context.Context, ext sqlx.ExtContext, ptr interface{}, sql string, args ...interface{}) error

==============================================================================

Get

==============================================================================

func NamedExec

func NamedExec(ext sqlx.Ext, sql string, args interface{}) (sql.Result, error)

func NamedExecContext

func NamedExecContext(ctx context.Context, ext sqlx.ExtContext, sql string, args interface{}) (sql.Result, error)

func NamedGet

func NamedGet(ext sqlx.Ext, ptr interface{}, sql string, args interface{}) error

func NamedGetContext

func NamedGetContext(ctx context.Context, ext sqlx.ExtContext, ptr interface{}, sql string, args interface{}) error

func NamedSelect

func NamedSelect(ext sqlx.Ext, ptr interface{}, sql string, args interface{}) error

func NamedSelectContext

func NamedSelectContext(ctx context.Context, ext sqlx.ExtContext, ptr interface{}, sql string, args interface{}) error

func RebindExec

func RebindExec(ext sqlx.Ext, sql string, args ...interface{}) (sql.Result, error)

func RebindExecContext

func RebindExecContext(ctx context.Context, ext sqlx.ExtContext, sql string, args ...interface{}) (sql.Result, error)

func RebindGet

func RebindGet(ext sqlx.Ext, ptr interface{}, sql string, args ...interface{}) error

func RebindGetContext

func RebindGetContext(ctx context.Context, ext sqlx.ExtContext, ptr interface{}, sql string, args ...interface{}) error

func RebindSelect

func RebindSelect(ext sqlx.Ext, ptr interface{}, sql string, args ...interface{}) error

func RebindSelectContext

func RebindSelectContext(ctx context.Context, ext sqlx.ExtContext, ptr interface{}, sql string, args ...interface{}) error

func Select

func Select(ext sqlx.Ext, ptr interface{}, sql string, args ...interface{}) error

func SelectContext

func SelectContext(ctx context.Context, ext sqlx.ExtContext, ptr interface{}, sql string, args ...interface{}) error

==============================================================================

Select

==============================================================================

func WrapQueryer added in v0.0.2

func WrapQueryer(q Queryer) queryerWrapper

func WrapUpdater added in v0.0.2

func WrapUpdater(u Updater) updaterWrapper

Types

type Queryer

type Queryer interface {
	Exec(ext sqlx.Ext) error
	ExecContext(ctx context.Context, ext sqlx.ExtContext) error
}

==============================================================================

Op

==============================================================================

func GroupQueryers added in v0.0.3

func GroupQueryers(qs ...Queryer) Queryer

func NewNopQueryer added in v0.0.3

func NewNopQueryer() Queryer

func OpGet

func OpGet(sql string, ptr interface{}, args ...interface{}) Queryer

func OpNamedGet

func OpNamedGet(sql string, ptr, args interface{}) Queryer

func OpNamedSelect

func OpNamedSelect(sql string, ptr, args interface{}) Queryer

func OpRebindGet

func OpRebindGet(sql string, ptr interface{}, args ...interface{}) Queryer

func OpRebindSelect

func OpRebindSelect(sql string, ptr interface{}, args ...interface{}) Queryer

func OpSelect

func OpSelect(sql string, ptr interface{}, args ...interface{}) Queryer

type Updater

type Updater interface {
	Exec(ext sqlx.Ext) (sql.Result, error)
	ExecContext(ctx context.Context, ext sqlx.ExtContext) (sql.Result, error)
}

func GroupUpdaters added in v0.0.3

func GroupUpdaters(us ...Updater) Updater

func NewNopUpdater added in v0.0.3

func NewNopUpdater() Updater

func OpExec

func OpExec(sql string, args ...interface{}) Updater

func OpNamedExec

func OpNamedExec(sql string, args interface{}) Updater

func OpRebindExec

func OpRebindExec(sql string, args ...interface{}) Updater

Jump to

Keyboard shortcuts

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