diff --git a/Cargo.toml b/Cargo.toml index d5b0da4..c716ab5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,13 +12,13 @@ documentation = "https://docs.rs/sqlite-es" readme = "README.md" [dependencies] -cqrs-es = "0.4.5" +cqrs-es = "0.4.9" async-trait = "0.1" futures = "0.3" serde = { version = "1.0", features = ["derive"]} serde_json = "1.0" -sqlx = { version = "0.6", features = [ "json", "runtime-tokio-rustls", "sqlite" ] } +sqlx = { version = "0.7.0", features = [ "json", "runtime-tokio-rustls", "sqlite" ] } tokio = { version = "1", features = ["rt"] } [dev-dependencies] diff --git a/src/event_repository.rs b/src/event_repository.rs index eff9423..86d95be 100644 --- a/src/event_repository.rs +++ b/src/event_repository.rs @@ -240,7 +240,7 @@ impl SqliteEventRepository { .bind(current_sequence as i32) .bind(current_snapshot as i32) .bind(&aggregate_payload) - .execute(&mut tx) + .execute(&mut *tx) .await?; tx.commit().await?; Ok(()) @@ -266,7 +266,7 @@ impl SqliteEventRepository { .bind(A::aggregate_type()) .bind(aggregate_id.as_str()) .bind((current_snapshot - 1) as i32) - .execute(&mut tx) + .execute(&mut *tx) .await?; tx.commit().await?; match result.rows_affected() { @@ -333,7 +333,7 @@ impl SqliteEventRepository { .bind(event_version) .bind(&payload) .bind(&metadata) - .execute(&mut *tx) + .execute(&mut **tx) .await?; } Ok(current_sequence)