-
-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transactions support #294
Transactions support #294
Conversation
52c4c23
to
84ca383
Compare
287ef9a
to
eb86a4b
Compare
`trace()` deprecated since 2.0.14
add ClientSession::getId()
80f5ae1
to
1acb69e
Compare
Tests seems to fail: https://github.com/yiisoft/yii2-mongodb/pull/294/checks?check_run_id=484726582 |
@samdark for fixing this errors , i must be change version of mongodb to 4.0 (also mongodb php driver to 1.5). please see MongoDB Compatibility |
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
add $lockFieldName param to LockDocumentStubbornly and lockFieldName is required in both lock methods
Thank you @ziaratban for the PR |
I think it is over and I am waiting for @samdark to have a code review and I have been using this feature in my products for about a year now. If you have a code to add, we will be very happy. |
@ziaratban thanks for patience and sorry it takes so long. |
Overall it looks alright but, it seems, public interfaces are changed so that should be a major release. Right? |
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Of course! |
Merged. Thank you for working on it. |
Examples
Once
featureStarts and commits transaction in easy mode if the previous transaction was not executed, otherwise only runs your actions in previous transaction.
Lock a document for update
Stubbornly lock feature
When doc1 is locked in a transaction(t1) and when other transactions(t2) want to update doc1, they will confront 'writeConflict' error. if you don't want to have a 'writeConflict' error , you can use the 'stubbornly lock' feature in application level.
this feature will wait until the document unlocks.