Versions in this module Expand all Collapse all v1 v1.28.0 Feb 22, 2026 Changes in this version + const SchemaKey + func BuildQualifiedTableName(schema, tableName string) (string, error) + func GetSchema(ctx context.Context) string + func IsAllowedSortColumn(column string, allowedColumns []string) bool + func MustGetSchema(ctx context.Context) string + func SanitizeIdentifier(identifier string) string + func ValidateOrderDirection(direction string) error + func ValidateSchemaName(schema string) error + func ValidateTableName(tableName string) error + func WithSchema(ctx context.Context, schema string) context.Context + type Config struct + ConnMaxLifetime int + Database string + Host string + LogMode bool + MaxIdleConns int + MaxOpenConns int + Password string + Port string + SSLMode string + Username string + func DefaultConfig() *Config + type Database interface + AutoMigrate func(dst ...interface{}) error + Close func() error + DB func() *gorm.DB + Ping func(ctx context.Context) error + Transaction func(ctx context.Context, fn func(*gorm.DB) error) error + func NewMock() (Database, error) + func NewMockWithDB(db *gorm.DB) Database + type MockDB struct + func (m *MockDB) AutoMigrate(dst ...interface{}) error + func (m *MockDB) Close() error + func (m *MockDB) DB() *gorm.DB + func (m *MockDB) Ping(ctx context.Context) error + func (m *MockDB) SetCloseFunc(fn func() error) + func (m *MockDB) SetPingFunc(fn func(ctx context.Context) error) + func (m *MockDB) Transaction(ctx context.Context, fn func(*gorm.DB) error) error