Documentation ¶
Index ¶
- func Begin(ctx context.Context, ops *sql.TxOptions) (*sqlx.Tx, error)
- func Exec(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func Get(ctx context.Context, dest interface{}, query string, args ...interface{}) error
- func MustBegin(ctx context.Context, ops *sql.TxOptions) *sqlx.Tx
- func Prepare(ctx context.Context, query string) (*sqlx.Stmt, error)
- func PrepareNamed(ctx context.Context, query string) (*sqlx.NamedStmt, error)
- func RNamedQuery(ctx context.Context, query string, arg interface{}) (*sqlx.Rows, error)
- func RQuery(ctx context.Context, query string, args ...interface{}) (*sqlx.Rows, error)
- func RQueryRow(ctx context.Context, query string, args ...interface{}) *sqlx.Row
- func Select(ctx context.Context, dest interface{}, query string, args ...interface{}) error
- func WNamedExec(ctx context.Context, query string, arg interface{}) (sql.Result, error)
- func WNamedQuery(ctx context.Context, query string, arg interface{}) (*sqlx.Rows, error)
- func WQuery(ctx context.Context, query string, args ...interface{}) (*sqlx.Rows, error)
- func WQueryRow(ctx context.Context, query string, args ...interface{}) *sqlx.Row
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Exec ¶
Exec executes a query without returning any rows. The args are for any placeholder parameters in the query.
func Get ¶
Get using this db. Any placeholder parameters are replaced with supplied args. An error is returned if the result set is empty.
func MustBegin ¶
MustBegin starts a transaction, and panics on error. Returns an *sqlx.Tx instead of an *sql.Tx.
func PrepareNamed ¶
PrepareNamed returns an sqlx.NamedStmt
func RNamedQuery ¶
RNamedQuery using this db. Any named placeholder parameters are replaced with fields from arg.
func RQuery ¶
RQuery queries the database and returns an *sqlx.Row. Any placeholder parameters are replaced with supplied args.
func RQueryRow ¶
RQueryRow queries the database and returns an *sqlx.Row. Any placeholder parameters are replaced with supplied args.
func WNamedExec ¶
WNamedExec using this db. Any named placeholder parameters are replaced with fields from arg.
func WNamedQuery ¶
WNamedQuery using this db. Any named placeholder parameters are replaced with fields from arg.
Types ¶
This section is empty.