commit | f613f3784763dbb59fa70a053f6f1eb8e206f103 | [log] [tgz] |
---|---|---|
author | Sean Griffin <sean@seantheprogrammer.com> | Mon Jan 15 08:34:57 2018 -0700 |
committer | Sean Griffin <sean@seantheprogrammer.com> | Mon Jan 15 08:50:54 2018 -0700 |
tree | 46b2efae68df399d48da15bcdebd7b9823a54de9 | |
parent | c56a162dca3d666314ccb63eba7f8acc5920cb2d [diff] |
Release v1.1.0 Improved Support for Adding New Types ------------------------------------- The primary focus of this release was improving the ergonomics of adding support for new types in Diesel. For implementing new SQL types, we've added `#[derive(SqlType)]` which implements many traits that you need to implement for every SQL type. See the documentation for `HasSqlType` for details on this derive. For implementing new mappings, we've added `#[derive(FromSqlRow)]` and `#[derive(AsExpression)]`. These derives will replace the majority of the boilerplate that was previously required when supporting new types. Adding support for new types in Diesel 1.1 should only require implementing `FromSql` and `ToSql`. The derives will handle the rest. We've also provided `FromSql` impls for `*const str` and `*const [u8]`. Due to the design of `FromSql`, we can't provide impls for `&str` and `&[u8]` without a breaking change. However many impls just need to parse a string or some bytes, and don't need the allocation that would come from `String` or `Vec<u8>`. This will require unsafe code to use, but should make certain implementations more efficient. Finally, we've restructured how our serialize/deserialize modules are structured, and provided type aliases to make implementations of `FromSql` and `ToSql` more consise. `r2d2_diesel` is Now Part of Diesel ----------------------------------- Finally, this release merges `r2d2_diesel` into Diesel itself. The main benefit of doing this is that we can implement `Connection` for `PooledConnection`, removing the need for explicit `&*` when using r2d2. This should also help to prevent version mismatches when changing Diesel versions. To use the new r2d2 support, remove `r2d2` and `r2d2_diesel` from your Cargo.toml. Add the `r2d2` to your enabled features on `diesel`. Replace `extern crate r2d2` with `pub use diesel::r2d2`. Replace any `r2d2_diesel::` with `diesel::r2d2::`. Thanks ------ In addition to the headline features, there were dozens of smaller additions which should make using Diesel even better! As always, you can check the CHANGELOG for a full list of changes in this release. In addition to the Diesel core team, 8 people contributed to this release. A huge thank you to: - Ashe Connor - Chris Pick - Evan - Georg Semmler - MarcManiez - Martin Lindhe - Oliver Schneider - Ryan Blecher
API Documentation: latest release – master branch
Diesel gets rid of the boilerplate for database interaction and eliminates runtime errors without sacrificing performance. It takes full advantage of Rust's type system to create a low overhead query builder that “feels like Rust.”
Find our extensive Getting Started tutorial at https://diesel.rs/guides/getting-started. Guides on more specific features are coming soon.
Anyone who interacts with Diesel in any space, including but not limited to this GitHub repository, must follow our code of conduct.
Licensed under either of these:
Unless you explicitly state otherwise, any contribution you intentionally submit for inclusion in the work, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions.