3 ms·
Datomic does this. There’s (Clojure syntax) d/with that given a database at any point in time runs a transaction “virtually” (there isn’t a current db per se -
by NightMKoder 8y ago
Datomic does this. There’s (Clojure syntax) d/with that given a database at any point in time runs a transaction “virtually” (there isn’t a current db per se - you can use (d/db connection) to get a reasonably current one though) . You can then query that virtual database as you would a real database.
If you do want to durably commit, you have to use (d/transact) which takes a transaction in the same format as d/with, but operates on a connection rather than a point in time database (the transaction can have special functions that read the active db at the point in time of the transaction, to implement things like cas).