mirror of
https://github.com/diesel-rs/diesel.git
synced 2024-10-04 17:47:17 +03:00
3da5d9d1f4
One of the oldest issues in Diesel was that we limited the number of tables that could appear in a single query to 2. The problem was never about having more than 2 tables, but safely and correctly proving in the type system what would and could not be selected from that join. With 0.14, that restriction has been removed. The query builder now supports joins containing an arbitrary number of tables. You may find that you need to call `enable_multi_table_joins!` for a few tables, but that need should go away in the future as specialization matures. In addition to the headline feature, this release includes support for several new datatypes (including `NUMERIC`/`DECIMAL` which has been widely requested), and other small quality of life improvements. As always, you can see [the CHANGELOG](https://github.com/diesel-rs/diesel/blob/v0.14.0/CHANGELOG.md) for the full release notes. The Road to 1.0 ------ A recent point of discussion among the core team has been what remaining blockers we have for releasing a version 1.0. The roadmap doesn't necessarily include everything that would make us "feature complete". It focuses on the set of changes that we think are likely to require breaking changes. We expect that this will be the last 0.x release. You can follow the milestone [here](https://github.com/diesel-rs/diesel/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.0). Additionally, we all agreed that the biggest blocker to a 1.0 release is improvements to our documentation. We're going to be doing a big push in the coming months to clean things up, and are looking for help from the community. You can follow that project [here](https://github.com/diesel-rs/diesel/projects/1), or just come join us in [our gitter room](https://gitter.im/diesel-rs/diesel?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) to talk about how you can help. There will be a blog post with more details about this in the coming weeks. Contributors ----- In addition to the core team, 10 people contributed to this release. A huge thank you to: * Dorian Scheidt * FliegendeWurst * Georg Semmler * JD Gonzales * Jim McGrath * Kieran * Ruben De Smet * Sunrin SHIMURA (keen) * Tshepang Lekhonkhobe * theduke Core Team Changes ------ With this release, we are also making some changes to the core team to better reflect the current active maintainers. In recognition of his fantastic work, we're pleased to welcome @Eijebong to the core team. Many early members of the team have also since moved onto other projects. To reflect that, Mike Piccolo, Matt Casper, and Sam Phippen are all being moved to the core team alumni.
1.7 KiB
1.7 KiB
Diesel Codegen
This crate implements Diesel's procedural macros using the Macros 1.1 system. It
requires nightly Rust from October 10, 2016 or later. For usage on stable
Rust, see
diesel_codegen_syntex
.
Diesel Codegen provides custom derive implementations for
Queryable
, Identifiable
,
Insertable
, AsChangeset
, and Associations
.
It also provides the macros infer_schema!
,
infer_table_from_schema!
, and
embed_migrations!
.
Using this crate
First, add this crate to Cargo.toml as so:
diesel_codegen = { version = "0.14.0", features = ["postgres"] }
If you are using SQLite, be sure to specify sqlite
instead of postgres
in
the features
section.
Next, at the root of your crate add:
#[macro_use] extern crate diesel_codegen;
See the documentation for each trait/macro for additional details and configuration options.