Global AND and OR functions for better indentation of a complex condition in the Go code and in the generated SQL.
This commit is contained in:
parent
8ffbe38993
commit
9f91fd705a
17 changed files with 338 additions and 44 deletions
|
|
@ -154,9 +154,9 @@ WITH payments_to_update AS (
|
|||
UPDATE payment
|
||||
SET amount = 0
|
||||
WHERE payment.payment_id IN (
|
||||
SELECT payments_to_update.''payment.payment_id'' AS "payment.payment_id"
|
||||
FROM payments_to_update
|
||||
);
|
||||
SELECT payments_to_update.''payment.payment_id'' AS "payment.payment_id"
|
||||
FROM payments_to_update
|
||||
);
|
||||
`, "''", "`", -1))
|
||||
|
||||
tx := beginDBTx(t)
|
||||
|
|
@ -206,9 +206,9 @@ WITH payments_to_delete AS (
|
|||
)
|
||||
DELETE FROM payment
|
||||
WHERE payment.payment_id IN (
|
||||
SELECT payments_to_delete.''payment.payment_id'' AS "payment.payment_id"
|
||||
FROM payments_to_delete
|
||||
);
|
||||
SELECT payments_to_delete.''payment.payment_id'' AS "payment.payment_id"
|
||||
FROM payments_to_delete
|
||||
);
|
||||
`, "''", "`", -1))
|
||||
|
||||
tx := beginDBTx(t)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue