Skip to content

Commit

Permalink
fix!: Update dependencies, most notably deadpool-postgres from 0.12.…
Browse files Browse the repository at this point in the history
…1 to 0.14.0

fixes: #250
  • Loading branch information
jacobsvante committed Jun 13, 2024
1 parent d1229ae commit 1f70540
Show file tree
Hide file tree
Showing 16 changed files with 521 additions and 304 deletions.
607 changes: 412 additions & 195 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ cornucopia_async = { path = "../crates/client_async" }
criterion = { version = "0.5.1", features = ["html_reports"] }

# async
tokio = { version = "1.24.2", features = ["full"] }
futures = "0.3.25"
tokio = { version = "1.38.0", features = ["full"] }
futures = "0.3.30"

# rust-postgres interaction
postgres = "0.19.4"
tokio-postgres = "0.7.7"
postgres-types = "0.2.4"
postgres = "0.19.7"
tokio-postgres = "0.7.10"
postgres-types = "0.2.6"

# diesel
diesel = { version = "2.0.2", features = ["postgres"] }
diesel = { version = "2.2.1", features = ["postgres"] }

[[bench]]
name = "execution"
Expand Down
4 changes: 2 additions & 2 deletions benches/execution/cornucopia_benches/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ pub mod queries {
}
}
pub fn select_complex() -> SelectComplexStmt {
SelectComplexStmt(cornucopia_sync :: private :: Stmt :: new("SELECT u.id as myuser_id, u.name, u.hair_color, p.id as post_id, p.user_id, p.title, p.body FROM users as u LEFT JOIN posts as p on u.id = p.user_id"))
SelectComplexStmt(cornucopia_sync::private::Stmt::new("SELECT u.id as myuser_id, u.name, u.hair_color, p.id as post_id, p.user_id, p.title, p.body FROM users as u LEFT JOIN posts as p on u.id = p.user_id"))
}
pub struct SelectComplexStmt(cornucopia_sync::private::Stmt);
impl SelectComplexStmt {
Expand Down Expand Up @@ -933,7 +933,7 @@ pub mod queries {
}
}
pub fn select_complex() -> SelectComplexStmt {
SelectComplexStmt(cornucopia_async :: private :: Stmt :: new("SELECT u.id as myuser_id, u.name, u.hair_color, p.id as post_id, p.user_id, p.title, p.body FROM users as u LEFT JOIN posts as p on u.id = p.user_id"))
SelectComplexStmt(cornucopia_async::private::Stmt::new("SELECT u.id as myuser_id, u.name, u.hair_color, p.id as post_id, p.user_id, p.title, p.body FROM users as u LEFT JOIN posts as p on u.id = p.user_id"))
}
pub struct SelectComplexStmt(cornucopia_async::private::Stmt);
impl SelectComplexStmt {
Expand Down
6 changes: 3 additions & 3 deletions crates/client_async/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ with-serde_json-1 = ["cornucopia_client_core/with-serde_json-1"]
cornucopia_client_core = { path = "../client_core", version = "0.4.0" }

# async
async-trait = "0.1.63"
async-trait = "0.1.80"

# rust-postgres interaction
tokio-postgres = "0.7.7"
tokio-postgres = "0.7.10"

# connection pooling
deadpool-postgres = { version = "0.12.1", optional = true }
deadpool-postgres = { version = "0.14.0", optional = true }
10 changes: 5 additions & 5 deletions crates/client_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ with-serde_json-1 = ["postgres-types/with-serde_json-1", "serde", "serde_json"]

[dependencies]
# Postgres interaction
postgres-protocol = "0.6.4"
postgres-types = "0.2.4"
postgres-protocol = "0.6.6"
postgres-types = "0.2.6"
## Iterator utils required for working with `postgres_protocol::types::ArrayValues`
fallible-iterator = "0.2.0"

# json
## This crate implements the "ergonomic paramters" for
## This crate implements the "ergonomic paramters" for
## `serde_json::Value` and `serde_json::raw::RawValue`.
serde_json = { version = "1.0.91", optional = true }
serde_json = { version = "1.0.117", optional = true }
## Used for `postgres_types::Json` `Serialize` trait bounds
serde = { version = "1.0.152", optional = true }
serde = { version = "1.0.203", optional = true }
2 changes: 1 addition & 1 deletion crates/client_core/src/domain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl<'a, T: ToSql + Sync + 'a, A: ArraySql<Item = T>> ToSql for DomainArray<'a,
pub fn escape_domain_to_sql<T: ToSql>(
ty: &Type,
w: &mut BytesMut,
iter: impl Iterator<Item = T> + ExactSizeIterator,
iter: impl ExactSizeIterator<Item = T>,
) -> Result<IsNull, Box<dyn Error + Sync + Send>> {
let member_type = match *ty.kind() {
Kind::Array(ref member) => escape_domain(member),
Expand Down
2 changes: 1 addition & 1 deletion crates/client_sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ with-serde_json-1 = ["cornucopia_client_core/with-serde_json-1"]
cornucopia_client_core = { path = "../client_core", version = "0.4.0" }

# postgres interaction
postgres = "0.19.4"
postgres = "0.19.7"
16 changes: 8 additions & 8 deletions crates/cornucopia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ keywords = ["postgresql", "query", "generator", "sql", "tokio-postgres"]
codegen_template = { path = "../codegen_template", version = "0.1.0" }

# Postgres interaction
postgres = "0.19.4"
postgres-types = "0.2.4"
postgres = "0.19.7"
postgres-types = "0.2.6"

# Error handling and reporting
thiserror = "1.0.38"
miette = { version = "5.5.0", features = ["fancy"] }
thiserror = "1.0.61"
miette = { version = "5.10.0", features = ["fancy"] }

# Parser
chumsky = "0.9.0"
chumsky = "0.9.3"

# CLI handling
clap = { version = "4.1.1", features = ["derive"] }
clap = { version = "4.5.7", features = ["derive"] }

# Word case
heck = "0.4.0"
heck = "0.5.0"

# Order-preserving map to work around borrowing issues
indexmap = "2.0.2"
indexmap = "2.2.6"
10 changes: 5 additions & 5 deletions examples/auto_build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ edition = "2021"
cornucopia_async = { path = "../../crates/client_async" }

# Async
tokio = { version = "1.24.2", features = ["full"] }
futures = "0.3.25"
tokio = { version = "1.38.0", features = ["full"] }
futures = "0.3.30"

# Postgres interaction
tokio-postgres = "0.7.7"
postgres-types = "0.2.4"
tokio-postgres = "0.7.10"
postgres-types = "0.2.6"
## Connection pooling
deadpool-postgres = "0.12.1"
deadpool-postgres = "0.14.0"

[build-dependencies]
# Cornucopia library to automatically
Expand Down
10 changes: 5 additions & 5 deletions examples/basic_async/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ version = "0.1.0"
cornucopia_async = { path = "../../crates/client_async" }

# Async
tokio = { version = "1.24.2", features = ["full"] }
futures = "0.3.25"
tokio = { version = "1.38.0", features = ["full"] }
futures = "0.3.30"

# Postgres interaction
tokio-postgres = "0.7.7"
postgres-types = { version = "0.2.4", features = ["derive"] }
tokio-postgres = "0.7.10"
postgres-types = { version = "0.2.6", features = ["derive"] }
## Connection pooling
deadpool-postgres = "0.12.1"
deadpool-postgres = "0.14.0"
2 changes: 1 addition & 1 deletion examples/basic_async/src/cornucopia.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub mod types {
}
}
}
#[derive(Debug, postgres_types :: FromSql, Clone, PartialEq)]
#[derive(Debug, postgres_types::FromSql, Clone, PartialEq)]
#[postgres(name = "voiceactor")]
pub struct Voiceactor {
#[postgres(name = "name")]
Expand Down
4 changes: 2 additions & 2 deletions examples/basic_sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ edition = "2021"

[dependencies]
# Postgres interaction
postgres = "0.19.4"
postgres-types = { version = "0.2.4", features = ["derive"] }
postgres = "0.19.7"
postgres-types = { version = "0.2.6", features = ["derive"] }

# Cornucopia async client
## If you're trying this example as a standalone crate,
Expand Down
2 changes: 1 addition & 1 deletion examples/basic_sync/src/cornucopia.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub mod types {
}
}
}
#[derive(Debug, postgres_types :: FromSql, Clone, PartialEq)]
#[derive(Debug, postgres_types::FromSql, Clone, PartialEq)]
#[postgres(name = "voiceactor")]
pub struct Voiceactor {
#[postgres(name = "name")]
Expand Down
18 changes: 9 additions & 9 deletions test_codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@ cornucopia_async = { path = "../crates/client_async", features = [
] }

# async
futures = "0.3.25"
futures = "0.3.30"

# rust-postgres interaction
postgres = { version = "0.19.4", features = [
postgres = { version = "0.19.7", features = [
"with-serde_json-1",
"with-time-0_3",
"with-uuid-1",
"with-eui48-1",
] }
tokio-postgres = { version = "0.7.7", features = [
tokio-postgres = { version = "0.7.10", features = [
"with-serde_json-1",
"with-time-0_3",
"with-uuid-1",
"with-eui48-1",
] }
postgres-types = { version = "0.2.4", features = ["derive"] }
postgres-types = { version = "0.2.6", features = ["derive"] }

# serde
serde = { version = "1.0.152", features = ["derive"] }
serde = { version = "1.0.203", features = ["derive"] }

# extra types
serde_json = { version = "1.0.91", features = ["raw_value"] }
time = { version = "0.3.17", features = ["parsing", "serde"] }
uuid = { version = "1.2.2", features = ["serde"] }
serde_json = { version = "1.0.117", features = ["raw_value"] }
time = { version = "0.3.36", features = ["parsing", "serde"] }
uuid = { version = "1.8.0", features = ["serde"] }
eui48 = { version = "1.1.0", features = ["serde"] }
rust_decimal = { version = "1.28.0", features = ["db-postgres"] }
rust_decimal = { version = "1.35.0", features = ["db-postgres"] }
Loading

0 comments on commit 1f70540

Please sign in to comment.