Versions in this module Expand all Collapse all v1 v1.0.0 Apr 27, 2026 Changes in this version + func ColumnFor[T any](db *gormlib.DB, field string) (clause.Column, error) + func Database(ctx context.Context, db *gormlib.DB, action string) (*gormlib.DB, error) + func EscapeLike(value string) string + func WrapError(action string, err error) error + type ConnectionPoolConfig struct + MaxIdleConns int + MaxOpenConns int + type DB struct + func OpenSQLite(dsn string) (*DB, error) + func (d *DB) AutoMigrate(models ...any) error + func (d *DB) Close() error + func (d *DB) Components() []any + func (d *DB) ConfigurePool(cfg ConnectionPoolConfig) error + func (d *DB) HasTable(model any) bool + func (d *DB) Ping() error + type Repository struct + func NewRepository[T, ID any](db *gormlib.DB) *Repository[T, ID] + func (r *Repository[T, ID]) Delete(ctx context.Context, id ID) error + func (r *Repository[T, ID]) FindAll(ctx context.Context) ([]T, error) + func (r *Repository[T, ID]) FindByID(ctx context.Context, id ID) (*T, error) + func (r *Repository[T, ID]) FindWhere(ctx context.Context, filter data.Filter) ([]T, error) + func (r *Repository[T, ID]) Paginate(ctx context.Context, page, size int) (data.Page[T], error) + func (r *Repository[T, ID]) Save(ctx context.Context, entity *T) error + func (r *Repository[T, ID]) WithTransaction(tx data.Transaction[*gormlib.DB]) data.Repository[T, ID, *gormlib.DB] + type Transaction struct + func NewTransaction(db *gormlib.DB) Transaction + func (t Transaction) Unwrap() *gormlib.DB + type TransactionManager struct + func NewTransactionManager(db *gormlib.DB) *TransactionManager + func (m *TransactionManager) WithinTransaction(ctx context.Context, ...) error