Skip to content

Commit

Permalink
upgrade rusqlite
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Jul 31, 2024
1 parent e434406 commit 368d0e2
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 58 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 52 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ semver = { version = "1.0.4", features = ["serde"] }
slug = "0.1.1"
r2d2 = "0.8"
r2d2_postgres = "0.18"
sqlx = { version = "0.7", features = [ "runtime-tokio", "postgres", "chrono" ] }
sqlx = { version = "0.8", features = [ "runtime-tokio", "postgres", "chrono" ] }
url = { version = "2.1.1", features = ["serde"] }
docsrs-metadata = { path = "crates/metadata" }
anyhow = { version = "1.0.42", features = ["backtrace"]}
Expand All @@ -67,7 +67,7 @@ zip = {version = "1.1.4", default-features = false, features = ["bzip2"]}
bzip2 = "0.4.4"
getrandom = "0.2.1"
itertools = { version = "0.13.0", optional = true}
rusqlite = { version = "0.30.0", features = ["bundled"] }
rusqlite = { version = "0.31.0", features = ["bundled"] }
hex = "0.4.3"

# Async
Expand Down
5 changes: 1 addition & 4 deletions src/db/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,7 @@ where
self,
sql: &'q str,
parameters: &'e [<Self::Database as sqlx::Database>::TypeInfo],
) -> BoxFuture<
'e,
Result<<Self::Database as sqlx::database::HasStatement<'q>>::Statement, sqlx::Error>,
> {
) -> BoxFuture<'e, Result<<Self::Database as sqlx::Database>::Statement<'q>, sqlx::Error>> {
self.async_pool.prepare_with(sql, parameters)
}

Expand Down
12 changes: 0 additions & 12 deletions src/db/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ impl Feature {
}
}

impl sqlx::postgres::PgHasArrayType for Feature {
fn array_type_info() -> sqlx::postgres::PgTypeInfo {
sqlx::postgres::PgTypeInfo::with_name("_feature")
}
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, sqlx::Type)]
#[sqlx(type_name = "build_status", rename_all = "snake_case")]
#[serde(rename_all = "snake_case")]
Expand All @@ -39,12 +33,6 @@ impl BuildStatus {
}
}

impl sqlx::postgres::PgHasArrayType for BuildStatus {
fn array_type_info() -> sqlx::postgres::PgTypeInfo {
sqlx::postgres::PgTypeInfo::with_name("_build_status")
}
}

impl<'a> PartialEq<&'a str> for BuildStatus {
fn eq(&self, other: &&str) -> bool {
match self {
Expand Down

0 comments on commit 368d0e2

Please sign in to comment.