Fix update mode
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
DataHoarder 2022-01-18 20:24:42 +01:00
parent b50479cf5b
commit 18fbe7d340

View file

@ -204,17 +204,17 @@ func main() {
if len(*pgSizeRow) > 0 {
pgSettings.UpdateSTMT, err = handle.Prepare(fmt.Sprintf("UPDATE %s SET %s = $2, %s = $3, %s = $4 WHERE %s = $1;",
pq.QuoteIdentifier(*pgTable),
pq.QuoteIdentifier(*pgPathRow),
pq.QuoteIdentifier(*pgMd5Row),
pq.QuoteIdentifier(*pgSizeRow),
pq.QuoteIdentifier(*pgSha256Row),
pq.QuoteIdentifier(*pgSizeRow),
pq.QuoteIdentifier(*pgPathRow),
))
} else {
pgSettings.UpdateSTMT, err = handle.Prepare(fmt.Sprintf("UPDATE %s SET %s = $2, %s = $3 WHERE %s = $1;",
pq.QuoteIdentifier(*pgTable),
pq.QuoteIdentifier(*pgPathRow),
pq.QuoteIdentifier(*pgMd5Row),
pq.QuoteIdentifier(*pgSha256Row),
pq.QuoteIdentifier(*pgPathRow),
))
}