In instances where we have multiple queries being run that depend on one another in some way, we need a way to roll back transactions. E.g.:
match Orm.delete location sqlite
, Orm.delete batch sqlite
, Orm.delete item sqlite
with
| Ok , Ok , Ok -> Ok ()
| Error e, ,
| , Error e,
| , _, Error e -> Error e.Message
We only want to delete those three instances IFF all three are successful, but the current mechanics of FORM would persist the deletions of whatever succeeds.
In instances where we have multiple queries being run that depend on one another in some way, we need a way to roll back transactions. E.g.: match Orm.delete location sqlite
, Orm.delete batch sqlite
, Orm.delete- item sqlite
with
| Ok , Ok , Ok -> Ok ()
| Error e, ,
| , Error e,
| , _, Error e -> Error e.Message
We only want to delete those three instances IFF all three are successful, but the current mechanics of FORM would persist the deletions of whatever succeeds.