Skip to content

Commit

Permalink
add example to the doc
Browse files Browse the repository at this point in the history
  • Loading branch information
lzakharov committed Aug 19, 2023
1 parent 85fb231 commit 01d33b4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions stdlib/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@
// return err
// }
//
// Or from a *pgxpool.Pool.
//
// pool, err := pgxpool.New(context.Background(), os.Getenv("DATABASE_URL"))
// if err != nil {
// return err
// }
//
// db, err := stdlib.OpenDBFromPool(pool)
// if err != nil {
// return err
// }
//
// Or a pgx.ConnConfig can be used to set configuration not accessible via connection string. In this case the
// pgx.ConnConfig must first be registered with the driver. This registration returns a connection string which is used
// with sql.Open.
Expand Down

0 comments on commit 01d33b4

Please sign in to comment.