Hillcrest-R-D / FORM

F# Object Relational Mapper
MIT License
15 stars 0 forks source link

Transaction batching #16

Closed mflibby closed 1 year ago

mflibby commented 1 year ago

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.