Skip to content

Commit

Permalink
Prepare a 2.1.5 release
Browse files Browse the repository at this point in the history
  • Loading branch information
1Dragoon committed Mar 10, 2024
1 parent 4674560 commit 143bc32
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 38 deletions.
72 changes: 38 additions & 34 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,20 @@
All user visible changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/), as described
for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md)
For any named minimal supported Rust version we guarantee that it is possible to build Diesel with the
default features enabled using some set of dependencies. Those set of dependencies is not necessarily
an up to date version of the specific dependency. We check this by using the unstable `-Z minimal-version` cargo flag.
For any named minimal supported Rust version we guarantee that it is possible to build Diesel with the
default features enabled using some set of dependencies. Those set of dependencies is not necessarily
an up to date version of the specific dependency. We check this by using the unstable `-Z minimal-version` cargo flag.
Increasing the minimal supported Rust version will always be coupled at least with a minor release.

## Unreleased

## [2.1.5] 2024-03-09

* Fix `impl SqlOrd` postgres > postgres_backend feature flag
* Allow `Queryable` to be used with multiple table names
* Fix new deprecated functions from chrono 0.4.35
* Fix ./bin/test feature flag calls.

## [2.1.4] 2023-11-14

* Update `libsqlite3-sys` to allow version 0.27 as well
Expand All @@ -23,7 +30,7 @@ Increasing the minimal supported Rust version will always be coupled at least wi
## Fixed

* Fixed another potential breaking chaneg around queries containing `DISTINCT ON` and `ORDER BY` clauses consisting of custom sql expressions (e.g. `.nullable()`)
* Fixed an issue where `#[derive(Selectable)]` and `#[diesel(check_for_backend)]` generates invalid rust code if the struct contains lifetimes/generic types
* Fixed an issue where `#[derive(Selectable)]` and `#[diesel(check_for_backend)]` generates invalid rust code if the struct contains lifetimes/generic types

## [2.1.1] 2023-08-25

Expand All @@ -36,17 +43,16 @@ Increasing the minimal supported Rust version will always be coupled at least wi
* Fixed an issue where `#[diesel(check_for_backend)]` ignored `#[diesel(deserialize_as)]` attributes
* Fixed several issues with the new `#[derive(MultiConnection)]` feature
* Fixed some edge cases in our sqlite timestamp parsing behaviour
* `diesel migration generate --diff-schema` now respects table filters as setup for `print-schema` via `diesel.toml`
* `diesel migration generate --diff-schema` now respects table filters as setup for `print-schema` via `diesel.toml`
* Fixed a potential breaking change around queries containing `DISTINCT ON` and `ORDER BY` clauses consisting of custom sql expressions (e.g. `diesel::dsl::sql`)

## Added
## Added

* Support for bigdecimal 0.4


## [2.1.0] 2023-05-26

### Changed
### Changed

* The minimal officially supported rustc version is now 1.65.0

Expand All @@ -66,7 +72,7 @@ Increasing the minimal supported Rust version will always be coupled at least wi

## [2.0.4] 2023-04-18

## Fixed
## Fixed

* Workaround the missing name resolution in rust-analyzer. This should fix type inference for some diesel queries. (It remains broken for queries containing `.filter()`/`.inner_join()`/`.left_join()`. These require fixes in rust-analyzer itself)
* Fixed a bug that could lead to inserting null values instead of empty values for custom sqlite types
Expand All @@ -77,9 +83,9 @@ Increasing the minimal supported Rust version will always be coupled at least wi

* Support for `libsqlite3-sys` 0.26

## [diesel_derives 2.0.2] 2023-03-13
## [diesel_derives 2.0.2] 2023-03-13

## Fixed
## Fixed

* Fixing the fallout of a breaking change from `quote` by not using their internal API

Expand Down Expand Up @@ -148,7 +154,7 @@ Increasing the minimal supported Rust version will always be coupled at least wi
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
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`.
Expand All @@ -172,7 +178,7 @@ Increasing the minimal supported Rust version will always be coupled at least wi

* Diesel CLI will now generate SQL type definitions for SQL types that are not supported by diesel out of the box. It's possible to disable this behavior via the `generate_missing_sql_type_definitions` config option.

* Added an option to `#[derive(Insertable)]` that let you insert `NULL` values instead of `DEFAULT` values for `Option<T>`
* Added an option to `#[derive(Insertable)]` that let you insert `NULL` values instead of `DEFAULT` values for `Option<T>`

