Skip to content
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

Make OnConflict store both update_columns and values #609

Merged
merged 1 commit into from
Mar 3, 2023

Conversation

elbertronnie
Copy link
Contributor

@elbertronnie elbertronnie commented Feb 22, 2023

PR Info

Breaking Changes

  • OnConflict::values and OnConflict::update_columns will append the new values keeping the old values intact instead of erasing them

Changes

  • Added new enum OnConflictUpdate that determines the column update strategy in ON CONFLICT expressions
  • Replaced UpdateColumns and UpdateExprs with Update(Vec<OnConflictUpdate>) in OnConflictAction

Copy link
Member

@billy1624 billy1624 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @elbertronnie, thanks for contributing!! The implementation looks good to me :)

src/query/on_conflict.rs Outdated Show resolved Hide resolved
Copy link
Member

@ikrivosheev ikrivosheev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elbertronnie thank you! LGTM!

@ikrivosheev ikrivosheev merged commit 8be7bc2 into SeaQL:master Mar 3, 2023
Copy link
Member

@tyt2y3 tyt2y3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to also add some doc tests

tyt2y3 added a commit that referenced this pull request Mar 8, 2023
@github-actions
Copy link

🎉 Released In 0.29.0 🎉

Your participation is what makes us unique; your adoption is what drives us forward.
Thank you all in the Rust community for making SeaQL what it is today. 🦀
You are also invited to shape it's future! Please star our repos, every ⭐ counts!

@github-actions
Copy link

🎉 Released In 0.29.1 🎉

Thank you everyone for the contribution!
This feature is now available in the latest release. Now is a good time to upgrade!
Your participation is what makes us unique; your adoption is what drives us forward.
You can support SeaQL 🌊 by starring our repos, sharing our libraries and becoming a sponsor ⭐.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

OnConflict::values and OnConflict::update_columns gets overridden by one another
4 participants