Registry / database / go-pg-pg

go-pg-pg

JSON →
library8.0.7+incompatiblegogounverified

A PostgreSQL client and ORM for Go.

go get github.com/go-pg/pg
INSTALL
IMPORT
SIG · GO-PG-PG
G
go-pg-pg
databasegov8.0.7+incompatible
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pg
github.com/go-pg/pg

Connects to PostgreSQL and executes a simple query.

package main import ( "fmt" "github.com/go-pg/pg/v10" ) func main() { db := pg.Connect(&pg.Options{ Addr: "localhost:5432", User: "user", Password: "password", Database: "mydb", }) defer db.Close() var n int _, err := db.QueryOne(pg.Scan(&n), "SELECT 1") if err != nil { fmt.Println(err) return } fmt.Println(n) }
Debug
Known issues
breakingVersion 8 is incompatible with Go modules; use v10 or later.
fix
Use github.com/go-pg/pg/v10 instead.
affects: 8.0.7+incompatible
Upgrade
Version history
8.0.7+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
29 hits · last 30 days
node
26
OpenAI (training)
1
Resources
go-pg-pg — go get go-pg-pg · libregistry