Versions in this module Expand all Collapse all v0 v0.2.1 Jan 16, 2023 Changes in this version + func IsNoRecordErr(err error) bool + type DSN struct + DBName string + LogLevel int + Password string + Port string + PreStmt bool + SkipTran bool + URL string + Username string + func (d DSN) MySQL() string + func (d DSN) Postgres() string + type IGormOpt interface + BatchInsert func(value any, batchSize int, conds ...clause.Expression) error + BatchInsertTb func(tb string, value any, batchSize int, conds ...clause.Expression) error + Close func() + CreateTable func(dst any) error + ExecSQL func(sql string, values ...any) (int64, error) + GetGormDB func() *gorm.DB + Insert func(value any, conds ...clause.Expression) error + InsertTb func(tb string, value any, conds ...clause.Expression) error + IsConflictErr func(err error) bool + Query func(dest any, stmt string, values ...any) error + QueryRow func(hand func(*gorm.DB, *sql.Row) error, sql string, values ...any) error + QueryRows func(hand func(*gorm.DB, *sql.Rows) error, sql string, values ...any) error + func MustOpen(dial gorm.Dialector, d DSN) IGormOpt + func MustOpenMySQL(d DSN) IGormOpt + func MustOpenPostgres(d DSN) IGormOpt + type StmtDB struct + func NewStmtDB(db *sqlx.DB) *StmtDB + func (s *StmtDB) CloseDB() + func (s *StmtDB) DeferLock() func() + func (s *StmtDB) Lock() + func (s *StmtDB) NStmt(sqlStr string) (stmt *sqlx.NamedStmt, err error) + func (s *StmtDB) Stmt(sqlStr string) (stmt *sqlx.Stmt, err error) + func (s *StmtDB) Unlock()