* Added support for all the derive attributes being inside `#[diesel(...)]`

Expand Down Expand Up @@ -277,12 +283,12 @@ Increasing the minimal supported Rust version will always be coupled at least wi
card implementations for types implementing `Queryable<ST, DB>` or `QueryableByName<DB>`
so non generic code does not require any change. For generic code you likely need to
replace a trait bound on `Queryable<ST, DB>` with a trait bound on `FromSqlRow<ST, DB>`
and a bound to `QueryableByName<DB>` with `FromSqlRow<Untyped, DB>`.
and a bound to `QueryableByName<DB>` with `FromSqlRow<Untyped, DB>`.

* CLI flags of `only-tables` and `except-tables` are now interpreted as regular expressions.
Similarly, `only_tabels` and `except_tables` in `diesel.toml` are treated as regular expressions.

* Now you can sort column fields by name with the `column-sorting` option.
* Now you can sort column fields by name with the `column-sorting` option.
It can be set to either `ordinal_position` (default) or `name`.
This ensures stable sorting even if columns are removed and re-added.

Expand All @@ -295,25 +301,25 @@ Increasing the minimal supported Rust version will always be coupled at least wi

* `TypeMetadata::MetadataLookup` is now `?Sized`.

* Multiple implementations of `Connection<Backend=Pg>` are now possible
* Multiple implementations of `Connection<Backend=Pg>` are now possible
because of the new `PgMetadataLookup` trait.

* For the `Pg` backend, `TypeMetadata::MetadataLookup` has changed to `dyn PgMetadataLookup`.

* Diesel's migration framework was rewritten from the ground. Existing migrations continue to
* Diesel's migration framework was rewritten from the ground. Existing migrations continue to
be compatible with the rewrite, but code calling into `diesel_migrations` requires an update.
See the [migration guide](2-0-migration) for details.

* `eq_any()` now emits a `= ANY()` expression for the postgresql backend instead of `IN()`
* `ne_all()` now emits a `!= ALL()` expression for the postgresql backend instead of `NOT IN()`
* The sqlite backend now uses a single batch insert statement if there are now default values present
* The sqlite backend now uses a single batch insert statement if there are now default values present
in the values clause

* The MySQL connection is using the CLIENT_FOUND_ROWS from now on. This means that updating rows without changing any values will return the number of matched rows (like most other SQL servers do), as opposed to the number of changed rows.

* The definition of `ToSql::to_sql` and `QueryFragment::walk_ast` has changed to allow serializing values without
* The definition of `ToSql::to_sql` and `QueryFragment::walk_ast` has changed to allow serializing values without
copying the value itself. This is useful for database backends like sqlite where you can directly share a buffer
with the database. Beside of the changed signature, existing impls of this trait should remain unchanged in almost
with the database. Beside of the changed signature, existing impls of this trait should remain unchanged in almost
all cases.

