Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: weiznich/diesel_async
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.4.0
Choose a base ref
...
head repository: weiznich/diesel_async
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.5.0
Choose a head ref

Commits on Sep 1, 2023

  1. Verified

    This commit was signed with the committer’s verified signature.
    weiznich Georg Semmler
    Copy the full SHA
    ec38eca View commit details

Commits on Sep 5, 2023

  1. Copy the full SHA
    b6adeb0 View commit details
  2. Copy the full SHA
    b2abc7d View commit details

Commits on Sep 7, 2023

  1. document the dummy functions

    kmdreko committed Sep 7, 2023
    Copy the full SHA
    8c0e1a7 View commit details
  2. add link

    kmdreko committed Sep 7, 2023
    Copy the full SHA
    66636b2 View commit details

Commits on Sep 8, 2023

  1. Merge pull request #106 from kmdreko/fix/avoid-where-self-clause-on-gats

    fix: avoid where Self: 'a clause on GATs
    weiznich authored Sep 8, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e3c3511 View commit details
  2. Add a From<AsyncConnection> for AsyncConnectionWrapper

    + example for running pending migrations
    Valentin Mariette committed Sep 8, 2023
    Copy the full SHA
    e165e8c View commit details
  3. Copy the full SHA
    1122763 View commit details
  4. Merge pull request #109 from DevLazio/main

    Add a From<AsyncConnection> for AsyncConnectionWrapper
    weiznich authored Sep 8, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1e18b37 View commit details

