-
Notifications
You must be signed in to change notification settings - Fork 90
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
feat(db_api): make rowcount property NotImplemented #603
Conversation
Merge-on-green attempted to merge your PR for 6 hours, but it was not mergeable because either one of your required status checks failed, one of your required reviews was not approved, or there is a do not merge label. Learn more about your required status checks here: https://help.github.com/en/github/administering-a-repository/enabling-required-status-checks. You can remove and reapply the label to re-run the bot. |
Co-authored-by: larkee <31196561+larkee@users.noreply.github.com>
Updates with autocommit is default in Django, which breaks with these changes, can we undo these changes? @IlyaFaer |
@vi3k6i5, I don't think it'll break anything, you know, more. But, as I see it, if we'll start to really count rows, it'll be incorrect in many cases (most likely Django will still be failing), because results are streamed piece by piece. We're just not able to always know how many results we've got. Plus to this, there will be an operative property Could you show traceback of the failure or something? If it's only actual for tests, I guess we can just skip them (as we're not able to support |
Hi @IlyaFaer I am not able to run model object update query because of the change in this PR: Example: Error: ../../.virtualenvs/temp_2/lib/python3.9/site-packages/grpc/_channel.py:849: _InactiveRpcError Reason for the failure is pretty simple:
Since we are returning -1 for row_count, django assumes the update has failed and tries to insert data again which fails because there is already an entry in db with the same primary key. Solution would be to revert the row_count changes. Can you elaborate where the row_count returns incorrect result which does not match the expectation set in PEP 249 Specifically point 7 and point 9. Thanks |
The original issue: googleapis/python-spanner-sqlalchemy#121
As we're not able to implement
rowcount
property according to the PEP-249, erasing its functionality (which is actual for only single one case - UPDATE query inautocommit
mode).