-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Prepare a 2.2.8 release #4490
Open
weiznich
wants to merge
15
commits into
diesel-rs:2.2.x
Choose a base branch
from
weiznich:prepare/2.2.8
base: 2.2.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Prepare a 2.2.8 release #4490
Conversation
This file contains 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
I was told "OK I see this error message but my struct already implements Selectable so that's not useful". As it turns out, this message would sometimes be misunderstood as the `check_for_backend` part only relating to the `QueryableByName` usage, but not to the `Selectable` usage, whereas that is in fact the key point. Hopefully this new writing will avoid this. :)
Co-authored-by: Georg Semmler <[email protected]>
…ckend]` Currently when a struct has `#[derive(Selectable)]`, `#[check_for_backend(...)]`, and `embed`s another `Selectable` struct that doesn't have `#[check_for_backend]` but whose `FromSqlRow` and `Selectable` impls don't match with regards to `CompatibleType`, the `#[check_for_backend]` does not point us to which of the embed fields is the culprit, because they are ignored. It seems that this can be avoided by generating the checks even for `embed` fields. The check for this was disabled in d6d9260 when the experimented-with approach was "always generating the check on Selectable" with the justification that it was consequently checked by the underlying field's own Selectable checks, before it was decided to instead have the `#[check_for_backend(...)]` attribute, so it seems that this justification was indeed legitimate at the time it was introduced, and doesn't hold anymore now.
This commit turns the `read_*` functions of the `SqliteValue` type into public functions, which makes it easier for third party crates to access the underlying sqlite values in a performant way. This enables crates to not clone for example the string, but rather reuse the string slice we got from sqlite instead. This also turns all these functions into methods that require a mutable reference instead of a shared reference as technically each of those methods might mutate the underlying value according to the sqlite documentation.
This commit relaxes a trait constraint that restricted our copy from implementation for `Insertable` types to 12 columns. That happened because we used the `Default` impl for tuples from the rust standard library to construct the column types internally. The standard library only provides these impl for up to 12 tuple elements. The fix is to simply construct that type by calling `Default` for each of the column types seperatly and then constructing the tuple from that. I choose to not write a test for that as it doesn't change functionality in any meaningful way other than just allowing larger tuples.
This commit prepares a 2.2.8 release that includes the following changes: * diesel-rs#4472 * diesel-rs#4484 * diesel-rs#4486 * diesel-rs#4480
2f9dc74
to
5291e99
Compare
Remove trailing whitespace after ASC/DESC postfix operators
Add space in "DISTINCT ON (...) "
Remove unnecessary space from DELETE that causes duplication
Ten0
approved these changes
Feb 17, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This commit prepares a 2.2.8 release that includes the following
changes:
#[diesel(embed)]
fields be somewhat-checked by#[check_for_backend]
#4484copy_from
with more than 12 column #4486I would like to issue the release next Friday.