Skip to content

Instantly share code, notes, and snippets.

@alphamikle
Created February 11, 2021 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alphamikle/1d3bce74b6a496f6d8bb9dc85d162c9c to your computer and use it in GitHub Desktop.
Save alphamikle/1d3bce74b6a496f6d8bb9dc85d162c9c to your computer and use it in GitHub Desktop.
START TRANSACTION
// ...
SELECT "Purse"."id" AS "Purse_id", "Purse"."balance" AS "Purse_balance", "Purse"."userId" AS "Purse_userId"
FROM "purse" "Purse"
WHERE "Purse"."id" IN ($1)
START TRANSACTION
SELECT "Purse"."id" AS "Purse_id", "Purse"."balance" AS "Purse_balance", "Purse"."userId" AS "Purse_userId"
FROM "purse" "Purse"
WHERE "Purse"."id" IN ($1)
UPDATE "purse"
SET "balance" = $2
WHERE "id" IN ($1)
COMMIT
ROLLBACK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment