|
|
|
|
|
by jchrisa
3402 days ago
|
|
Calvin is a generalized consistency protocol, that we use in FaunaDB to support relational semantics (but not SQL) in our database. Multi-query transactions can be useful, but the FaunaDB query language is functional, rather than declarative like SQL, so composing queries that can do everything you want is usually easier than SQL. |
|
Would you create a single operation that reads one record, checks that it's enough, then adds the amount to another record?
Or maybe you'd first read both accounts, then issue a conditional write operation that makes sure the data hasn't changed before doing the write?