Commit Graph

504 Commits

Author SHA1 Message Date
Georg Semmler
0b054180bc
Cleanup the changelog
* We reorder the changelog a bit to highlight important possibly
breaking changes
* We add the missing 1.4.x releases (copied from the 1.4.x branch)
* We add a note about the minimal supported rust version
2022-04-05 22:10:11 +02:00
Erlend Langseth
37fc2d704c
Revert PR #2944 (FROM ONLY <table> clause) 2022-03-22 13:54:58 +01:00
Thomas Constantine Moore
382a39b553 typo 2022-03-06 12:38:40 -06:00
Thomas Constantine Moore
9ab77a16b3
Merge branch 'diesel-rs:master' into master 2022-02-27 17:24:49 -08:00
Justice4Joffrey
8ddb542d8f
Update CHANGELOG.md
Co-authored-by: Georg Semmler <github@weiznich.de>
2022-02-24 08:54:07 +00:00
Otto Castle
9ac586e683 changelog 2022-02-23 10:36:50 +00:00
Thomas Constantine Moore
9754975e8f add ssl_ca to accepted connection url query params 2022-02-18 12:55:58 -05:00
Thomas BESSOU
00e9fb7757 add CHANGELOG entry 2022-02-17 17:32:37 +01:00
Alexei Pastuchov
a06e025d40
changelog: note support MySQL SSL connection support
* add `ssl_mode` support to `MysqlConnection::establish`
* remove support for `mysqlclient-sys` < `0.2.5`
2022-01-30 12:56:09 +01:00
czotomo
0d429206c2 modify the changelog 2022-01-23 21:32:57 +01:00
Filip Gospodinov
fda3410c17 Add Sqlite support for the RETURNING clause
Add Sqlite support for the `RETURNING` clause by leveraging
the implementation for Postgres. So this change is essentially
just adjusting the build system to enable the support if a
Sqlite version which supports the `RETURNING` clause [1] is
complied against.

The "insert record with returning" unit tests for Postgres
couldn't be re-used because Sqlite doesn't support batch insert.
Because those tests provide value for Postgres, new versions
for Sqlite have been created which don't use batch insert.

[1] https://sqlite.org/releaselog/3_35_0.html
2022-01-06 10:16:16 +01:00
Filip Gospodinov
0d5e3a6a1c Tighten minimum required version for libsqlite3-sys
`libsqlite3-sys` is built with the `bundled_bindings`
feature enabled which was introduced in commit [1]
which in turn is part of `libsqlite3-sys` 0.17.2.

Versions below 0.17.2 will hence fail to compile.
Therefore, tighten the minimum required version.

[1] c70d148542
2021-12-30 22:39:46 +01:00
Georg Semmler
b9da55943d
Add a changelog entry 2021-12-16 10:19:53 +01:00
Yin Jifeng
a93fc70028 support serialize_as for AsChangeset 2021-12-12 11:39:07 +08:00
Pavan Kumar Sunkara
8e4e7c4a9c Address review comments 2021-12-10 01:25:40 +00:00
Erlend Langseth
e4560517f3 FROM ONLY <table> clause 2021-11-11 15:08:57 +01:00
blackghost1987
af84cb543c
Merge branch 'master' into mysql_client_found_rows_flag 2021-11-02 14:55:55 +01:00
Georg Semmler
fa3dc3ea04
Allow to specialize QueryFragment impls easily
The main motivation of this change is to allow third party backends like
diesel-oci to speciaize `QueryFragment` impls without using the unstable
`specialization` feature. This is done by introducing a new marker trait
`SqlDialect` that has an associated type for each specializable
`QueryFragment` impl.

Beside of that this allows us to fix a few long standing issues:
* `eq_any` can now use `= ANY()` on postgres
* We can now support batch inserts for sqlite as long as there is no
default value in the insert values

Fixes #2898
Fixes #2694 (by deprecating the corresponding functions)
2021-10-05 20:02:44 +02:00
Juhasz Sandor
fab4e6124f changelog update 2021-09-03 13:05:56 +02:00
Sébastien Santoro
d87c61de39 Fix changelog typo 2021-08-25 11:26:24 +00:00
Georg Semmler
f445bc1cbf
Merge pull request #2827 from weiznich/prepared_statements_for_certain_insert_variants
Various insert improvments
2021-08-12 09:12:41 +00:00
Jiří Sejkora
e81c58763d
Fix typo in code sample in 2.0 changelog
The real name of the type is `EmbeddedMigrations`.
2021-08-07 05:49:13 +02:00
Georg Semmler
d5f60ad952
Various insert improvments
* Cache insert statments from queries, as those are safe to cache if the
  query itself is safe to cache
* Add a way to directly insert from a statically sized array
* Decouple default values from insert expressions and allow to generate
  insertable implementations that do not use the default values.
   + This unblocks real batch inserts on sqlite
   + This allows cache the prepared statements for insert from statically sized arrays as we know the size at compile time here
* Update the benchmarks to use the statically compile time variant.
  Other implementations also use prepared statements here, so this is
