diff options
| author | Jonathan Amsterdam <jba@google.com> | 2021-03-24 19:42:09 -0400 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2021-03-25 11:02:39 +0000 |
| commit | b80d4dd39a545d302609dbc52e3dc3e7a6fc18ae (patch) | |
| tree | e287f10e4c2ce53a7b980d38c972aa2515ad75b1 /internal/queue/queue.go | |
| parent | 030d6bd4c085ea8d1dc4e94ce4d5e69736df9114 (diff) | |
| download | go-x-pkgsite-b80d4dd39a545d302609dbc52e3dc3e7a6fc18ae.tar.xz | |
internal/database: add CopyUpsert
Add the CopyUpsert method, which uses an efficient
Postgres protocol to insert rows.
For this to work, we need the connection underlying a sql.Tx value.
Since sql.Tx doesn't expose its connection, we create one explicitly
in DB.transact.
Change-Id: Ie48ce7a4318f4531d4756f779943188a6f0fb6cd
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/304631
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Diffstat (limited to 'internal/queue/queue.go')
0 files changed, 0 insertions, 0 deletions
