Skip to content

Tags: Weinbery/diesel

Tags

v1.4.2

Toggle v1.4.2's commit message
Release v1.4.2

This is a minor bug fix release. Diesel now inserts parenthesis around
all mathematical operations, to preserve the order of operations given
by Rust, particularly if the user had used parenthesis. This means that
`(2.into_sql() + 3) * 4` will now generate SQL which evaluates to 20
instead of 14.

v1.4.1

Toggle v1.4.1's commit message
1.4.1

This release fixes a minor memory safety issue in SQLite. This bug would only occur in an error handling branch that should never occur in practice.

v1.4.0

Toggle v1.4.0's commit message
Release diesel 1.4.0

New Features
==

In contrast to the last release most changes in this release are minor or internal. We've added support for newer versions of some dependency crates (libsqlite-sys, uuid, ipnetwork).

Diesel CLI got a command line flag to check if a generated schema matches  the already existing one. This is useful for CI setups to check there if the committed generated schema file matches the committed migrations.

We've added support for the `diesel_mange_updated_at('table_name')` SQL function on SQLite. This function handles the setup of an trigger that automatically updates the `updated_at` column on update operations.

Additionally several helpers were added to support the deserialisation of tuples and composite types on PostgreSQL.

As always, for a full list of changes you can find it in [the changelog](https://github.com/diesel-rs/diesel/blob/v1.4.0/CHANGELOG.md)

Thanks
==

Thank you to everyone who helped make this release happen through bug reports, and discussion on Gitter. While we don't have a way to collect stats on that form of contribution, it's greatly appreciated.

In addition to the Diesel core team, 29 people contributed code to this release. A huge thank you to:

* Aleksey Ivanov
* Andrew Speed
* Carlos Diaz-Padron
* Daniel Silverstone
* Dirkjan Ochtman
* Dominik Sander
* Eyal Kalderon
* Galuh Sahid
* Hirokazu Hata
* Jake Goulding
* Jo Liss
* Josh Leeb-du Toit
* Kevin Stenerson
* kpcyrd
* Marcus Stollsteimer
* Matej Stuchlik
* Nikita Sivakov
* notryanb
* Rasmus Kaj
* Richard Petrie
* Rotem Yaari
* Ryan Leckey
* Sergio Benitez
* Simon Heath
* Stephen Muss
* Trinh Hoang Anh

v1.3.1(infer_schema)

Toggle v1.3.1(infer_schema)'s commit message
Add compatibility for newer diesel versions to infer_schema!

v1.3.3

Toggle v1.3.3's commit message
Release v1.3.3

This is a small bugfix release, addressing an issue with MySQL 8.0. The
behavior of the C API in libmysqlclient changed in this version of
MySQL, causing problems when a connection pool was used with Diesel.

If you are not using MySQL, or are on a version older than 8.0, this
release does not affect you.

v1.3.2

Toggle v1.3.2's commit message
Release v1.3.2

This release includes several bug fixes. This release only affects users
of unsigned types on MySQL, or users whose code failed to compile with
1.3.1.

v1.3.1

Toggle v1.3.1's commit message
Release v1.3.1

This contains a bug fix in Diesel CLI that was causing errors on
Windows.

v1.3.0

Toggle v1.3.0's commit message
Release v1.3.0

New Features
==

This release includes a couple of major changes to how Diesel projects
are developed. In the past, we've had 2 ways to generate `schema.rs`. A
procedural macro called `infer_schema!`, and a CLI command `diesel
print-schema`. We've recommended using the CLI command for a long time,
but `infer_schema!` was still useful for early prototypes.

At the beginning of a project, your database schema changes much more
frequently. It's extremely annoying to have to remember to run a
second command after running your migrations.

Diesel CLI 1.3 now supports a configuration file to customize its
behavior. One of the new capabilities this provides is the ability to
automatically regenerate `schema.rs` whenever you run or revert a
migration. This means you no longer have to remember to run `diesel
print-schema` when things change.

Because of this, we are deprecating `diesel_infer_schema`. 1.3 will be
the final release of that crate. However, `diesel_infer_schema` 1.3 will
continue to work with `diesel` until at least Diesel 2.0. You can see
all of the capabilities of the new configuration file at
http://diesel.rs/guides/configuring-diesel-cli.

This release also includes a complete redesign of the [`sql_function!`]
macro. The new syntax is significantly closer to normal Rust. For
example, what used to be written as:

```rust
sql_function! {
    lower, lower_t, (x: Text) -> Text,
    "Here are the docs for `lower`
It's awkward to make multiline"
}
```

Can now be written as:

```rust
sql_function! {
    /// Here are the docs for `lower`
    /// It's just a normal doc comment.
    fn lower(x: Text) -> Text;
}
```

The new form also supports much more than the old one, including
aggregate functions, function renaming, and generic functions. Things
like `MAX` could previously not be expressed with `sql_function!`.
However, now the definition looks like this:

```rust
sql_function! {
    #[aggregate]
    fn max<ST: SqlOrd + IntoNullable>(expr: ST) -> ST::Nullable;
}
```

Finally, the redesigned `sql_function!` supoprts user defined
functions on SQLite. SQLite differs from other databases, in that custom
functions aren't defined in SQL. Instead you give it a C function
pointer to use for the body. With Diesel, you can just give us any Rust
closure that takes appropriate argument types, and we'll handle gluing
that to SQLite for you.

You can find examples for all of this in [the docs for
`sql_function!`][`sql_function!`].

[`sql_function!`]: http://docs.diesel.rs/diesel/macro.sql_function.html

In addition to the headline features, this release includes a ton of
quality of life changes including expanded support for locking clauses,
more global support for mathematic operators, and more. As always, for a
full list of changes you can find it in [the changelog].

[the changelog]: https://github.com/diesel-rs/diesel/blob/v1.3.0/CHANGELOG.md

Thanks
==

Thank you to everyone who helped make this release happen through bug
reports, and discussion on Gitter. While we don't have a way to collect
stats on that form of contribution, it's greatly appreciated.

In addition to the Diesel core team, 12 people contributed code to this
release. A huge thank you to:

- Aleksey Ivanov
- Christopher Brickley
- David Reid
- Diggory Blake
- Graham Turner
- Katharina
- Matt Kraai
- Nick Babcock
- Richard Petrie
- Simon Dickson
- Sunrin SHIMURA
- Thierry Berger

v1.2.2

Toggle v1.2.2's commit message
Release v1.2.2

The way we had deprecated `large-tables` and friends was breaking
builds. We still need to improve how this gets deprecated in general,
but in the short term we can fix it by allowing warnings.

Fixes diesel-rs#1634.