database

package module
v0.0.0-...-f1224c9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PGErrCode

func PGErrCode(err error) (string, bool)

PGErrCode returns the error code of Postgres errors. use pgerrcode package to get the error code of a Postgres error.

func Tx

func Tx(ctx context.Context, db *sql.DB, opts *sql.TxOptions, f func(tx *sql.Tx) error) error

Tx executes the given function in a transaction.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL