Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTxOptions = pgx.TxOptions{
IsoLevel: pgx.ReadCommitted,
}
Functions ¶
func IsEmptyResponse ¶
IsEmptyResponse returns true if error means that response contains no data.
func IsEntityExists ¶
IsEntityExists returns true if the provided error related to cases when entity already exists in the database.
Types ¶
type Postgres ¶
type Postgres struct {
Pool PgxIface
}
Postgres represents abstraction over database connection pool.
type Transaction ¶
type Transaction interface { Exec(ctx context.Context, sql string, arguments ...any) (commandTag pgconn.CommandTag, err error) QueryRow(ctx context.Context, sql string, args ...any) pgx.Row Commit(ctx context.Context) error Rollback(ctx context.Context) error }
Transaction is interface to generic Postgres transaction.
Click to show internal directories.
Click to hide internal directories.