-
-
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 v2.0.0 rc.1 #3237
Merged
Merged
Prepare v2.0.0 rc.1 #3237
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
Fix links in migration guide
This commit fixes potential name collisions in code generated by the `table!` macro by prefixing function argument names with `__diesel_internal`. The underlying problem here is that rust accepts patterns as part of the function signature. This combined with the fact that each zero sized struct (so all column/table structs) are type + value at the same time results in problems as soon as the users tries to create a column/table with the same name as one of the used arguments. So for example if the users has a table that contains an `alias` column, that would have caused a name collision inside of the following function signature: ```rust fn map(column: C, alias: &$crate::query_source::Alias<S>) -> Self::Out ``` Rustc would have interpreted `alias` here as zero sized struct literal, which of course has a different type than the corresponding RHS. That results in a compiler error about mismatched types. This commit fixes this problem by prefixing the corresponding variables with `__diesel_internal`, which is hopefully reasonably uncommon, so that no one uses that as column name prefix.
…table_macro Fix potential name collisions in code generated by the `table!` macro
Co-authored-by: Christopher Fleetwood <[email protected]>
Minor doc improvements
Fixed believed error in documentation
This PR fixes the typo noted in diesel-rs#3144 (comment) . Related docs [here](https://docs.diesel.rs/master/diesel/expression_methods/trait.NullableExpressionMethods.html). docs: Fix typo in nullability operators section
Allow `ORDER BY` clauses to be used in any combination subquery by either put parenthesis around the subqueries (Postgres/Mysql) or adding a wrapping subquery (Sqlite).
…hods Add like, not_like and concat for PostgreSQL Bytea
…explicit_sort Allow `DISTINCT ON` to be used with queries containing an explicit sort order
Our `R2D2Connection::is_broken` implementations where broken in such a way that they marked any valid connection as broken as soon as it was checked into the pool again. This resulted in the pool opening new connections everytime a connection was checked out of the pool, which obviously removes the possibility of reusing the same connection again and again. This commit fixes that issue and adds some tests to ensure that we do not break this again in the future.
This commit replaces some recursive macros with simpler implementations by generating non recursive where clauses by just forwarding to the next smaller impl on the corresponding tuple. According to my measurements this reduces the build time for a `cargo check --no-default-features --features "sqlite 64-column-table"` build from ~1min 20s to ~1min 05s.
Technically this seems to be a breaking change, but as we haven't released 2.0 yet this is fine.
Add a WIP postgres row-by-row implementation
* Improve the row by row iterator implementation * Minor documentation simplification
…_inner Reduces amount of generated LLVM code per query
Minor cleanup for diesel-rs#3213
Updated ipnetwork to 0.20
Some people don't like to write down migrations, as depending on your workflow, they take a lot of time to write, are *never* used (esp. when you have CD pipelines), and consequently are typically largely untested. We support this for those (like us) who would rather write a new `up` migration to revert unwanted changes through CI/CD if necessary. (NB: The original issue is that since we wouldn't fill down.sql, we would have to go edit that file to add a newline for formatting everytime we create a migration, and then leave it there even though it doesn't mean anything.)
Note: it would probably be possible to have a more strongly typed implementation that prevents from calling revert when down.sql is not present but not sure if that's worth the complexity.
Co-authored-by: Georg Semmler <[email protected]>
CLI: Allow running without a `down.sql` migration
Ah we may want to do the "add documentation" about #3216 (reply in thread) as well somewhere as people are likely to read it these days? |
@Ten0 Mind opening a PR for this? |
This commit adds some notes about the used join syntax and how this can affect query planing on postgres based on the discussion in diesel-rs#3216. Additionally it removes the restricting that the same table cannot be joined twice. Instead we point to `diesel::alias!` now.
Co-authored-by: Yuki Okushi <[email protected]>
Improve the documentation of `QueryDsl::inner_join`
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.
No description provided.