This repository has been archived by the owner on Dec 20, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, with regard to the issue #104 I've tried this change to put multiple transaction in queue rather than mixing them as it happens now.
I'm not sure if this might impact existing applications, but to be honest I think that mixing transaction is wrong in the first place (and as I've reported it may lead to errors) so I dare to say my approach should be the right one :)
Transactions are queued unless { savepoint: true } is specified. In this case everything should work as expected. I suppose that queuing might have a slight performance hit, but I think it's preferable to an unexpected result. I've thought about making them run in parallel, but I've currently no idea how to achieve that without possibily changing the API. Given the fact that it would also be quite a difficult task and I don't have enough time to devote to it right now, I'll leave it for a better time
I'm not an ORM expert, so feel free to review and improve my code :)
Thanks for your work with patio.