Documentation ¶
Overview ¶
Package db provides simple database abstractions for common operations.
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 contains a pointer of sql.DB and represents the database abrastraction for Postgresql-compatible databases.
func NewPostgres ¶
NewPostgres returns a Postgres implementation given an postgres URL.
func (Postgres) CheckConnection ¶
CheckConnection runs a simple `SELECT 1` on the Postgres database connection instantied and returns an error if some.
Click to show internal directories.
Click to hide internal directories.