Documentation
¶
Overview ¶
Package postgres opens the one PostgreSQL pool of a site with a database/sql view of it, and runs its migrations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAddress ¶
CheckAddress returns the error for an empty PostgreSQL address or one pgx 5.10 and 5.11 read apart with no PG* set.
Types ¶
type Handle ¶
type Handle struct {
// Pool owns every connection of the handle.
Pool *pgxpool.Pool
// DB is the database/sql view of Pool, with no idle connection of its own.
DB *sql.DB
}
Handle is the one PostgreSQL pool of a site and a database/sql view that draws from it.
type Migrations ¶
type Migrations struct {
// Table is the version table, table or schema.table, lowercase parts of up to 63 bytes, none reserved, no pg_ schema.
Table string
// FS holds the owner's SQL migration files at its root, and nil means none.
FS fs.FS
// Go are the owner's Go migrations, each built with goose.NewGoMigration.
Go []*goose.Migration
}
Migrations are the migrations of one owner.
Click to show internal directories.
Click to hide internal directories.