Versions in this module Expand all Collapse all v1 v1.1.0 Apr 1, 2026 Changes in this version + func GetDriverAndDSN(dbType string, enableLog bool, dsn string) (driver string, connString string) + func New(dbType, dbPsn string, enableLog bool) (*gorm.DB, error) + func NewWithConfig(dialect, dbPsn string, cfg *gorm.Config) (db *gorm.DB, err error) + func Transaction(db *gorm.DB, fn InTransaction) (err error) + type DB struct + GDB *gorm.DB + Model interface{} + func NewDB(model interface{}) *DB + func (cdb *DB) Create(ctx context.Context, db *gorm.DB, input interface{}) error + func (cdb *DB) CreateInBatches(ctx context.Context, db *gorm.DB, input interface{}, batchSize int) error + func (cdb *DB) Delete(ctx context.Context, db *gorm.DB, cond ...interface{}) error + func (cdb *DB) DeletePermanently(ctx context.Context, db *gorm.DB, cond ...interface{}) error + func (cdb *DB) Exist(ctx context.Context, db *gorm.DB, cond ...interface{}) (bool, error) + func (cdb *DB) List(ctx context.Context, db *gorm.DB, output interface{}, lq *ListQueryCondition, ...) error + func (cdb *DB) ParseCond(cond ...interface{}) []interface{} + func (cdb *DB) Update(ctx context.Context, db *gorm.DB, updates interface{}, cond ...interface{}) error + func (cdb *DB) View(ctx context.Context, db *gorm.DB, output interface{}, cond ...interface{}) error + type InTransaction func(tx *gorm.DB) error + type Intf interface + Create func(ctx context.Context, db *gorm.DB, input interface{}) error + CreateInBatches func(ctx context.Context, db *gorm.DB, input interface{}, batchSize int) error + Delete func(ctx context.Context, db *gorm.DB, cond ...interface{}) error + DeletePermanently func(ctx context.Context, db *gorm.DB, cond ...interface{}) error + Exist func(ctx context.Context, db *gorm.DB, cond ...interface{}) (bool, error) + List func(ctx context.Context, db *gorm.DB, output interface{}, lq *ListQueryCondition, ...) error + ParseCond func(cond ...interface{}) []interface{} + Update func(ctx context.Context, db *gorm.DB, updates interface{}, cond ...interface{}) error + View func(ctx context.Context, db *gorm.DB, output interface{}, cond ...interface{}) error + type ListQueryCondition struct + Filter *gowhere.Plan + Page int + PerPage int + Sort []string