This release wouldn't be possible without the support of our contributors and sponsors. If you want to support diesels development, consider joining the reviewer team, submitting PR's, help writing documentation or sponsor the maintainers.
Added
- Support
[print_schema] exclude_custom_type_definitions = ["Vector"]
. If acustom type
matches one element on the list it's skipped. - Added automatic usage of all sqlite
rowid
aliases when no explicit primary key is defined forprint-schema
- Added a
#[dsl::auto_type]
attribute macro, allowing to infer type of query fragment functions - Added the same type inference on
Selectable
derives, which allows skipping specifyingselect_expression_type
most of the time, in turn enabling most queries to be written using just aSelectable
derive. - Added an optional
#[diesel(skip_insertion)]
field attribute to theInsertable
derive macro, allowing fields which map to generated columns to be skipped during insertion. - Support for connection instrumentation. This allows to inspect any query run by your application
- Logging in diesel-cli
- Support for libsqlite3-sys 0.28
- Add
sqlite-integer-primary-key-is-bigint
configuration option, usable with SQLite 3.37 or above, allowing to useBigInt
forINTEGER PRIMARY KEY
columns in SQLite for tables without theWITHOUT ROWID
attribute (SQLite doc). - Support for multiple
print_schema
entry indiesel.toml
(e.g.[print_schema.user1]
), which allows generating multiple schema.rs files - Add support for
COPY TO
andCOPY FROM
statements - Add support for mapping
chrono::Duration
to postgresql'sINTERVAL
sql type - Added
serialize_database_to_buffer
anddeserialize_readonly_database_from_buffer
methods inSqliteConnection
to support serialization/deserialization of SQLite databases to and from byte buffers. - Added
SerializedDatabase
wrapper type for a serialized database that is dynamically allocated by callingserialize_database_to_buffer
. This RAII wrapper deallocates the memory when it goes out of scope withsqlite3_free
.
Changed
- The minimal officially supported rustc version is now 1.78.0
- Deprecated
sql_function!
in favour ofdefine_sql_function!
which provides compatibility with#[dsl::auto_type]
- Deserialization error messages now contain information about the field that failed to deserialize
New Contributors
- @tp-woven made their first contribution in #3650
- @aumetra made their first contribution in #3657
- @sintemal made their first contribution in #3660
- @DannyGoldberg made their first contribution in #3681
- @ernest-rudnicki made their first contribution in #3690
- @cr0sh made their first contribution in #3699
- @dsp made their first contribution in #3713
- @snf made their first contribution in #3714
- @moulins made their first contribution in #3724
- @surban made their first contribution in #3734
- @gmanninglive made their first contribution in #3725
- @BlackDex made their first contribution in #3747
- @retro-git made their first contribution in #3792
- @moyeah made their first contribution in #3805
- @kriswuollett made their first contribution in #3777
- @szepeviktor made their first contribution in #3821
- @hgzimmerman made their first contribution in #3841
- @brocaar made their first contribution in #3854
- @peter-scholtens made their first contribution in #3855
- @formlogic-kirk made their first contribution in #3862
- @yagince made their first contribution in #3888
- @c410-f3r made their first contribution in #3879
- @dullbananas made their first contribution in #3904
- @colem213 made their first contribution in #3908
- @greyblake made their first contribution in #3917
- @longsleep made their first contribution in #3926
- @dennybiasiolli made their first contribution in #3939
- @epompeii made their first contribution in #3849
- @stormshield-kg made their first contribution in #3940
- @sabify made their first contribution in #3943
- @forest1102 made their first contribution in #3796
- @dvogel made their first contribution in #3921
- @Tanguille made their first contribution in #3956
- @ISibboI made their first contribution in #3751
- @DavisRayM made their first contribution in #3982
- @kornelski made their first contribution in #3980
- @momobel made their first contribution in #3977
- @Sagebati made their first contribution in #4002
- @MixusMinimax made their first contribution in #4026
- @tommymcc made their first contribution in #4021
- @dessalines made their first contribution in #4019
- @bachmannscode made their first contribution in #4015
- @McDic made their first contribution in #4037
- @z33ky made their first contribution in #4030
- @JonBoyleCoding made their first contribution in #3944
Full Changelog: v2.1.0...v2.2.0