Commits on Oct 27, 2023

  1. Exporting a PooledConnection type for mobc (#123)

    * Exporting a PooledConnection type for mobc
    
    * Unreleased version
    
    * Reverting formatting
    porkbrain authored Oct 27, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f203e6d View commit details

Commits on Nov 1, 2023

  1. Copy the full SHA
    b413db6 View commit details
  2. Merge pull request #129 from SergioBenitez/deadpool-upgrade

    Update deadpool to 0.10
    weiznich authored Nov 1, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    287e380 View commit details

Commits on Nov 10, 2023

  1. More dependency updates

    weiznich committed Nov 10, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    weiznich Georg Semmler
    Copy the full SHA
    d7d117f View commit details
  2. Merge pull request #131 from weiznich/update_mysql

    More dependency updates
    weiznich authored Nov 10, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d5f6b7b View commit details
  3. Better handling of the postgres connection background task

    * Propagate errors to the user
    * Cancel the task if we drop the connection
    weiznich committed Nov 10, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    weiznich Georg Semmler
    Copy the full SHA
    6c73e23 View commit details
  4. Merge pull request #132 from weiznich/fix_postgres_background_task

    Better handling of the postgres connection background task
    weiznich authored Nov 10, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    017ebe2 View commit details

Commits on Feb 17, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    65c6eb6 View commit details

Commits on Feb 18, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    1ef43d2 View commit details

Commits on Mar 1, 2024

  1. MySQL/MariaDB now use CLIENT_FOUND_ROWS capability so that UPDATE com…

    …mand return is consistent with PostgreSQL
    
    Signed-off-by: Soblow "Opale" Xaselgio <113846014+Soblow@users.noreply.github.com>
    Soblow committed Mar 1, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Soblow Soblow
    Copy the full SHA
    db5a3db View commit details
  2. Update CHANGELOG to display the change in behavior for MariaDB/MySQL …

    …UPDATE
    
    Signed-off-by: Soblow "Opale" Xaselgio <113846014+Soblow@users.noreply.github.com>
    Soblow committed Mar 1, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Soblow Soblow
    Copy the full SHA
    50a300b View commit details
  3. Add some missing links in CHANGELOG.md

    Signed-off-by: Soblow "Opale" Xaselgio <113846014+Soblow@users.noreply.github.com>
    Soblow committed Mar 1, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    Soblow Soblow
    Copy the full SHA
    cafb86d View commit details

Commits on Mar 15, 2024

  1. Merge pull request #140 from Soblow/fix/mysql_update_rowcount

    Fix #138 (Incoherent UPDATE return for MySQL/MariaDB)
    weiznich authored Mar 15, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    d02798c View commit details

Commits on Mar 29, 2024

  1. Copy the full SHA
    fec4622 View commit details

Commits on Apr 5, 2024

  1. Depend on tokio/net with async-connection-wrapper

    This is needed because tokio::runtime::Builder.enable_io is called.
    Which is only available with specific tokio features.
    momobel committed Apr 5, 2024
    Copy the full SHA
    e77ef84 View commit details

Commits on Apr 12, 2024

  1. Introduce SyncConnectionWrapper with async API around diesel::Connection

    This type wraps a `diesel::connection::Connection` fulfilling needed
    requirement with a `diesel_async::AsyncConnection` trait.
    
    It can be useful  when desires
    * using a sync `Connection` implementation (sqlite) in async context
    * using the same code base within async crates needing multiple backends
      (sqlite + postgres)
    momobel authored and weiznich committed Apr 12, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    weiznich Georg Semmler
    Copy the full SHA
    c721091 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    weiznich Georg Semmler
    Copy the full SHA
    58bcc91 View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    weiznich Georg Semmler
    Copy the full SHA
    1039eab View commit details
  4. Update the CI

    * Fix the mysql runner
    * Add MacOS M1 support
    * Add sqlite support
    * General housekeeping (actions)
    weiznich committed Apr 12, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    weiznich Georg Semmler
    Copy the full SHA
    bd40d8d View commit details
  5. Verified

    This commit was signed with the committer’s verified signature.
    weiznich Georg Semmler
    Copy the full SHA
    1b9a4fd View commit details
  6. Verified

    This commit was signed with the committer’s verified signature.
    weiznich Georg Semmler
    Copy the full SHA
    2eb75b2 View commit details
  7. Verified

    This commit was signed with the committer’s verified signature.
    weiznich Georg Semmler
    Copy the full SHA
    d5a1d4f View commit details
  8. Merge pull request #146 from WattSense/sync_wrapper_cleanup

    Add SyncConnectionWrapper type
    weiznich authored Apr 12, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    2a026c0 View commit details

Commits on Apr 22, 2024

  1. Pull in the column name caching change

    weiznich authored and momobel committed Apr 22, 2024
    Copy the full SHA
    5232a8f View commit details
  2. Copy the full SHA
    fedf049 View commit details

Commits on May 3, 2024

  1. Verified

    This commit was signed with the committer’s verified signature.
    weiznich Georg Semmler
    Copy the full SHA
    2f445b2 View commit details
  2. Fix some clippy warnings

    weiznich committed May 3, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    weiznich Georg Semmler
    Copy the full SHA
    002c67e View commit details
  3. More CI fixes

    weiznich committed May 3, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    weiznich Georg Semmler
    Copy the full SHA
    e6a15be View commit details
  4. Merge pull request #150 from weiznich/fix/ci

    Fix/ci
    weiznich authored May 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    1bd4d53 View commit details
  5. Update deadpool to 0.11

    jrandolf authored and weiznich committed May 3, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    weiznich Georg Semmler
    Copy the full SHA
    c482d59 View commit details
  6. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e1dbe14 View commit details

Commits on May 6, 2024

  1. Update Cargo.toml

    weiznich authored May 6, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    f5ec3d3 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    weiznich Georg Semmler
    Copy the full SHA
    b03fabf View commit details
  3. Merge pull request #147 from WattSense/sync_wrapper_use_cache

    Use owned row cache in sync wrapper
    weiznich authored May 6, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b8b01cc View commit details

Commits on May 31, 2024

  1. Bump diesel to 2.2

    weiznich committed May 31, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    weiznich Georg Semmler
    Copy the full SHA
    3bc6789 View commit details

Commits on Jun 3, 2024

  1. Merge pull request #152 from weiznich/bump/diesel_2_2

    Bump diesel to 2.2
    weiznich authored Jun 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    1551549 View commit details

Commits on Jun 8, 2024

  1. Update custom_types.rs

    dullbananas authored Jun 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ab807ad View commit details
  2. Update custom_types.rs

    dullbananas authored Jun 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c0f2921 View commit details
  3. Update custom_types.rs

    dullbananas authored Jun 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c52ebad View commit details
  4. Update custom_types.rs

    dullbananas authored Jun 8, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    56e95f6 View commit details

Commits on Jun 9, 2024

  1. attempt fix

    dullbananas authored Jun 9, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c8e37c1 View commit details
Showing with 2,137 additions and 301 deletions.
  1. +125 −30 .github/workflows/ci.yml
  2. +19 −1 CHANGELOG.md
  3. +58 −23 Cargo.toml
  4. +5 −0 README.md
  5. +4 −4 examples/postgres/pooled-with-rustls/Cargo.toml
  6. +1 −3 examples/postgres/pooled-with-rustls/src/main.rs
  7. +17 −0 examples/postgres/run-pending-migrations-with-rustls/Cargo.toml
  8. +1 −0 ...postgres/run-pending-migrations-with-rustls/migrations/2023-09-08-075742_dummy_migration/down.sql
  9. +1 −0 ...s/postgres/run-pending-migrations-with-rustls/migrations/2023-09-08-075742_dummy_migration/up.sql
  10. +53 −0 examples/postgres/run-pending-migrations-with-rustls/src/main.rs
  11. +17 −0 examples/sync-wrapper/Cargo.toml
  12. +9 −0 examples/sync-wrapper/diesel.toml
  13. 0 examples/sync-wrapper/migrations/.keep
  14. +1 −0 examples/sync-wrapper/migrations/00000000000000_diesel_initial_setup/down.sql
  15. +3 −0 examples/sync-wrapper/migrations/00000000000000_diesel_initial_setup/up.sql
  16. +137 −0 examples/sync-wrapper/src/main.rs
  17. +25 −4 src/async_connection_wrapper.rs
  18. +84 −0 src/doctest_setup.rs
  19. +27 −14 src/lib.rs
  20. +107 −36 src/mysql/mod.rs
  21. +37 −28 src/pg/error_helper.rs
  22. +454 −98 src/pg/mod.rs
  23. +8 −1 src/pooled_connection/bb8.rs
  24. +16 −8 src/pooled_connection/deadpool.rs
  25. +11 −1 src/pooled_connection/mobc.rs
  26. +14 −9 src/pooled_connection/mod.rs
  27. +10 −4 src/run_query_dsl/mod.rs
  28. +7 −0 src/stmt_cache.rs
  29. +370 −0 src/sync_connection_wrapper/mod.rs
  30. +129 −0 src/sync_connection_wrapper/sqlite.rs
  31. +19 −0 src/transaction_manager.rs
  32. +39 −4 tests/custom_types.rs
  33. +257 −0 tests/instrumentation.rs
  34. +43 −18 tests/lib.rs
  35. +27 −13 tests/pooling.rs
  36. +2 −2 tests/type_check.rs
155 changes: 125 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -4,6 +4,8 @@ on:
push:
branches:
- main
- 0.3.x
- 0.4.x
- 0.2.x

name: CI Tests
@@ -21,19 +23,16 @@ jobs:
fail-fast: false
matrix:
rust: ["stable", "beta", "nightly"]
backend: ["postgres", "mysql"]
os: [ubuntu-latest, macos-latest, windows-latest]
backend: ["postgres", "mysql", "sqlite"]
os: [ubuntu-latest, macos-13, macos-14, windows-2019]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache cargo registry
uses: actions/cache@v2
uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-${{ matrix.backend }}-cargo-${{ hashFiles('**/Cargo.toml') }}

- name: Set environment variables
@@ -44,9 +43,19 @@ jobs:
- name: Set environment variables
shell: bash
if: matrix.rust == 'nightly'
if: matrix.backend == 'postgres' && matrix.os == 'windows-2019'
run: |
echo "RUSTFLAGS=--cap-lints=warn" >> $GITHUB_ENV
echo "AWS_LC_SYS_NO_ASM=1"
- name: Set environment variables
shell: bash
if: matrix.rust != 'nightly'
run: |
echo "RUSTFLAGS=-D warnings" >> $GITHUB_ENV
echo "RUSTDOCFLAGS=-D warnings" >> $GITHUB_ENV
- uses: ilammy/setup-nasm@v1
if: matrix.backend == 'postgres' && matrix.os == 'windows-2019'

- name: Install postgres (Linux)
if: runner.os == 'Linux' && matrix.backend == 'postgres'
@@ -66,24 +75,87 @@ jobs:
mysql -e "create database diesel_test; create database diesel_unit_test; grant all on \`diesel_%\`.* to 'root'@'localhost';" -uroot -proot
echo "DATABASE_URL=mysql://root:root@localhost/diesel_test" >> $GITHUB_ENV
- name: Install sqlite (Linux)
if: runner.os == 'Linux' && matrix.backend == 'sqlite'
run: |
curl -fsS --retry 3 -o sqlite-autoconf-3400100.tar.gz https://www.sqlite.org/2022/sqlite-autoconf-3400100.tar.gz
tar zxf sqlite-autoconf-3400100.tar.gz
cd sqlite-autoconf-3400100
CFLAGS="$CFLAGS -O2 -fno-strict-aliasing \
-DSQLITE_DEFAULT_FOREIGN_KEYS=1 \
-DSQLITE_SECURE_DELETE \
-DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_ENABLE_RTREE=1 \
-DSQLITE_SOUNDEX=1 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_OMIT_LOOKASIDE=1 \
-DSQLITE_ENABLE_DBSTAT_VTAB \
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 \
-DSQLITE_ENABLE_LOAD_EXTENSION \
-DSQLITE_ENABLE_JSON1 \
-DSQLITE_LIKE_DOESNT_MATCH_BLOBS \
-DSQLITE_THREADSAFE=1 \
-DSQLITE_ENABLE_FTS3_TOKENIZER=1 \
-DSQLITE_MAX_SCHEMA_RETRY=25 \
-DSQLITE_ENABLE_PREUPDATE_HOOK \
-DSQLITE_ENABLE_SESSION \
-DSQLITE_ENABLE_STMTVTAB \
-DSQLITE_MAX_VARIABLE_NUMBER=250000" \
./configure --prefix=/usr \
--enable-threadsafe \
--enable-dynamic-extensions \
--libdir=/usr/lib/x86_64-linux-gnu \
--libexecdir=/usr/lib/x86_64-linux-gnu/sqlite3
sudo make
sudo make install
echo "DATABASE_URL=/tmp/test.db" >> $GITHUB_ENV
- name: Install postgres (MacOS)
if: runner.os == 'macOS' && matrix.backend == 'postgres'
if: matrix.os == 'macos-13' && matrix.backend == 'postgres'
run: |
initdb -D /usr/local/var/postgres
pg_ctl -D /usr/local/var/postgres start
brew install postgresql@14
brew services start postgresql@14
sleep 3
createuser -s postgres
echo "DATABASE_URL=postgres://postgres@localhost/" >> $GITHUB_ENV
- name: Install postgres (MacOS M1)
if: matrix.os == 'macos-14' && matrix.backend == 'postgres'
run: |
brew install postgresql@14
brew services start postgresql@14
sleep 3
createuser -s postgres
echo "DATABASE_URL=postgres://postgres@localhost/" >> $GITHUB_ENV
- name: Install sqlite (MacOS)
if: runner.os == 'macOS' && matrix.backend == 'sqlite'
run: |
brew install sqlite
echo "DATABASE_URL=/tmp/test.db" >> $GITHUB_ENV
- name: Install mysql (MacOS)
if: runner.os == 'macOS' && matrix.backend == 'mysql'
if: matrix.os == 'macos-13' && matrix.backend == 'mysql'
run: |
brew install --overwrite mariadb@10.8
/usr/local/opt/mariadb@10.8/bin/mysql_install_db
/usr/local/opt/mariadb@10.8/bin/mysql.server start
brew install mariadb@11.2
/usr/local/opt/mariadb@11.2/bin/mysql_install_db
/usr/local/opt/mariadb@11.2/bin/mysql.server start
sleep 3
/usr/local/opt/mariadb@10.8/bin/mysql -e "ALTER USER 'runner'@'localhost' IDENTIFIED BY 'diesel';" -urunner
/usr/local/opt/mariadb@10.8/bin/mysql -e "create database diesel_test; create database diesel_unit_test; grant all on \`diesel_%\`.* to 'runner'@'localhost';" -urunner -pdiesel
/usr/local/opt/mariadb@11.2/bin/mysqladmin -u runner password diesel
/usr/local/opt/mariadb@11.2/bin/mysql -e "create database diesel_test; create database diesel_unit_test; grant all on \`diesel_%\`.* to 'runner'@'localhost';" -urunner
echo "DATABASE_URL=mysql://runner:diesel@localhost/diesel_test" >> $GITHUB_ENV
- name: Install mysql (MacOS M1)
if: matrix.os == 'macos-14' && matrix.backend == 'mysql'
run: |
brew install mariadb@11.2
ls /opt/homebrew/opt/mariadb@11.2
/opt/homebrew/opt/mariadb@11.2/bin/mysql_install_db
/opt/homebrew/opt/mariadb@11.2/bin/mysql.server start
sleep 3
/opt/homebrew/opt/mariadb@11.2/bin/mysqladmin -u runner password diesel
/opt/homebrew/opt/mariadb@11.2/bin/mysql -e "create database diesel_test; create database diesel_unit_test; grant all on \`diesel_%\`.* to 'runner'@'localhost';" -urunner
echo "DATABASE_URL=mysql://runner:diesel@localhost/diesel_test" >> $GITHUB_ENV
- name: Install postgres (Windows)
@@ -106,6 +178,22 @@ jobs:
run: |
echo "DATABASE_URL=mysql://root@localhost/diesel_test" >> $GITHUB_ENV
- name: Install sqlite (Windows)
if: runner.os == 'Windows' && matrix.backend == 'sqlite'
shell: cmd
run: |
choco install sqlite
cd /D C:\ProgramData\chocolatey\lib\SQLite\tools
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
lib /machine:x64 /def:sqlite3.def /out:sqlite3.lib
- name: Set variables for sqlite (Windows)
if: runner.os == 'Windows' && matrix.backend == 'sqlite'
shell: bash
run: |
echo "C:\ProgramData\chocolatey\lib\SQLite\tools" >> $GITHUB_PATH
echo "SQLITE3_LIB_DIR=C:\ProgramData\chocolatey\lib\SQLite\tools" >> $GITHUB_ENV
echo "DATABASE_URL=C:\test.db" >> $GITHUB_ENV
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@master
with:
@@ -115,24 +203,29 @@ jobs:

- name: Test diesel_async
run: cargo +${{ matrix.rust }} test --manifest-path Cargo.toml --no-default-features --features "${{ matrix.backend }} deadpool bb8 mobc"
- name: Run examples

- name: Run examples (Postgres)
if: matrix.backend == 'postgres'
run: cargo +${{ matrix.rust }} check --manifest-path examples/postgres/pooled-with-rustls/Cargo.toml
run: |
cargo +${{ matrix.rust }} check --manifest-path examples/postgres/pooled-with-rustls/Cargo.toml
cargo +${{ matrix.rust }} check --manifest-path examples/postgres/run-pending-migrations-with-rustls/Cargo.toml
- name: Run examples (Sqlite)
if: matrix.backend == 'sqlite'
run: |
cargo +${{ matrix.rust }} check --manifest-path examples/sync-wrapper/Cargo.toml
rustfmt_and_clippy:
name: Check rustfmt style && run clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cache cargo registry
uses: actions/cache@v2
uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: clippy-cargo-${{ hashFiles('**/Cargo.toml') }}

- name: Remove potential newer clippy.toml from dependencies
@@ -142,20 +235,22 @@ jobs:
find ~/.cargo/registry -iname "*clippy.toml" -delete
- name: Run clippy
run: cargo +stable clippy --all
run: cargo +stable clippy --all --all-features

- 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@v3
- uses: dtolnay/rust-toolchain@1.65.0
- uses: actions/checkout@v4
- 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
- name: Check diesel-async
# cannot test mysql yet as that crate
# has broken min-version dependencies
run: cargo +stable minimal-versions check -p diesel-async --features "postgres bb8 deadpool mobc"
# cannot test sqlite yet as that crate
# as broken min-version dependencies as well
run: cargo +1.78.0 minimal-versions check -p diesel-async --features "postgres bb8 deadpool mobc"
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,21 @@ All user visible changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/), as described
for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md)

