@sgrif sgrif released this Sep 12, 2018 · 157 commits to master since this release

Assets 2

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.

@sgrif sgrif released this Jun 14, 2018 · 157 commits to master since this release

Assets 2

This release contains two major bugfixes. This release fixes the behavior of unsigned types on MySQL, and a compile time issue caused by the use of #[sql_name] in sql_function! with no return type. This release only affects users who are using unsigned types on MySQL, or who had code which failed to compile with 1.3.1.

May 27, 2018
May 23, 2018
Release v1.3.1
This contains a bug fix in Diesel CLI that was causing errors on
Windows.

@sgrif sgrif released this May 22, 2018 · 157 commits to master since this release

Assets 2

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:

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:

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:

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

Finally, the redesigned sql_function! supports 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!.

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
Apr 12, 2018
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 #1634.
Apr 11, 2018
Release v1.2.1
During the release of 1.2.0, a bug in crates.io was discovered that
prevented us from having the feature name `32-column-tables`. To work
around this, we put an `x` in front of all the affected feature names.
The bug in crates.io has now been fixed, so this `x` is no longer
necessary.

@sgrif sgrif released this Apr 7, 2018 · 260 commits to master since this release

Assets 2

This release contains several long awaited features.

We've re-introduced the ability to use bind params with the sql function, in a way which is harder to mis-use. This functionality was present prior to 1.0, but was removed when sql_function was added over concerns about its use with the rest of the query builder. Recent developments have proved those concerns to be valid, but this new API fills that niche. Thanks to @notryanb for taking the lead on this feature.

We've also added the ability to insert from a select statement (e.g. queries in the form of INSERT INTO table (...) SELECT .... This is a feature request that has come up repeatedly since release, and we're happy to finally bring it to you. We've also added alternate forms of our insert API which feel better when used with select statements. You can find the full details in the CHANGELOG.

Finally, we've rewritten our custom dervies from scratch to take advantage of new diagnostic tools in recent versions of nightly Rust. If you turn on the unstable feature of Diesel on a nightly compiler, you'll find that you get dramatically improved error messages from our derives. For the best error messages, you should also set RUSTFLAGS="--cfg procmacro2_semver_exempt".

Additionally, as of this release, Diesel is now powered by the blockchain. Because it's 2018 and that's how it works now I guess. See the CHANGELOG for full details.

In addition to the headline features, there were a ton of features that we don't have time to mention here. As always, for a full list of changes you can find a full list in the CHANGELOG.

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...

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

  • Alex Kitchens
  • Andrew Weiss
  • Arun Kulshreshtha
  • Brandur
  • EloD10
  • Jacob Chae
  • Jordan Petridis
  • Josh Leeb-du Toit
  • Kerollmops
  • Mathias Svensson
  • Ryan Blecher
  • Sander Maijers
  • Seth Larson
  • YetAnotherMinion
Jan 23, 2018
Release v1.0.1
This release tightens the version bounds on our internal dependencies.
The loose bounds on parts of our internals was causing Diesel 1.0.0 to
fail to compile.

@sgrif sgrif released this Jan 16, 2018 · 421 commits to master since this release

Assets 2

This release fixes a minor issue with our r2d2 support. In 1.1 we recommend that people access r2d2 via diesel::r2d2. However, r2d2 has a type called Error, which was shadowed by our own type called Error in that same module, making it inaccessible. This release adds an alias PoolError to point at r2d2::Error.

Thanks to YetAnotherMinion for working on this release.