Versions in this module Expand all Collapse all v2 v2.4.0 May 31, 2023 Changes in this version + const DBMigrationsConcurrentInitErrPrefix + const DBStatementCancelledErrPrefix + func DBMigrationsAlreadyInit(err error) bool + func DBStatementCancelledByUser(err error) bool + func WithContextTimeout(ctx context.Context, f func(ctx context.Context)) + func WithContextTimeoutValue(ctx context.Context, timeout time.Duration, f func(ctx context.Context)) + type TGPGDB struct + func CreateTGPGDB(url string) *TGPGDB + func CreateTGPGDBWithOptions(dbOpts *TGPGDBOptions) *TGPGDB + func NewTGPGDB(db *pg.DB) *TGPGDB + func (db *TGPGDB) ExecContext(ctx context.Context, query interface{}, params ...interface{}) (pg.Result, error) + func (db *TGPGDB) Migrate() error + func (db *TGPGDB) ModelContext(ctx context.Context, models ...interface{}) *orm.Query + func (db *TGPGDB) Ping() error + func (db *TGPGDB) RunInTransactionContext(ctx context.Context, txFunc func(context.Context, *TGPGDB) error) error + func (db *TGPGDB) WithTimeout(timeout time.Duration) *TGPGDB + type TGPGDBOptions struct + DisableAfterQueryLog bool + DisableBeforeQueryLog bool + Url string