## [Unreleased]

## [0.5.0] - 2024-07-19

* Added type `diesel_async::pooled_connection::mobc::PooledConnection`
* MySQL/MariaDB now use `CLIENT_FOUND_ROWS` capability to allow consistent behaviour with PostgreSQL regarding return value of UPDATe commands.
* The minimal supported rust version is now 1.78.0
* Add a `SyncConnectionWrapper` type that turns a sync connection into an async one. This enables SQLite support for diesel-async
* Add support for `diesel::connection::Instrumentation` to support logging and other instrumentation for any of the provided connection impls.
* Bump minimal supported mysql_async version to 0.34

## [0.4.1] - 2023-09-01

* Fixed feature flags for docs.rs

## [0.4.0] - 2023-09-01

* Add a `AsyncConnectionWrapper` type to turn a `diesel_async::AsyncConnection` into a `diesel::Connection`. This might be used to execute migrations via `diesel_migrations`.
@@ -48,7 +63,6 @@ in the pool should be checked if they are still valid

* Fix prepared statement leak for the mysql backend implementation


## 0.1.0 - 2022-09-27

* Initial release
@@ -60,3 +74,7 @@ in the pool should be checked if they are still valid
[0.3.0]: https://github.com/weiznich/diesel_async/compare/v0.2.0...v0.3.0
[0.3.1]: https://github.com/weiznich/diesel_async/compare/v0.3.0...v0.3.1
[0.3.2]: https://github.com/weiznich/diesel_async/compare/v0.3.1...v0.3.2
[0.4.0]: https://github.com/weiznich/diesel_async/compare/v0.3.2...v0.4.0
[0.4.1]: https://github.com/weiznich/diesel_async/compare/v0.4.0...v0.4.1
[0.5.0]: https://github.com/weiznich/diesel_async/compare/v0.4.0...v0.5.0
[Unreleased]: https://github.com/weiznich/diesel_async/compare/v0.5.0...main
81 changes: 58 additions & 23 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "diesel-async"
version = "0.4.0"
version = "0.5.0"
authors = ["Georg Semmler <github@weiznich.de>"]
edition = "2021"
autotests = false
@@ -10,51 +10,86 @@ 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"]}
diesel = { version = "~2.2.0", default-features = false, features = [
"i-implement-a-third-party-backend-and-opt-into-breaking-changes",
] }
async-trait = "0.1.66"
futures-channel = { version = "0.3.17", default-features = false, features = ["std", "sink"], optional = true }
futures-util = { version = "0.3.17", default-features = false, features = ["std", "sink"] }
tokio-postgres = { version = "0.7.10", optional = true}
tokio = { version = "1.26", optional = true}
mysql_async = { version = ">=0.30.0,<0.33", optional = true}
mysql_common = {version = ">=0.29.0,<0.31.0", optional = true}
futures-channel = { version = "0.3.17", default-features = false, features = [
"std",
"sink",
], optional = true }
futures-util = { version = "0.3.17", default-features = false, features = [
"std",
"sink",
] }
tokio-postgres = { version = "0.7.10", optional = true }
tokio = { version = "1.26", optional = true }
mysql_async = { version = "0.34", optional = true, default-features = false, features = [
"minimal-rust",
] }
mysql_common = { version = "0.32", optional = true, default-features = false }

