Versions in this module Expand all Collapse all v1 v1.1.0 Aug 19, 2025 v1.0.0 Aug 13, 2025 Changes in this version + func WithNestedTransaction(db *gorm.DB, fn TransactionFunc) error + func WithNestedTransactionContext(ctx context.Context, db *gorm.DB, fn TransactionFunc) error + func WithTransaction(db *gorm.DB, fn TransactionFunc) error + func WithTransactionContext(ctx context.Context, db *gorm.DB, fn TransactionFunc) error + type BaseModel struct + CreatedAt time.Time + DeletedAt *time.Time + ID uuid.UUID + UpdatedAt time.Time + func (b *BaseModel) BeforeCreate(tx *gorm.DB) error + func (b BaseModel) IsDeleted() bool + type DBManager struct + func OpenGorm(c GormConfig, automigrateModels ...interface{}) (*DBManager, error) + func (dm *DBManager) Close() error + func (dm *DBManager) Ping(ctx context.Context) error + func (dm *DBManager) Stats() sql.DBStats + type GormConfig struct + ConnMaxIdleTime time.Duration + ConnMaxLifetime time.Duration + Host string + IgnoreRecordNotFoundError bool + LogLevel logger.LogLevel + MaxIdleConns int + MaxOpenConns int + Name string + Password string + Port string + SSLMode string + SlowThreshold time.Duration + Timezone string + TranslateErrors bool + User string + type ID struct + ID uuid.UUID + func (i *ID) BeforeCreate(tx *gorm.DB) error + type JSONB map[string]any + func (j *JSONB) Scan(value any) error + func (j JSONB) Clone() JSONB + func (j JSONB) Delete(key string) + func (j JSONB) Get(key string) (any, bool) + func (j JSONB) GetBool(key string) (bool, bool) + func (j JSONB) GetInt(key string) (int, bool) + func (j JSONB) GetString(key string) (string, bool) + func (j JSONB) Has(key string) bool + func (j JSONB) IsEmpty() bool + func (j JSONB) Keys() []string + func (j JSONB) Set(key string, value any) + func (j JSONB) String() string + func (j JSONB) Value() (driver.Value, error) + type JSONBArray []any + func (j *JSONBArray) Scan(value any) error + func (j JSONBArray) Value() (driver.Value, error) + type NullableUUID struct + UUID uuid.UUID + Valid bool + func (nu *NullableUUID) Scan(value interface{}) error + func (nu NullableUUID) Value() (driver.Value, error) + type SoftDelete struct + DeletedAt *time.Time + func (s *SoftDelete) Delete() + func (s *SoftDelete) Restore() + func (s SoftDelete) IsDeleted() bool + type Timestamp struct + CreatedAt time.Time + UpdatedAt time.Time + type TransactionFunc func(*gorm.DB) error