diff options
author | 2024-05-27 09:35:41 +0000 | |
---|---|---|
committer | 2024-05-27 09:35:41 +0000 | |
commit | 0a18c0d802ce76cac5eb4cf2dae53c6e42536601 (patch) | |
tree | 8d28ddc527edcb323cbdba9330e7b705bdcf6c59 /vendor/github.com/jackc/pgx/v5/doc.go | |
parent | [performance] update storage backend and make use of seek syscall when availa... (diff) | |
download | gotosocial-0a18c0d802ce76cac5eb4cf2dae53c6e42536601.tar.xz |
[chore]: Bump github.com/jackc/pgx/v5 from 5.5.5 to 5.6.0 (#2929)
Diffstat (limited to 'vendor/github.com/jackc/pgx/v5/doc.go')
-rw-r--r-- | vendor/github.com/jackc/pgx/v5/doc.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vendor/github.com/jackc/pgx/v5/doc.go b/vendor/github.com/jackc/pgx/v5/doc.go index db99fc4cb..bc0391dde 100644 --- a/vendor/github.com/jackc/pgx/v5/doc.go +++ b/vendor/github.com/jackc/pgx/v5/doc.go @@ -11,9 +11,10 @@ The primary way of establishing a connection is with [pgx.Connect]: conn, err := pgx.Connect(context.Background(), os.Getenv("DATABASE_URL")) -The database connection string can be in URL or DSN format. Both PostgreSQL settings and pgx settings can be specified -here. In addition, a config struct can be created by [ParseConfig] and modified before establishing the connection with -[ConnectConfig] to configure settings such as tracing that cannot be configured with a connection string. +The database connection string can be in URL or key/value format. Both PostgreSQL settings and pgx settings can be +specified here. In addition, a config struct can be created by [ParseConfig] and modified before establishing the +connection with [ConnectConfig] to configure settings such as tracing that cannot be configured with a connection +string. Connection Pool @@ -23,8 +24,8 @@ github.com/jackc/pgx/v5/pgxpool for a concurrency safe connection pool. Query Interface pgx implements Query in the familiar database/sql style. However, pgx provides generic functions such as CollectRows and -ForEachRow that are a simpler and safer way of processing rows than manually calling rows.Next(), rows.Scan, and -rows.Err(). +ForEachRow that are a simpler and safer way of processing rows than manually calling defer rows.Close(), rows.Next(), +rows.Scan, and rows.Err(). CollectRows can be used collect all returned rows into a slice. |