Discover Packages
github.com/0xraiseup/emerishq
database
package
Version:
v0.0.0-...-e48215e
Opens a new window with list of versions in this module.
Published: Jul 18, 2022
License: AGPL-3.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
View Source
const (
DriverPGX = "pgx"
DriverPQ = "postgres"
)
RunMigrations run all the migrations contained in "migrations" on the database pointed by dbConnString.
type Instance struct {
DB *sqlx .DB
}
Instance contains a database connection instance.
New returns an Instance connected to the database pointed by connString.
NewWithDriver returns an Instance connected to the database pointed by connString with the given driver.
Close closes the connection held by i.
Exec executes query with the given params.
If params is nil, query is assumed to be of the `SELECT` kind, and the resulting data will be written in dest.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.