bb8 = {version = "0.8", optional = true}
deadpool = {version = "0.9", optional = true}
mobc = {version = ">=0.7,<0.9", optional = true}
scoped-futures = {version = "0.1", features = ["std"]}
bb8 = { version = "0.8", optional = true }
deadpool = { version = "0.12", optional = true, default-features = false, features = [
"managed",
] }
mobc = { version = ">=0.7,<0.10", optional = true }
scoped-futures = { version = "0.1", features = ["std"] }

[dev-dependencies]
tokio = {version = "1.12.0", features = ["rt", "macros", "rt-multi-thread"]}
tokio = { version = "1.12.0", features = ["rt", "macros", "rt-multi-thread"] }
cfg-if = "1"
chrono = "0.4"
diesel = { version = "2.1.0", default-features = false, features = ["chrono"]}
diesel_migrations = "2.1.0"
diesel = { version = "2.2.0", default-features = false, features = ["chrono"] }
diesel_migrations = "2.2.0"
assert_matches = "1.0.1"

[features]
default = []
mysql = ["diesel/mysql_backend", "mysql_async", "mysql_common", "futures-channel", "tokio"]
mysql = [
"diesel/mysql_backend",
"mysql_async",
"mysql_common",
"futures-channel",
"tokio",
]
postgres = ["diesel/postgres_backend", "tokio-postgres", "tokio", "tokio/rt"]
async-connection-wrapper = []
sqlite = ["diesel/sqlite", "sync-connection-wrapper"]
sync-connection-wrapper = ["tokio/rt"]
async-connection-wrapper = ["tokio/net"]
r2d2 = ["diesel/r2d2"]
bb8 = ["dep:bb8"]
mobc = ["dep:mobc"]
deadpool = ["dep:deadpool"]

[[test]]
name = "integration_tests"
path = "tests/lib.rs"
harness = true

[package.metadata.docs.rs]
features = ["postgres", "mysql", "deadpool", "bb8", "mobc"]
features = [
"postgres",
"mysql",
"sqlite",
"deadpool",
"bb8",
"mobc",
"async-connection-wrapper",
"sync-connection-wrapper",
"r2d2",
]
no-default-features = true
rustc-args = ["--cfg", "doc_cfg"]
rustdoc-args = ["--cfg", "doc_cfg"]
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"]

[workspace]
members = [
".",
"examples/postgres/pooled-with-rustls"
"examples/postgres/pooled-with-rustls",
"examples/postgres/run-pending-migrations-with-rustls",
"examples/sync-wrapper",
]

Loading