Games TypeORM All or Nothing

All or Nothing

db.transaction, rollback on error, half-done transfers, stale saves, optimistic locks and query runners.

0 / 8 levels · 0 / 24 ★Start playing ›
  1. All or Nothing

    A transaction is a shopping basket. You put things in, but nothing is paid for until checkout (COMMIT). Drop the basket, because of an error, and everything goes back on the shelf (ROLLBACK). A write made without a basket is paid for at the till the moment it runs.

Your rulebook

Finish a level to add its rule. Fill the book and you can explain all of this in an interview.

  1. 1Finish Checkout pays for everything to unlock this rule.
  2. 2Finish Drop the basket to unlock this rule.
  3. 3Finish Every save() checks out on its own to unlock this rule.
  4. 4Finish A transfer without a basket to unlock this rule.
  5. 5Finish The same transfer in a basket to unlock this rule.
  6. 6Finish A stale copy wins quietly to unlock this rule.
  7. 7Finish Ask for the version check to unlock this rule.
  8. 8Finish Holding the basket yourself to unlock this rule.