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

Fix #3872 #3877

Merged
merged 2 commits into from
Dec 20, 2023
Merged

Fix #3872 #3877

merged 2 commits into from
Dec 20, 2023

Conversation

weiznich
Copy link
Member

This commit changes some QueryFragment impls that previously assumed that the provided primary key consist only of a single column. The new implementation allows composite keys as well. In addition I also added two tests to cover these cases as well.

This commit changes some `QueryFragment` impls that previously assumed
that the provided primary key consist only of a single column. The new
implementation allows composite keys as well. In addition I also added
two tests to cover these cases as well.
Copy link

@AlexStorm1313 AlexStorm1313 left a comment

Choose a reason for hiding this comment

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

@weiznich, out of curiosity could you elaborate a bit more on the naming of the DoNothingHelper trait? Functionality wise it looks good to me!

@weiznich
Copy link
Member Author

There is no reasoning behind that name at all. I guess my thoughts were something like: It is somehow related to the DO NOTHING clause in ON CONFLICT statements and it's an internal helper trait -> DoNothingHelper. In the end it's just a trait that implements a helper to generate a workaround for the missing DO NOTHING support on mysql (by just saying id = id essentially).

That written: I'm open to change it to some better fitting name if someone comes up with a suggestion.

@Ten0
Copy link
Member

Ten0 commented Dec 18, 2023

It is somehow related to the DO NOTHING clause

Haha it's true that the name of the trait feels super weird like "wait what we need a trait to help us do nothing?" 😂
I guess just a tiny bit of doc comment on top of the trait would avoid this funny confusion 🙂

@weiznich
Copy link
Member Author

weiznich commented Dec 19, 2023

Right, I didn't notice that the trait name might imply something else 🙈

I've pushed e8bc77a to include now explicitly in the name that it's about the DO NOTHING clause + added some lines of documentation.

@weiznich weiznich enabled auto-merge December 19, 2023 16:52
@weiznich weiznich added this pull request to the merge queue Dec 19, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 19, 2023
@weiznich weiznich added this pull request to the merge queue Dec 19, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 19, 2023
@weiznich weiznich added this pull request to the merge queue Dec 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 20, 2023
@weiznich weiznich added this pull request to the merge queue Dec 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 20, 2023
@weiznich weiznich added this pull request to the merge queue Dec 20, 2023
Merged via the queue into diesel-rs:master with commit 7b5c4ed Dec 20, 2023
37 checks passed
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.

3 participants