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

Build(deps): update diesel requirement from 1.4.5 to 2.0.0 #66

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Aug 30, 2022

Updates the requirements on diesel to permit the latest version.

Release notes

Sourced from diesel's releases.

Diesel 2.0.0 contains the contributions of more than 130 people. More than 1700 commits were submitted over a span of 3 years.

As part of this release we introduced numerous new features and rewrote large parts of the internal structure. Check out our changelog for a complete list of changes. As this is a new major Diesel release it contains a number of breaking changes. Checkout our migration guide for details about how to handle those breaking changes.

This release contains the following parts:

  • diesel 2.0.0-rc.0
  • diesel_derives 2.0.0-rc.0
  • diesel_migrations 2.0.0-rc.0
  • diesel_cli 2.0.0-rc.0
  • diesel_dynamic_schema 0.2.0-rc.0

This release marks a first prerelease of the upcoming Diesel 2.0 release. We ask you for your help to finalise the release. Checkout the "Timeline for a Diesel 2.0 release" section for details about how you can help us finishing the release.

Features

As a highlight Diesel 2.0.0 adds support for the following features:

  • Fully type checked GROUP BY support
  • Support for table aliasing
  • Support for defining select clauses via a corresponding type
  • Support for UNION/INTERSECT queries

Support for GROUP BY clauses

Diesel 2.0 adds support for GROUP BY clauses for select queries.

This means queries like the following one will just work.

 users::table.inner_join(posts::table)
    .group_by(users::id)
    .select((users::name, count(posts::id)))

As this is the case for all other Diesel built-in query dsl, this construct is fully checked at compile time. This means Diesel will ensure that the GROUP BY clause is valid for the current query and it will also ensure that expressions appearing inside of your SELECT clause will match the aggregation rules provided by the current GROUP BY clause.

Support for table aliasing

Diesel 2.0 adds support for table aliasing. This enables users to write queries, where a table appears more than once in the corresponding FROM clause. For this Diesel provides a Diesel::alias! macro that allows to define new alias for existing tables.

The following query demonstrates the support for this feature:

... (truncated)

Changelog

Sourced from diesel's changelog.

[2.0.0] 2022-08-29

Added

  • MysqlConnection::establish is able to initiate an SSL connection while specifying certificate roots. The database URL should contain an ssl_ca parameter with a path pointing to the certificate roots. See docs if desired.

  • MysqlConnection::establish is able to initiate an SSL connection. The database URL should contain ssl_mode parameter with a value of the MySQL client command option --ssl-mode if desired.

  • Connection and SimpleConnection traits are implemented for a broader range of r2d2::PooledConnection<M> types when the r2d2 feature is enabled.

  • Added DatabaseErrorKind::ReadOnlyTransaction to allow applications to handle errors caused by writing when only allowed to read.

  • All expression methods can now be called on expressions of nullable types.

  • Added BoxedSqlQuery. This allows users to do a variable amount of .sql or .bind calls without changing the underlying type.

  • Added .sql to SqlQuery and UncheckedBind to allow appending SQL code to an existing query.

  • The MacAddr SQL type can now be used without enabling the network-address feature.

  • Added support for SQLite's UPSERT. You can use this feature above SQLite version 3.24.0.

  • Added ability to create custom aggregate functions in SQLite.

  • Multiple aggregate expressions can now appear together in the same select clause. See the upgrade notes for details.

  • ValidGrouping has been added to represent whether an expression is valid for a given group by clause, and whether or not it's aggregate. It replaces the functionality of NonAggregate. See the upgrade notes for details.

  • It is now possible to inspect the type of values returned from the database in such a way to support constructing a dynamic value depending on this type.

  • Added a without-deprecated feature that unconditionally disables deprecated items. Use this feature flag to verify that none of your dependencies is setting the with-deprecated flag internally.

  • Added support for PostgreSQL's SIMILAR TO and NOT SIMILAR TO.

  • Added #[diesel(serialize_as)] analogous to #[diesel(deserialize_as)]. This allows customization of the serialization behaviour of Insertable and AsChangeset structs.

... (truncated)

Commits
  • 269e8b2 Merge pull request #3260 from weiznich/prepare_2.0_release
  • 107ea0f Merge remote-tracking branch 'upstream/master' into prepare_2.0_release
  • d4113ed Merge pull request #3291 from weiznich/update_diesel_async_to_remove_dbg
  • 91c16b4 Merge pull request #3288 from weiznich/speedup_compile_times_for_joins
  • 5047e40 Update diesel_async to remove some unneeded dbg calls and hopefully fix the m...
  • d3dc7e5 Add another compile-fail test for invalid joins
  • 3a8acc3 Rename SkipSelectableExpressionWrapper to `SkipSelectableExpressionBoundChe...
  • 7829e0d Update diesel/src/query_source/joins.rs
  • d5fc92b Fix issues with allowing invalid queries
  • d88e389 Make it compile in more cases + impl for left join
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [diesel](https:/diesel-rs/diesel) to permit the latest version.
- [Release notes](https:/diesel-rs/diesel/releases)
- [Changelog](https:/diesel-rs/diesel/blob/master/CHANGELOG.md)
- [Commits](diesel-rs/diesel@v1.4.5...v2.0.0)

---
updated-dependencies:
- dependency-name: diesel
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Aug 30, 2022
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@hsluoyz hsluoyz closed this Aug 30, 2022
@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Aug 30, 2022

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/cargo/diesel-2.0.0 branch August 30, 2022 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants