diesel v1.0.0 Release Notes
Release Date: 2018-01-02 // over 6 years ago-
โ Added
#[derive(QueryableByName)]
can now handle structs that have no associated table. If the#[table_name]
annotation is left off, you must annotate each field with#[sql_type = "Integer"]
#[derive(QueryableByName)]
can now handle embedding other structs. To have a field whose type is a struct which implementsQueryableByName
, rather than a single column in the query, add the annotation#[diesel(embed)]
The
QueryDsl
trait encompasses the majority of the traits that were previously in thequery_dsl
module.
๐ Fixed
Executing select statements on SQLite will no longer panic when the database returns
SQLITE_BUSY
table!
s which use theDatetime
type with MySQL will now compile correctly, even without thechrono
feature enabled.#[derive(QueryableByName)]
will now compile correctly when there is a shadowedResult
type in scope.BoxableExpression
can now be used with types that are not'static
๐ Changed
โ
Connection::test_transaction
now requires that the error returned implementDebug
.๐
query_builder::insert_statement::InsertStatement
is now accessed asquery_builder::InsertStatement
๐
query_builder::insert_statement::UndecoratedInsertRecord
is now accessed asquery_builder::UndecoratedInsertRecord
#[derive(QueryableByName)]
now requires that the table name be explicitly stated.๐ Most of the traits in
query_dsl
have been moved toquery_dsl::methods
. These traits are no longer exported inprelude
. This should not affect most apps, as the behavior of these traits is provided byQueryDsl
. However, if you were using these traits inwhere
clauses for generic code, you will need to explicitly douse diesel::query_dsl::methods::WhateverDsl
. You may also need to use UFCS in these cases.If you have a type which implemented
QueryFragment
orQuery
, which you intended to be able to callexecute
orload
on, you will need to manually implementRunQueryDsl
for that type. The trait should be unconditionally implemented (no where clause beyond what your type requires), and the body should be empty.
โ Removed
๐ All deprecated items have been removed.
๐
LoadDsl
andFirstDsl
have been removed. Their functionality now lives inLoadQuery
.