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
27 files changed
tree: 46b2efae68df399d48da15bcdebd7b9823a54de9
  1. .github/
  2. bin/
  3. diesel/
  4. diesel_cli/
  5. diesel_compile_tests/
  6. diesel_derives/
  7. diesel_infer_schema/
  8. diesel_migrations/
  9. diesel_tests/
  10. examples/
  11. guide_drafts/
  12. migrations/
  13. .appveyor.yml
  14. .editorconfig
  15. .env.sample
  16. .gitignore
  17. .rustfmt.toml
  18. .travis.yml
  19. Cargo.toml
  20. CHANGELOG.md
  21. clippy.toml
  22. code_of_conduct.md
  23. CONTRIBUTING.md
  24. LICENSE-APACHE
  25. LICENSE-MIT
  26. README.md
README.md

A safe, extensible ORM and Query Builder for Rust

Build Status Appveyor Build Status Gitter Crates.io

API Documentation: latest releasemaster branch

Homepage

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

Getting Started

Find our extensive Getting Started tutorial at https://diesel.rs/guides/getting-started. Guides on more specific features are coming soon.

Code of conduct

Anyone who interacts with Diesel in any space, including but not limited to this GitHub repository, must follow our code of conduct.

License

Licensed under either of these:

Contributing

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.