Documentation ¶
Index ¶
- Variables
- type Pool
- func (p Pool) CreateTx() (sqlTx *sqlx.Tx, err error)
- func (p Pool) DB() *sqlx.DB
- func (p Pool) Exec(query string, args ...interface{}) (res sql.Result, err error)
- func (p Pool) NamedExec(query string, arg interface{}) (res sql.Result, err error)
- func (p Pool) NamedQuery(query string, arg interface{}) (res *sqlx.Rows, err error)
- func (p Pool) Ping() (err error)
- func (p Pool) Query(query string, args ...interface{}) (res *sql.Rows, err error)
- func (p Pool) Select(dest interface{}, query string, args ...interface{}) (err error)
- type Sql
- type SqlTx
- type Transaction
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (Pool) NamedQuery ¶
type Sql ¶
type Sql interface { DB() *sqlx.DB Ping() error CreateTx() (*sqlx.Tx, error) Exec(query string, args ...interface{}) (sql.Result, error) Query(query string, args ...interface{}) (*sql.Rows, error) NamedExec(query string, arg interface{}) (sql.Result, error) NamedQuery(query string, arg interface{}) (*sqlx.Rows, error) Select(dest interface{}, query string, args ...interface{}) error }
type SqlTx ¶
type SqlTx interface { NamedExec(query string, arg interface{}) (sql.Result, error) NamedQuery(query string, arg interface{}) (*sqlx.Rows, error) Commit() error Rollback() error }
func NewTransaction ¶
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (Transaction) Commit ¶
func (p Transaction) Commit() (err error)
func (Transaction) NamedExec ¶
func (p Transaction) NamedExec(query string, arg interface{}) (res sql.Result, err error)
func (Transaction) NamedQuery ¶
func (p Transaction) NamedQuery(query string, arg interface{}) (res *sqlx.Rows, err error)
func (Transaction) Rollback ¶
func (p Transaction) Rollback() (err error)
Click to show internal directories.
Click to hide internal directories.