Skip to content

Commit 1bc0029

Browse files
authored
Merge pull request #2632 from VedantMadane/docs/readme-documentation-section
docs: integrate Quick Start guide and documentation into README
2 parents 728cefa + 3bfc268 commit 1bc0029

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@ The toolkit component is a related set of packages that implement PostgreSQL fun
1212
and type mapping between PostgreSQL and Go. These underlying packages can be used to implement alternative drivers,
1313
proxies, load balancers, logical replication clients, etc.
1414

15-
## Example Usage
15+
## Quick Start
16+
17+
### Installation
18+
19+
```bash
20+
go get github.com/jackc/pgx/v5
21+
```
22+
23+
### Example Usage
1624

1725
```go
1826
package main
@@ -46,7 +54,18 @@ func main() {
4654
}
4755
```
4856

49-
See the [getting started guide](https://github.com/jackc/pgx/wiki/Getting-started-with-pgx) for more information.
57+
### Connection Configuration
58+
59+
`pgx.Connect` and `pgxpool.New` accept PostgreSQL connection URLs (such as `postgres://user:pass@host:5432/db?sslmode=verify-full`) as well as `key=value` strings. See [`pgconn.ParseConfig`](https://pkg.go.dev/github.com/jackc/pgx/v5/pgconn#ParseConfig) and the [PostgreSQL connection string documentation](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING) for supported options and environment variables.
60+
61+
For a step-by-step walkthrough, see the [getting started guide](https://github.com/jackc/pgx/wiki/Getting-started-with-pgx).
62+
63+
## Documentation
64+
65+
Package documentation and API reference are available on [pkg.go.dev](https://pkg.go.dev/github.com/jackc/pgx/v5):
66+
* [`pgx`](https://pkg.go.dev/github.com/jackc/pgx/v5) — base PostgreSQL driver
67+
* [`pgxpool`](https://pkg.go.dev/github.com/jackc/pgx/v5/pgxpool) — concurrency-safe connection pool
68+
* [`stdlib`](https://pkg.go.dev/github.com/jackc/pgx/v5/stdlib)`database/sql` compatibility adapter
5069

5170
## Features
5271

0 commit comments

Comments
 (0)