* The `PIPES_AS_CONCAT` sql_mode is no longer set
Expand Down Expand Up @@ -360,14 +366,14 @@ queries or set `PIPES_AS_CONCAT` manually.
* We've refactored our type level representation of nullable values. This allowed us to
fix multiple long standing bugs regarding the correct handling of nullable values in some
corner cases (#104, #2274)

* Parenthesis are now inserted around all infix operations provided by diesel's `ExpressionMethods` traits

* Queries containing a `distinct on` clause check now on compile time that a compatible order clause was set.

* Implementations of custom SQLite SQL functions now check for panics

* `diesel print-schema` now generates `Array<Nullable<ST>>` rather than `Array<ST>` for Postgres Array types. Existence of
* `diesel print-schema` now generates `Array<Nullable<ST>>` rather than `Array<ST>` for Postgres Array types. Existence of
`NULL` values in database arrays would previously result in deserialization errors. Non-nullable arrays are now opt
in (by schema patching).

Expand All @@ -381,10 +387,9 @@ queries or set `PIPES_AS_CONCAT` manually.

* `diesel::pg::upsert` has been deprecated to support upsert queries on more than one backend.
Please use `diesel::upsert` instead.

* `diesel::dsl::any` and `diesel::dsl::all` are now deprecated in
favour of `ExpressionMethods::eq_any()` and `ExpressionMethods::ne_all()`

* `diesel::dsl::any` and `diesel::dsl::all` are now deprecated in
favour of `ExpressionMethods::eq_any()` and `ExpressionMethods::ne_all()`

[2-0-migration]: https://github.com/diesel-rs/diesel/blob/master/guide_drafts/migration_guide.md

Expand Down Expand Up @@ -437,7 +442,6 @@ queries or set `PIPES_AS_CONCAT` manually.
* Fixed issue where rustdoc failed to build the documentation
* `diesel_derives` and `diesel_migrations` are updated to syn 1.0


## [1.4.2] - 2019-03-19

### Fixed
Expand Down Expand Up @@ -1564,7 +1568,7 @@ queries or set `PIPES_AS_CONCAT` manually.
* Added partial support for composite primary keys.

* Added support for PostgreSQL `NULLS FIRST` and `NULLS LAST` when sorting.
See https://docs.diesel.rs/diesel/prelude/trait.SortExpressionMethods.html
See <https://docs.diesel.rs/diesel/prelude/trait.SortExpressionMethods.html>
for details.

* Added support for the `timestamp with time zone` type in PostgreSQL (referred
Expand Down Expand Up @@ -1634,22 +1638,22 @@ queries or set `PIPES_AS_CONCAT` manually.

* The `Insertable!` macro can now be used instead of `#[insertable_into]` for
those wishing to avoid syntax extensions from `diesel_codegen`. See
https://docs.diesel.rs/diesel/macro.Insertable!.html for details.
<https://docs.diesel.rs/diesel/macro.Insertable!.html> for details.

* The `Queryable!` macro can now be used instead of `#[derive(Queryable)]` for
those wishing to avoid syntax extensions from `diesel_codegen`. See
https://docs.diesel.rs/diesel/macro.Queryable!.html for details.
<https://docs.diesel.rs/diesel/macro.Queryable!.html> for details.

* The `Identifiable!` macro can now be used instead of `#[derive(Identifiable)]` for
those wishing to avoid syntax extensions from `diesel_codegen`. See
https://docs.diesel.rs/diesel/macro.Identifiable!.html for details.
<https://docs.diesel.rs/diesel/macro.Identifiable!.html> for details.

* The `AsChangeset!` macro can now be used instead of `#[changeset_for(table)]`
for those wishing to avoid syntax extensions from `diesel_codegen`. See
https://docs.diesel.rs/diesel/macro.AsChangeset!.html for details.
<https://docs.diesel.rs/diesel/macro.AsChangeset!.html> for details.

* Added support for the PostgreSQL `ALL` operator. See
https://docs.diesel.rs/diesel/pg/expression/dsl/fn.all.html for details.
<https://docs.diesel.rs/diesel/pg/expression/dsl/fn.all.html> for details.

* Added support for `RETURNING` expressions in `DELETE` statements. Implicitly
these queries will use `RETURNING *`.
Expand All @@ -1676,8 +1680,8 @@ queries or set `PIPES_AS_CONCAT` manually.
`#[column_name(name)]`.

* The structure of `DatabaseError` has changed to hold more information. See
https://docs.diesel.rs/diesel/result/enum.Error.html and
https://docs.diesel.rs/diesel/result/trait.DatabaseErrorInformation.html for
<https://docs.diesel.rs/diesel/result/enum.Error.html> and
<https://docs.diesel.rs/diesel/result/trait.DatabaseErrorInformation.html> for
more information

* Structs which implement `Identifiable` can now be passed to `update` and
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ members = [
"examples/sqlite/getting_started_step_2",
"examples/sqlite/getting_started_step_3",
]
resolver = "2"

[profile.dev.package.insta]
opt-level = 3
Expand Down
2 changes: 1 addition & 1 deletion diesel/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "diesel"
version = "2.1.4"
version = "2.1.5"
license = "MIT OR Apache-2.0"
description = "A safe, extensible ORM and Query Builder for PostgreSQL, SQLite, and MySQL"
readme = "README.md"
Expand Down
4 changes: 2 additions & 2 deletions diesel_compile_tests/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion diesel_derives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "diesel_derives"
version = "2.1.2"
version = "2.1.3"
license = "MIT OR Apache-2.0"
description = "You should not use this crate directly, it is internal to Diesel."
documentation = "https://diesel.rs/guides/"
Expand Down

0 comments on commit 143bc32

Please sign in to comment.