Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
Postgres wraps a Bun DB connection and error checker for Postgres-specific behavior.
func (*Postgres) ErrorChecker ¶
func (p *Postgres) ErrorChecker() db.ErrorChecker
ErrorChecker returns a Postgres error classifier.
type PostgresErrorChecker ¶
type PostgresErrorChecker struct{}
PostgresErrorChecker classifies common Postgres errors such as no rows and unique constraint violations.
func (*PostgresErrorChecker) IsErrNoRows ¶
func (checker *PostgresErrorChecker) IsErrNoRows(err error) bool
func (*PostgresErrorChecker) IsUniqueConstraintError ¶
func (checker *PostgresErrorChecker) IsUniqueConstraintError(err error) bool
Click to show internal directories.
Click to hide internal directories.