database

package
v0.0.0-...-22aee03 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckErrorCode

func CheckErrorCode(err error) error

CheckErrorCode returns - depending on the postgres error code - a custom error that can be easier parsed and handled

Types

type DB

type DB struct {
	DB *sql.DB
}

DB is the postgres connection

func Open

func Open(connectionString string) (*DB, error)

Open opens a postgres database connection

func (*DB) Close

func (db *DB) Close() error

Close terminates the postgres connection

Jump to

Keyboard shortcuts

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