just fair
2021-07-27 13:27:40 +02:00
Georg Semmler
ed2fc1477d
Readd missing changlog entry 2021-06-23 08:51:06 +02:00
Georg Semmler
2b03ce3d31
Generate SQL type definitions for unknown types
This commit adds support for generating SQL type definitions for unknown
types to `diesel print-schema`. The basic idea is to generate the
corresponding marker type to always end up with an existing schema.
Especially this does not generate any code that is required for
serializing/deserializing rust values.
2021-06-22 11:16:20 +02:00
Filip Gospodinov
878de33f83 Add support for no argument functions for Sqlite
Closes #2790
2021-05-25 16:42:09 +02:00
Georg Semmler
cfb9506715
Interacting with the database requires a mutable connection
This commit changes all connection implementations to take `&mut self`
on all methods that interact with the database.
This unblocks the following features:

* Returnig a cursor/iterator from a `RunQueryDsl` method
* Removing some unsafe code and interior mutability inside the current
  connection implementations
* Possibly the first step of a async `Connection` variant to workaround
  the `Future` not `Send` issues there.
2021-05-18 10:08:48 +02:00
hi-rustin
78295d4009 Add changelog 2021-04-27 22:08:51 +08:00
Pavan Kumar Sunkara
4dfb934603
Merge pull request #2738 from hi-rustin/rustin-patch-SQLITE
Added support for SQLite's `IS` and `IS NOT`
2021-04-21 19:07:25 +01:00
hi-rustin
11f4369ca5 Added support for SQLite's IS and IS NOT 2021-04-21 17:13:30 +08:00
Lukas Markeffsky
a1adbcb60f more tests, improve docs, update changelog 2021-04-19 14:33:32 +02:00
Georg Semmler
125072fa85
Apply suggestions from code review 2021-04-15 16:51:29 +00:00
Georg Semmler
bfcf3d58ee
Cleanup catch_unwind handling
This fixes the handling of panics in custom SQLite functions
by having a `catch_unwind` before ffi the boundary and by correctly
setting the required `UnwindSafe` trait bounds in a similar way as it is
done by rusqlite.
2021-03-31 11:46:37 +02:00
Alexander 'z33ky' Hirsch
4307a11dd3
Expose sqlite's sqlite3_create_collation() 2021-03-29 11:11:14 +02:00
Georg Semmler
3653a5e992
Merge branch 'master' into rewrite/migrations 2021-03-22 09:30:27 +00:00
Georg Semmler
8f6e792caa
Update CHANGELOG.md
Co-authored-by: Henry Boisdequin <boisdequinhenry19@gmail.com>
2021-03-22 09:29:46 +00:00
Georg Semmler
a4fd10e9ee
Update CHANGELOG.md
Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2021-03-21 10:34:40 +00:00
Georg Semmler
757842994c
Merge pull request #2676 from weiznich/bug/fix_potential_use_after_free
Bug/fix potential use after free
2021-03-19 08:18:06 +00:00
Georg Semmler
cc823ba4ef
Add a changelog entry 2021-03-18 15:22:13 +01:00
Georg Semmler
be80e62d99
Merge the updated changelog into master 2021-03-12 10:58:47 +01:00
Henry Boisdequin
238fe0bfa5 add changelog entry 2021-02-23 09:38:55 +05:30
Andrew Safigan
1c84f9fc69 docs: 📝 update the CHANGELOG 2021-02-11 12:22:16 -05:00
Georg Semmler
c48f40638c
Fix #1641
We enforce now that the order clause matches the corresponding
distinct_on clause. I've choosen to gate setting a distinct on clause on
having a corresponding order clause.
2021-01-28 15:51:46 +01:00
Georg Semmler
9635290484
Merge pull request #2599 from Ten0/faillible_queryable_stillgeneric
Faillible Queryable
2021-01-27 10:31:44 +00:00
Thomas BESSOU
7a79581439 Fix changelog after d2af2263
d2af2263c7 had to roll back the impl of `AsExpression<Nullable<sql_types::Bool>>` for `E: AsExpression<sql_types::Bool>`, to allow for more type inference, but forgot to remove the corresponding line in the changelog.
2021-01-26 14:42:17 +01:00
Thomas BESSOU
9275b9ae41 Add corresponding doc to the changelog 2021-01-26 14:38:40 +01:00
Grégory OBANOS
6c6fcc0003 Add changelog entry for combination queries 2020-12-03 15:04:57 +01:00
Georg Semmler
0493edb44a
Add a changelog entry 2020-11-27 09:39:40 +01:00
Iban Eguia
ce0dd4a4c6
Added a note in the changelog about the new minimum supported chrono version 2020-11-19 20:23:05 +01:00
Thomas Eizinger
cc8f0b7350
Support #[diesel(serialize_as)] on fields of Insertable structs
Similar to how `#[diesel(deserialize_as)]` can be used for `Queryable`
structs to customize which type is being constructed, we add support
for doing the same thing for `Insertable` structs.

The conversion happens using the std trait `Into` which takes ownership
during conversion. As such, as soon as any field within an `Insertable`
struct has a `#[diesel(serialize_as)]` attribute, we no longer generate
an implementation of `Insertable` for borrowed versions of this struct.

Fields annotated with `#[diesel(serialize_as)]` are also incompatible
with `#[diesel(embed)]`. Using both on the same field will result in
a compile-error.
2020-11-06 10:59:05 +11:00