Documentation ¶
Index ¶
- func DefaultTxOptions() *sql.TxOptions
- func NewGormDB(opts ...Option)
- type DB
- type DBCfg
- type Option
- type SqlxDB
- func (_sqlxDB *SqlxDB) In(format string, args ...interface{}) (string, []interface{}, error)
- func (_sqlxDB *SqlxDB) SqlxBeginTx(opts TxOption, cbs ...func(tx *sqlx.Tx, ctx context.Context) error) error
- func (_sqlxDB *SqlxDB) SqlxExec(format string, args ...interface{}) (sql.Result, error)
- func (_sqlxDB *SqlxDB) SqlxGet(dest interface{}, format string, args ...interface{}) error
- func (_sqlxDB *SqlxDB) SqlxNameExec(format string, arg interface{}) (sql.Result, error)
- func (_sqlxDB *SqlxDB) SqlxNameQuery(format string, args interface{}, cb func(rows *sqlx.Rows) error) error
- func (_sqlxDB *SqlxDB) SqlxQuery(format string, args []interface{}, cb func(rows *sqlx.Rows) error) error
- func (_sqlxDB *SqlxDB) SqlxQueryRow(format string, args []interface{}, cb func(row *sqlx.Row) error) error
- func (_sqlxDB *SqlxDB) SqlxSelect(dest interface{}, format string, args ...interface{}) error
- type TxOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultTxOptions ¶
Types ¶
type DBCfg ¶
type DBCfg struct { DriveName string DataSourceName string MaxIdleConnection int MaxOpenConnection int MaxQueryTime time.Duration }
func DefaultDBOption ¶
func DefaultDBOption() *DBCfg
type Option ¶
type Option func(cfg *DBCfg)
func DataSourceName ¶
func MaxIdleConnection ¶
func MaxOpenConnection ¶
func MaxQueryTime ¶
type SqlxDB ¶
func (*SqlxDB) SqlxBeginTx ¶
func (*SqlxDB) SqlxNameExec ¶
func (*SqlxDB) SqlxNameQuery ¶
func (*SqlxDB) SqlxQueryRow ¶
func (*SqlxDB) SqlxSelect ¶
Click to show internal directories.
Click to hide internal directories.