gotosocial/vendor/github.com/jackc/pgx/v5/pgconn
dependabot[bot] ca729aa4a0
[chore]: Bump github.com/jackc/pgx/v5 from 5.6.0 to 5.7.1 (#3302)
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.6.0 to 5.7.1.
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v5.6.0...v5.7.1)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-16 09:26:41 +02:00
..
ctxwatch [chore]: Bump github.com/jackc/pgx/v5 from 5.5.5 to 5.6.0 (#2929) 2024-05-27 09:35:41 +00:00
internal/bgreader [chore]: Bump github.com/jackc/pgx/v5 from 5.5.5 to 5.6.0 (#2929) 2024-05-27 09:35:41 +00:00
auth_scram.go [chore]: Bump github.com/jackc/pgx/v5 from 5.4.3 to 5.5.0 (#2336) 2023-11-06 14:44:53 +00:00
config.go [chore]: Bump github.com/jackc/pgx/v5 from 5.6.0 to 5.7.1 (#3302) 2024-09-16 09:26:41 +02:00
defaults.go [chore] Update a bunch of database dependencies (#1772) 2023-05-12 14:33:40 +02:00
defaults_windows.go [chore] Update a bunch of database dependencies (#1772) 2023-05-12 14:33:40 +02:00
doc.go [chore]: Bump github.com/jackc/pgx/v5 from 5.5.5 to 5.6.0 (#2929) 2024-05-27 09:35:41 +00:00
errors.go [chore]: Bump github.com/jackc/pgx/v5 from 5.5.5 to 5.6.0 (#2929) 2024-05-27 09:35:41 +00:00
krb5.go [chore]: Bump github.com/jackc/pgx/v5 from 5.3.1 to 5.4.1 (#1907) 2023-06-19 09:56:15 +02:00
pgconn.go [chore]: Bump github.com/jackc/pgx/v5 from 5.5.5 to 5.6.0 (#2929) 2024-05-27 09:35:41 +00:00
README.md [chore] Update a bunch of database dependencies (#1772) 2023-05-12 14:33:40 +02:00

pgconn

Package pgconn is a low-level PostgreSQL database driver. It operates at nearly the same level as the C library libpq. It is primarily intended to serve as the foundation for higher level libraries such as https://github.com/jackc/pgx. Applications should handle normal queries with a higher level library and only use pgconn directly when required for low-level access to PostgreSQL functionality.

Example Usage

pgConn, err := pgconn.Connect(context.Background(), os.Getenv("DATABASE_URL"))
if err != nil {
	log.Fatalln("pgconn failed to connect:", err)
}
defer pgConn.Close(context.Background())

result := pgConn.ExecParams(context.Background(), "SELECT email FROM users WHERE id=$1", [][]byte{[]byte("123")}, nil, nil, nil)
for result.NextRow() {
	fmt.Println("User 123 has email:", string(result.Values()[0]))
}
_, err = result.Close()
if err != nil {
	log.Fatalln("failed reading result:", err)
}

Testing

See CONTRIBUTING.md for setup instructions.