Documentation ¶
Index ¶
- func ErrorCodeEqual(err error, code ErrPgCode) bool
- func Migrate(connURL string) error
- func NewMigrator(dbConnURL string) (*migrate.Migrate, error)
- func Open(config config.DBConfig) (*pgxpool.Pool, error)
- func Rollback(connURL string, count int) error
- func ToVersion(version uint, connURL string) error
- type ErrPgCode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorCodeEqual ¶ added in v0.11.3
func NewMigrator ¶
Types ¶
type ErrPgCode ¶ added in v0.11.3
type ErrPgCode string
ErrPgCode refers to https://www.postgresql.org/docs/current/errcodes-appendix.html
const (
ErrPgCodeUniqueConstraints ErrPgCode = "23505"
)
Click to show internal directories.
Click to hide internal directories.