diesel v0.7.0 Release Notes
Release Date: 2016-08-01 // over 7 years ago-
โ Added
The initial APIs have been added in the form of
#[has_many]
and#[belongs_to]
. See [the module documentation][associations-module] for more information.The
Insertable!
macro can now be used instead of#[insertable_into]
for those wishing to avoid syntax extensions fromdiesel_codegen
. See https://docs.diesel.rs/diesel/macro.Insertable!.html for details.The
Queryable!
macro can now be used instead of#[derive(Queryable)]
for those wishing to avoid syntax extensions fromdiesel_codegen
. See https://docs.diesel.rs/diesel/macro.Queryable!.html for details.The
Identifiable!
macro can now be used instead of#[derive(Identifiable)]
for those wishing to avoid syntax extensions fromdiesel_codegen
. See https://docs.diesel.rs/diesel/macro.Identifiable!.html for details.The
AsChangeset!
macro can now be used instead of#[changeset_for(table)]
for those wishing to avoid syntax extensions fromdiesel_codegen
. See https://docs.diesel.rs/diesel/macro.AsChangeset!.html for details.โ Added support for the PostgreSQL
ALL
operator. See https://docs.diesel.rs/diesel/pg/expression/dsl/fn.all.html for details.โ Added support for
RETURNING
expressions inDELETE
statements. Implicitly these queries will useRETURNING *
.
๐ Changed
๐ Diesel now targets
nightly-2016-07-07
. Future releases will update to a newer nightly version on the date that Rust releases.diesel_codegen
has been split into two crates.diesel_codegen
anddiesel_codegen_syntex
. See this commit for migration information.Most structs that implement
Queryable
will now also need#[derive(Identifiable)]
.infer_schema!
on SQLite now accepts a larger range of type namestypes::VarChar
is now an alias fortypes::Text
. Most code should be unaffected by this. PG array columns are treated slightly differently, however. If you are usingvarchar[]
, you should switch totext[]
instead.Struct fields annotated with
#[column_name="name"]
should be changed to#[column_name(name)]
.๐ The structure of
DatabaseError
has changed to hold more information. See https://docs.diesel.rs/diesel/result/enum.Error.html and https://docs.diesel.rs/diesel/result/trait.DatabaseErrorInformation.html for more informationโก๏ธ Structs which implement
Identifiable
can now be passed toupdate
anddelete
. This means you can now writedelete(&user).execute(&connection)
instead ofdelete(users.find(user.id)).execute(&connection)
๐ [associations-module]: https://docs.diesel.rs/diesel/associations/index.html
๐ Fixed
&&[T]
can now be used in queries. This allows using slices with things like#[insertable_into]
.