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 2ae940f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions stdlib/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
// return err
// }
//
// Or from a *pgxpool.Pool.
//
// pool, err := pgxpool.New(context.Background(), os.Getenv("DATABASE_URL"))
// 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 2ae940f

Please sign in to comment.