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 implements QueryableByName, 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 the query_dsl module.

    ๐Ÿ›  Fixed

    • Executing select statements on SQLite will no longer panic when the database returns SQLITE_BUSY

    • table!s which use the Datetime type with MySQL will now compile correctly, even without the chrono feature enabled.

    • #[derive(QueryableByName)] will now compile correctly when there is a shadowed Result type in scope.

    • BoxableExpression can now be used with types that are not 'static

    ๐Ÿ”„ Changed

    • โœ… Connection::test_transaction now requires that the error returned implement Debug.

    • ๐Ÿ— query_builder::insert_statement::InsertStatement is now accessed as query_builder::InsertStatement

    • ๐Ÿ— query_builder::insert_statement::UndecoratedInsertRecord is now accessed as query_builder::UndecoratedInsertRecord

    • #[derive(QueryableByName)] now requires that the table name be explicitly stated.

    • ๐Ÿšš Most of the traits in query_dsl have been moved to query_dsl::methods. These traits are no longer exported in prelude. This should not affect most apps, as the behavior of these traits is provided by QueryDsl. However, if you were using these traits in where clauses for generic code, you will need to explicitly do use diesel::query_dsl::methods::WhateverDsl. You may also need to use UFCS in these cases.

    • If you have a type which implemented QueryFragment or Query, which you intended to be able to call execute or load on, you will need to manually implement RunQueryDsl 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 and FirstDsl have been removed. Their functionality now lives in LoadQuery.