Documentation
¶
Index ¶
- func BatchInsert(gdb *gorm.DB, value any, batchSize int, conds ...clause.Expression) error
- func CloseDB(gdb *gorm.DB)
- func CreateTable(gdb *gorm.DB, dst any) error
- func Insert(gdb *gorm.DB, value any, conds ...clause.Expression) error
- func IsConflictErr(err error) bool
- func IsNoRecordErr(err error) bool
- func MustOpen(dial gorm.Dialector, d DSN) *gorm.DB
- func MustOpenMySQL(d DSN) *gorm.DB
- func MustOpenPostgres(d DSN) *gorm.DB
- func QueryRows(gdb *gorm.DB, hand func(*gorm.DB, *sql.Rows) error, sql string, values ...any) (err error)
- type DSN
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchInsert ¶
BatchInsert 批量插入数据
func MustOpenPostgres ¶
MustOpenPostgres 无错的连接Postgres返回*gorm.DB
Types ¶
Click to show internal directories.
Click to hide internal directories.