Skip to content

Commit

Permalink
build(deps): bump diesel from 2.0.3 to 2.1.0 (#1287)
Browse files Browse the repository at this point in the history
  • Loading branch information
SanchithHegde authored May 29, 2023
1 parent 597ec16 commit b9ec38a
Show file tree
Hide file tree
Showing 14 changed files with 477 additions and 263 deletions.
561 changes: 312 additions & 249 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion crates/common_enums/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
diesel = { version = "2.1.0", features = ["postgres"] }
serde = { version = "1.0.160", features = [ "derive" ] }
strum = { version = "0.24.1", features = [ "derive" ] }
utoipa = { version = "3.3.0", features = ["preserve_order"] }
diesel = { version = "2.0.3", features = ["postgres"] }

# First party crates
router_derive = { version = "0.1.0", path = "../router_derive" }
Expand Down
2 changes: 1 addition & 1 deletion crates/common_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ logs = ["dep:router_env"]
[dependencies]
async-trait = { version = "0.1.68", optional = true }
bytes = "1.4.0"
diesel = "2.1.0"
error-stack = "0.3.1"
futures = { version = "0.3.28", optional = true }
hex = "0.4.3"
Expand All @@ -36,7 +37,6 @@ md5 = "0.7.0"
# First party crates
masking = { version = "0.1.0", path = "../masking" }
router_env = { version = "0.1.0", path = "../router_env", features = ["log_extra_implicit_fields", "log_custom_entries_to_extra"], optional = true }
diesel = "2.0.3"

[target.'cfg(not(target_os = "windows"))'.dependencies]
signal-hook-tokio = { version = "0.3.1", features = ["futures-v0_3"], optional = true }
Expand Down
3 changes: 1 addition & 2 deletions crates/common_utils/src/pii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
use std::{convert::AsRef, fmt, ops, str::FromStr};

use diesel::{
backend,
backend::Backend,
deserialize,
deserialize::FromSql,
Expand Down Expand Up @@ -153,7 +152,7 @@ where
DB: Backend,
String: FromSql<sql_types::Text, DB>,
{
fn from_sql(bytes: backend::RawValue<'_, DB>) -> deserialize::Result<Self> {
fn from_sql(bytes: DB::RawValue<'_>) -> deserialize::Result<Self> {
let val = String::from_sql(bytes)?;
Ok(Self::from_str(val.as_str())?)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/drainer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async-bb8-diesel = { git = "https://github.com/juspay/async-bb8-diesel", rev = "
bb8 = "0.8"
clap = { version = "4.2.2", default-features = false, features = ["std", "derive", "help", "usage"] }
config = { version = "0.13.3", features = ["toml"] }
diesel = { version = "2.0.3", features = ["postgres"] }
diesel = { version = "2.1.0", features = ["postgres"] }
error-stack = "0.3.1"
once_cell = "1.17.1"
serde = "1.0.160"
Expand Down
2 changes: 1 addition & 1 deletion crates/masking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
bytes = { version = "1", optional = true }
diesel = { version = "2.0.3", features = ["postgres", "serde_json", "time"], optional = true }
diesel = { version = "2.1.0", features = ["postgres", "serde_json", "time"], optional = true }
serde = { version = "1", features = ["derive"], optional = true }
serde_json = "1.0.96"
subtle = "=2.4.1"
Expand Down
6 changes: 3 additions & 3 deletions crates/masking/src/diesel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

pub use diesel::Expression;
use diesel::{
backend::{Backend, RawValue},
backend::Backend,
deserialize::{self, FromSql, Queryable},
expression::AsExpression,
internal::derives::as_expression::Bound,
Expand Down Expand Up @@ -53,7 +53,7 @@ where
S: FromSql<T, DB>,
I: Strategy<S>,
{
fn from_sql(bytes: RawValue<'_, DB>) -> diesel::deserialize::Result<Self> {
fn from_sql(bytes: DB::RawValue<'_>) -> diesel::deserialize::Result<Self> {
S::from_sql(bytes).map(|raw| raw.into())
}
}
Expand Down Expand Up @@ -123,7 +123,7 @@ where
S: FromSql<T, DB> + ZeroizableSecret,
I: Strategy<S>,
{
fn from_sql(bytes: RawValue<'_, DB>) -> diesel::deserialize::Result<Self> {
fn from_sql(bytes: DB::RawValue<'_>) -> diesel::deserialize::Result<Self> {
S::from_sql(bytes).map(|raw| raw.into())
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ bytes = "1.4.0"
clap = { version = "4.2.2", default-features = false, features = ["std", "derive", "help", "usage"] }
config = { version = "0.13.3", features = ["toml"] }
crc32fast = "1.3.2"
diesel = { version = "2.0.3", features = ["postgres"] }
diesel = { version = "2.1.0", features = ["postgres"] }
dyn-clone = "1.0.11"
encoding_rs = "0.8.32"
error-stack = "0.3.1"
Expand Down
2 changes: 1 addition & 1 deletion crates/router_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ quote = "1.0.26"
syn = { version = "1.0.109", features = ["full", "extra-traits"] } # the full feature does not seem to encompass all the features

[dev-dependencies]
diesel = { version = "2.0.3", features = ["postgres"] }
diesel = { version = "2.1.0", features = ["postgres"] }
serde = { version = "1.0.160", features = ["derive"] }
serde_json = "1.0.96"
strum = { version = "0.24.1", features = ["derive"] }
2 changes: 1 addition & 1 deletion crates/storage_models/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ kv_store = []
[dependencies]
async-bb8-diesel = { git = "https://github.com/juspay/async-bb8-diesel", rev = "9a71d142726dbc33f41c1fd935ddaa79841c7be5" }
async-trait = "0.1.68"
diesel = { version = "2.0.3", features = ["postgres", "serde_json", "time", "64-column-tables"] }
diesel = { version = "2.1.0", features = ["postgres", "serde_json", "time", "64-column-tables"] }
error-stack = "0.3.1"
frunk = "0.4.1"
frunk_core = "0.4.1"
Expand Down
2 changes: 1 addition & 1 deletion crates/storage_models/src/api_keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ mod diesel_impl {
DB: Backend,
String: FromSql<Text, DB>,
{
fn from_sql(bytes: diesel::backend::RawValue<'_, DB>) -> diesel::deserialize::Result<Self> {
fn from_sql(bytes: DB::RawValue<'_>) -> diesel::deserialize::Result<Self> {
Ok(Self(String::from_sql(bytes)?))
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/storage_models/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ impl<DB: Backend> FromSql<Jsonb, DB> for MandateDataType
where
serde_json::Value: FromSql<Jsonb, DB>,
{
fn from_sql(bytes: diesel::backend::RawValue<'_, DB>) -> diesel::deserialize::Result<Self> {
fn from_sql(bytes: DB::RawValue<'_>) -> diesel::deserialize::Result<Self> {
let value = <serde_json::Value as FromSql<Jsonb, DB>>::from_sql(bytes)?;
Ok(serde_json::from_value(value)?)
}
Expand Down
1 change: 1 addition & 0 deletions crates/storage_models/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub mod process_tracker;
pub mod query;
pub mod refund;
pub mod reverse_lookup;
#[allow(unused_qualifications)]
pub mod schema;

use diesel_impl::{DieselArray, OptionalDieselArray};
Expand Down
Loading

0 comments on commit b9ec38a

Please sign in to comment.