modulepackage
1.1.0
Repository: https://github.com/frederikhs/go-connection.git
Documentation: pkg.go.dev
# README
go-connection
An opinionated small PostgreSQL client library based on jmoiron/sqlx
about
A postgres client with support for enforcing transactions and allowing the user to utilize transactions with the same interface as when not in a transaction.
usage
ConnectFromEnv
assumes environment variables:
DB_USER
DB_PASS
DB_HOST
DB_PORT
DB_DATABASE
to exist.
package main
import (
"github.com/frederikhs/go-connection"
)
type City struct {
Name string
County string
}
func main() {
conn := connection.ConnectFromEnv()
var cities []City
err := conn.Select(&cities, "SELECT name, country FROM cities WHERE country = $1", "Denmark")
if err != nil {
panic(err)
}
...
}
release
release a new version by creating a tag and pushing it
git tag -a v0.x.0 -m "v0.x.0"
git push origin v0.x.0
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
TryDomain is current just set to hiper.dk since I work at hiper.
# Interfaces
No description provided by the author
# Type aliases
No description provided by the author