From 5232a8f8444d8abf4ac24b6a56562b0cf2573529 Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Thu, 11 Apr 2024 08:27:17 +0200 Subject: [PATCH 1/4] Pull in the column name caching change --- src/sync_connection_wrapper.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sync_connection_wrapper.rs b/src/sync_connection_wrapper.rs index ba40086..936d1ca 100644 --- a/src/sync_connection_wrapper.rs +++ b/src/sync_connection_wrapper.rs @@ -125,8 +125,9 @@ where { self.execute_with_prepared_query(source.as_query(), |conn, query| { use diesel::row::IntoOwnedRow; + let mut cache = None; conn.load(&query).map(|c| { - c.map(|row| row.map(IntoOwnedRow::into_owned)) + c.map(|row| row.map(|r| IntoOwnedRow::into_owned(r, &mut cache))) .collect::>>() }) }) From fedf0497c4d0c0ef691419071f1f7594d28ab169 Mon Sep 17 00:00:00 2001 From: Mohamed Belaouad Date: Mon, 22 Apr 2024 22:14:32 +0200 Subject: [PATCH 2/4] REMOVEME: Point to wip diesel branch --- Cargo.toml | 2 +- src/sync_connection_wrapper.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 22a4a7d..8d37941 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,4 +63,4 @@ members = [ ] [patch.crates-io] -diesel = { git = "http://github.com/diesel-rs/diesel", rev = "793de72" } +diesel = { git = "http://github.com/wattsense/diesel", "branch" = "optimize_owned_row"} diff --git a/src/sync_connection_wrapper.rs b/src/sync_connection_wrapper.rs index 936d1ca..67c2f54 100644 --- a/src/sync_connection_wrapper.rs +++ b/src/sync_connection_wrapper.rs @@ -125,7 +125,9 @@ where { self.execute_with_prepared_query(source.as_query(), |conn, query| { use diesel::row::IntoOwnedRow; - let mut cache = None; + let mut cache = <<::Row<'_, '_> as IntoOwnedRow< + ::Backend, + >>::Cache as Default>::default(); conn.load(&query).map(|c| { c.map(|row| row.map(|r| IntoOwnedRow::into_owned(r, &mut cache))) .collect::>>() From f5ec3d36bf640b3c1e02dc71afe1f8c204d40146 Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Mon, 6 May 2024 13:50:04 +0000 Subject: [PATCH 3/4] Update Cargo.toml --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 8d37941..9678686 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,4 +63,4 @@ members = [ ] [patch.crates-io] -diesel = { git = "http://github.com/wattsense/diesel", "branch" = "optimize_owned_row"} +diesel = { git = "http://github.com/diesel-rs/diesel", "rev" = "f2eb9b2"} From b03fabff926f9c6995d2d85ab491a03b59428578 Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Mon, 6 May 2024 16:11:51 +0200 Subject: [PATCH 4/4] Bump minimal supported rust version --- .github/workflows/ci.yml | 6 +++--- CHANGELOG.md | 1 + Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 193fb6c..3619953 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -227,11 +227,11 @@ jobs: - name: Check formating run: cargo +stable fmt --all -- --check minimal_rust_version: - name: Check Minimal supported rust version (1.65.0) + name: Check Minimal supported rust version (1.78.0) runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@1.65.0 + - uses: dtolnay/rust-toolchain@1.78.0 - uses: dtolnay/rust-toolchain@nightly - uses: taiki-e/install-action@cargo-hack - uses: taiki-e/install-action@cargo-minimal-versions @@ -240,4 +240,4 @@ jobs: # has broken min-version dependencies # cannot test sqlite yet as that crate # as broken min-version dependencies as well - run: cargo +stable minimal-versions check -p diesel-async --features "postgres bb8 deadpool mobc" + run: cargo +1.78.0 minimal-versions check -p diesel-async --features "postgres bb8 deadpool mobc" diff --git a/CHANGELOG.md b/CHANGELOG.md index 9beb475..85a7e0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/ * Added type `diesel_async::pooled_connection::mobc::PooledConnection` * MySQL/MariaDB now use `CLIENT_FOUND_ROWS` capability to allow consistent behavior with PostgreSQL regarding return value of UPDATe commands. +* The minimal supported rust version is now 1.78.0 ## [0.4.1] - 2023-09-01 diff --git a/Cargo.toml b/Cargo.toml index 9678686..4cba665 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://github.com/weiznich/diesel_async" keywords = ["orm", "database", "sql", "async"] categories = ["database"] description = "An async extension for Diesel the safe, extensible ORM and Query Builder" -rust-version = "1.65.0" +rust-version = "1.78.0" [dependencies] diesel = { version = "~2.1.1", default-features = false, features = ["i-implement-a-third-party-backend-and-opt-into-breaking-changes"]}