Versions in this module Expand all Collapse all v0 v0.2.0 Feb 20, 2026 v0.1.0 Feb 20, 2026 Changes in this version + type PoolConfig struct + ConnMaxIdleTime time.Duration + ConnMaxLifetime time.Duration + HealthCheckInterval time.Duration + MaxIdleConns int + MaxOpenConns int + func DefaultPoolConfig() PoolConfig + type PoolManager struct + func NewPoolManager(db *gorm.DB, config PoolConfig, logger *zap.Logger) (*PoolManager, error) + func (pm *PoolManager) Close() error + func (pm *PoolManager) DB() *gorm.DB + func (pm *PoolManager) GetStats() PoolStats + func (pm *PoolManager) Ping(ctx context.Context) error + func (pm *PoolManager) Stats() sql.DBStats + func (pm *PoolManager) WithTransaction(ctx context.Context, fn TransactionFunc) error + func (pm *PoolManager) WithTransactionRetry(ctx context.Context, maxRetries int, fn TransactionFunc) error + type PoolStats struct + Idle int + InUse int + MaxIdleClosed int64 + MaxLifetimeClosed int64 + MaxOpenConnections int + OpenConnections int + WaitCount int64 + WaitDuration time.Duration + type TransactionFunc func(tx *gorm.DB) error