Skip to content

Stop updating on conflict if update_condition is False but not None #228

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

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

sewi-cpan
Copy link
Contributor

Some users of this library set update_condition=0 on upsert for not updating anything on conflict.

The upsert documentation says:

update_condition:
Only update if this SQL expression evaluates to true.

A value evaluating to Python False is ignored while the documentation says no update will be done.

[#186513018]

Some users of this library set `update_condition=0` on `upsert` for not updating anything on conflict.

The `upsert` documentation says:
> update_condition:
>   Only update if this SQL expression evaluates to true.

A value evaluating to Python `False` is ignored while the documentation says no update will be done.

[#186513018]
@sewi-cpan sewi-cpan requested a review from Photonios November 19, 2023 20:23
@sewi-cpan
Copy link
Contributor Author

@Photonios: See the task for details. Might be either abuse of the API (= we should change the documentation) or an uncovered edge case (= this PR should be merged).

@sewi-cpan sewi-cpan merged commit e254a68 into master Nov 29, 2023
@sewi-cpan sewi-cpan deleted the 186513018-update-condition-0 branch November 29, 2023 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants