Versions in this module Expand all Collapse all v1 v1.7.1 Jun 15, 2026 v1.7.0 Jun 13, 2026 Changes in this version + func ApplyLitestreamConnectionPragmas(ctx context.Context, orm *bun.DB, engine string) error + func ApplySQLiteConnectionPragmas(ctx context.Context, orm *bun.DB, engine, dsn string) error + func BuildPostgresDSN(c *models.DriverCredentials) (string, error) + func EngineIsSQLiteLike(engine string) bool + func ErrCredentialsRequired() error + func IsAlreadyExistsErr(err error) bool + func OpenBun(cfg *models.Config, cred *models.DriverCredentials) (*bun.DB, error) + func QuoteMySQLIdent(s string) string + func QuotePGIdent(s string) string + type Base struct + Conf *models.Config + Dialect Dialect + DriverCredential *models.DriverCredentials + ORM *bun.DB + SyncLock SyncLocker + func (b *Base) LockSQLiteWrite() bool + func (b *Base) RunInTxOrBypass(ctx context.Context, fn func(ctx context.Context, tx bun.IDB) error) error + func (b *Base) UnlockSQLiteWrite() + func (b *Base) WithWriteLock(fn func() error) error + type BunDriver interface + Bun func() *bun.DB + Engine func() string + type Dialect interface + Engine func() string + IsRemoteSQLiteLikeTurso func(d *Driver) bool + IsSQLiteLike func() bool + PreferDDLRunInTx func(d *Driver) bool + QuoteIdent func(name string) string + RootResolverQueryBuilder func(conf *models.Config, param *models.CommonSystemParams, returnCount bool) (string, []interface{}, error) + RunDDLBatch func(ctx context.Context, d *Driver, fn func(bun.IDB) error) error + SupportsTransactionalDDL func() bool + type Driver struct + func OpenDriver(cfg *models.Config, cred *models.DriverCredentials, dialect Dialect) (*Driver, error) + func (d *Driver) Bun() *bun.DB + func (d *Driver) Close() error + func (d *Driver) Engine() string + func (d *Driver) Ping() error + type SQLDriverCarrier interface + SQLDriverShell func() *Driver + SQLEngineName func() string + type SyncLocker interface + LockForTx func() + UnlockForTx func()