Documentation ¶
Index ¶
- Constants
- 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
- 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) error) error
Constants ¶
View Source
const ( DBMigrationsInitializedErrPrefix = "ERROR #42P07" // safe to ignore, error when gopg_migrations already exists DBStatementCancelledErrPrefix = "ERROR #57014" )
Variables ¶
This section is empty.
Functions ¶
func DBMigrationsAlreadyInit ¶
func WithContextTimeout ¶
WithContextTimeout executes statements with a default timeout
Types ¶
type TGPGDB ¶
func CreateTGPGDB ¶
func (*TGPGDB) ExecContext ¶
func (*TGPGDB) ModelContext ¶
Click to show internal directories.
Click to hide internal directories.