1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-21 06:09:42 +02:00

Update PostgreSQL driver library

This commit is contained in:
HarveyKandola 2019-06-25 15:33:51 +01:00
parent f3df43efe0
commit c538fc9eb1
31 changed files with 7381 additions and 162 deletions

33
vendor/github.com/lib/pq/connector_example_test.go generated vendored Normal file
View file

@ -0,0 +1,33 @@
// +build go1.10
package pq_test
import (
"database/sql"
"fmt"
"github.com/lib/pq"
)
func ExampleNewConnector() {
name := ""
connector, err := pq.NewConnector(name)
if err != nil {
fmt.Println(err)
return
}
db := sql.OpenDB(connector)
if err != nil {
fmt.Println(err)
return
}
defer db.Close()
// Use the DB
txn, err := db.Begin()
if err != nil {
fmt.Println(err)
return
}
txn.Rollback()
}