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/pgconn/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/pgconn/doc.go')
-rw-r--r-- | vendor/github.com/jackc/pgx/v5/pgconn/doc.go | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/vendor/github.com/jackc/pgx/v5/pgconn/doc.go b/vendor/github.com/jackc/pgx/v5/pgconn/doc.go index e3242cf4e..701375019 100644 --- a/vendor/github.com/jackc/pgx/v5/pgconn/doc.go +++ b/vendor/github.com/jackc/pgx/v5/pgconn/doc.go @@ -5,8 +5,8 @@ nearly the same level is the C library libpq. Establishing a Connection -Use Connect to establish a connection. It accepts a connection string in URL or DSN and will read the environment for -libpq style environment variables. +Use Connect to establish a connection. It accepts a connection string in URL or keyword/value format and will read the +environment for libpq style environment variables. Executing a Query @@ -20,13 +20,17 @@ result. The ReadAll method reads all query results into memory. Pipeline Mode -Pipeline mode allows sending queries without having read the results of previously sent queries. It allows -control of exactly how many and when network round trips occur. +Pipeline mode allows sending queries without having read the results of previously sent queries. It allows control of +exactly how many and when network round trips occur. Context Support -All potentially blocking operations take a context.Context. If a context is canceled while the method is in progress the -method immediately returns. In most circumstances, this will close the underlying connection. +All potentially blocking operations take a context.Context. The default behavior when a context is canceled is for the +method to immediately return. In most circumstances, this will also close the underlying connection. This behavior can +be customized by using BuildContextWatcherHandler on the Config to create a ctxwatch.Handler with different behavior. +This can be especially useful when queries that are frequently canceled and the overhead of creating new connections is +a problem. DeadlineContextWatcherHandler and CancelRequestContextWatcherHandler can be used to introduce a delay before +interrupting the query in such a way as to close the connection. The CancelRequest method may be used to request the PostgreSQL server cancel an in-progress query without forcing the client to abort. |