Documentation ¶
Index ¶
- type DB
- type ErrStmtNotFound
- type Querier
- type SqlxDB
- func (db SqlxDB) Beginx() (Tx, error)
- func (db SqlxDB) DB() *sqlx.DB
- func (db SqlxDB) Exec(name string, args ...interface{}) (sql.Result, error)
- func (db SqlxDB) Get(dest interface{}, name string, args ...interface{}) error
- func (db SqlxDB) NamedExec(name string, arg interface{}) (sql.Result, error)
- func (db SqlxDB) Query(name string, args ...interface{}) (*sql.Rows, error)
- func (db SqlxDB) QueryRow(name string, args ...interface{}) *sql.Row
- func (db SqlxDB) Select(dest interface{}, name string, args ...interface{}) error
- type SqlxTx
- func (tx SqlxTx) Commit() error
- func (tx SqlxTx) Exec(name string, args ...interface{}) (sql.Result, error)
- func (tx SqlxTx) Get(dest interface{}, name string, args ...interface{}) error
- func (tx SqlxTx) NamedExec(name string, arg interface{}) (sql.Result, error)
- func (tx SqlxTx) Query(name string, args ...interface{}) (*sql.Rows, error)
- func (tx SqlxTx) QueryRow(name string, args ...interface{}) *sql.Row
- func (tx SqlxTx) Rollback() error
- func (tx SqlxTx) Select(dest interface{}, name string, args ...interface{}) error
- type Tx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { Query(name string, args ...interface{}) (*sql.Rows, error) QueryRow(name string, args ...interface{}) *sql.Row Get(dest interface{}, name string, args ...interface{}) error Select(dest interface{}, name string, args ...interface{}) error Exec(name string, args ...interface{}) (sql.Result, error) NamedExec(name string, arg interface{}) (sql.Result, error) Beginx() (Tx, error) DB() *sqlx.DB }
type ErrStmtNotFound ¶
type ErrStmtNotFound string
func (ErrStmtNotFound) Error ¶
func (err ErrStmtNotFound) Error() string
type Querier ¶
type Querier interface { Query(name string, args ...interface{}) (*sql.Rows, error) QueryRow(name string, args ...interface{}) *sql.Row Get(dest interface{}, name string, args ...interface{}) error Select(dest interface{}, name string, args ...interface{}) error Exec(name string, args ...interface{}) (sql.Result, error) NamedExec(name string, arg interface{}) (sql.Result, error) }
type SqlxDB ¶
type SqlxDB struct {
// contains filtered or unexported fields
}
type SqlxTx ¶
type SqlxTx struct {
// contains filtered or unexported fields
}
type Tx ¶
type Tx interface { Query(name string, args ...interface{}) (*sql.Rows, error) QueryRow(name string, args ...interface{}) *sql.Row Get(dest interface{}, name string, args ...interface{}) error Select(dest interface{}, name string, args ...interface{}) error Exec(name string, args ...interface{}) (sql.Result, error) NamedExec(name string, arg interface{}) (sql.Result, error) Commit() error Rollback() error }
Click to show internal directories.
Click to hide internal directories.