compat

package
v3.8.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeginTx

func BeginTx(p TxStarter, ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)

func ExecContext

func ExecContext(p Execer, ctx context.Context, query string, args []interface{}) (sql.Result, error)

func PrepareContext

func PrepareContext(p Preparer, ctx context.Context, query string) (*sql.Stmt, error)

func PreparedExecContext

func PreparedExecContext(p PreparedExecer, ctx context.Context, args []interface{}) (sql.Result, error)

func PreparedQueryContext

func PreparedQueryContext(p PreparedQueryer, ctx context.Context, args []interface{}) (*sql.Rows, error)

func PreparedQueryRowContext

func PreparedQueryRowContext(p PreparedRowQueryer, ctx context.Context, args []interface{}) *sql.Row

func QueryContext

func QueryContext(p Queryer, ctx context.Context, query string, args []interface{}) (*sql.Rows, error)

func QueryRowContext

func QueryRowContext(p RowQueryer, ctx context.Context, query string, args []interface{}) *sql.Row

Types

type Execer

type Execer interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
}

type PreparedExecer

type PreparedExecer interface {
	ExecContext(context.Context, ...interface{}) (sql.Result, error)
}

type PreparedQueryer

type PreparedQueryer interface {
	QueryContext(context.Context, ...interface{}) (*sql.Rows, error)
}

type PreparedRowQueryer

type PreparedRowQueryer interface {
	QueryRowContext(context.Context, ...interface{}) *sql.Row
}

type Preparer

type Preparer interface {
	PrepareContext(context.Context, string) (*sql.Stmt, error)
}

type Queryer

type Queryer interface {
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
}

type RowQueryer

type RowQueryer interface {
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type TxStarter

type TxStarter interface {
	BeginTx(context.Context, *sql.TxOptions) (*sql.Tx, error)
}

Jump to

Keyboard shortcuts

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