forked from Eonblast/Emysql
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5054868
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting stuff slepher, how is it coming along?
Please take a look at this while you're at it. It's a Mnesia-style approach to transactions that Brendon Hogger started implementing a while ago. I believe they are running something very close to these lines at their company now but couldn't entice him to push.
5054868
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a prototype moudle works on my company project,
I will send you a pull request when it become more stable if you need.
5054868
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, cool!
How do you like Brendon's approach?
Cheers,
Henning
5054868
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's same as my implementation except some exception processes,
as the return value, I prefer mnesia style {atomic, Val} | {aborted, Reason}, and use abort(Reason) to rollback the transaction.
For module style, do you mean you prefer the stand alone module?
5054868
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I did not understand that it's similar. From a superficial look it looked quite different.
The better. Let's use what works.
I don't think a stand alone module is better, that's not what I meant. That's fine.
If you want to send me some sample code, I'll be happy to roll some Common Tests for the exceptions.
Thanks,
Henning
5054868
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz checkout git://github.com/slepher/Emysql.git
see test_transaction.erl
and use sh test_transaction.sh to run the sample code
5054868
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the slow response, I'll have more time at my hands mid March. Can't wait.
5054868
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, what I'll do is adding your sample to the test cases, adding a Common Test suite specifically for transactions and make that available to you in a dev branch with all your changes in it. Hoping that you might contribute cases to the suite.
Best,
Henning