-
Notifications
You must be signed in to change notification settings - Fork 31
feat: avoid adding a dummy WHERE clause into UPDATE/DELETE queries #464
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
Closed
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
3d082e4
feat: refactor connect() function, cover it with unit tests
13d672b
fix mock import
6eaa1f0
change imports to the db_api package instead of google.cloud
7607d9e
feat: cursor must detect if the parent connection is closed
0f53b1d
feat: avoid adding a dummy WHERE clause into UPDATE/DELETE queries
0ca360d
move WHERE clause check upper in function steck to avoid starting a t…
f6c678f
Merge branch 'master' into cursor_refactor
3235e0c
merge conflicts resolve
1edf8a5
lint fix
3cb6f53
fix test merge errors
316f637
args condition
e855e93
return back or None statements
52ff026
fix method name
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
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.
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 also realized that it's not very okay to do the check here, as
__do_execute_update()
will be sent toDatabase.run_in_transaction()
, and then toSession.run_in_transaction()
asfunc
arg. This last method will start a transaction (if needed) and only then it'll run__do_execute_update()
(and the check). We better run the check before starting anything. The check call moved to line 99