-
-
Save KadekM/933a0f7d7a2b907d965ada80d2177e1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def changeBalanceCommand = | |
sql"""INSERT INTO balances (name, balance) VALUES ($varchar, $int4) | |
ON CONFLICT (name) DO UPDATE | |
SET balance=EXCLUDED.balance + balances.balance""".command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment