Documentation ¶
Index ¶
- Constants
- Variables
- type ConnectFunc
- type DB
- func (t *DB) Close() error
- func (t *DB) Job() *Job
- func (t *DB) Raw() *sql.DB
- func (t *DB) SetOpenConns(openConns, idleConns int)
- func (t *DB) TxJob(isoLevel sql.IsolationLevel, readonly bool) (tx *Tx, err error)
- func (t *DB) TxJobFunc(isoLevel sql.IsolationLevel, readonly bool, fn func(*Tx) error) (err error)
- type Job
- type Tx
Constants ¶
View Source
const (
TimeoutSleepSecond = 3
)
Variables ¶
View Source
var (
ErrTxClosed = errors.New("tx already commit or rollback")
)
Functions ¶
This section is empty.
Types ¶
type ConnectFunc ¶
func ConnectFuncMysql ¶
func ConnectFuncMysql(addr, port, id, pw, dbName string) ConnectFunc
func ConnectFuncPostgres ¶
func ConnectFuncPostgres(addr, port, id, pw, dbName string) ConnectFunc
func ConnectFuncSqlite3 ¶
func ConnectFuncSqlite3(dbName string) ConnectFunc
type DB ¶
type DB struct { DriverName string Dsn string DbName string // contains filtered or unexported fields }
func (*DB) SetOpenConns ¶
Click to show internal directories.
Click to hide internal directories.