internal/postgres: format upsertSearchStatement

upsertSearchStatement is formatted to condense JOINs on one line.

Change-Id: I40220c32728e924a216791321255ee4d23203294
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/318491
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
This commit is contained in:
Julie Qiu 2021-05-10 14:48:33 -04:00
Родитель c31e9966f1
Коммит 1726a85eb2
1 изменённых файлов: 6 добавлений и 18 удалений

Просмотреть файл

@ -489,26 +489,14 @@ var upsertSearchStatement = fmt.Sprintf(`
),
hll_hash(p.path) & (%d - 1),
hll_zeros(hll_hash(p.path))
FROM
units u
INNER JOIN
paths p
ON
p.id = u.path_id
INNER JOIN
modules m
ON
u.module_id = m.id
LEFT JOIN
documentation d
ON
u.id = d.unit_id
FROM units u
INNER JOIN paths p ON p.id = u.path_id
INNER JOIN modules m ON u.module_id = m.id
LEFT JOIN documentation d ON u.id = d.unit_id
WHERE
p.path = $1
AND
m.module_path = $2
AND
m.version = $3
AND m.module_path = $2
AND m.version = $3
LIMIT 1 -- could be multiple build contexts
ON CONFLICT (package_path)
DO UPDATE SET