Skip to content

Commit

Permalink
Update sqlite-hashes dependency (#1268)
Browse files Browse the repository at this point in the history
Minor internal breaking changes
  • Loading branch information
nyurik authored Mar 22, 2024
1 parent 6d6f833 commit 115c976
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ insta = "1"
itertools = "0.12"
json-patch = "1.2"
lambda-web = { version = "0.2.1", features = ["actix4"] }
libsqlite3-sys = { version = ">=0.27", features = ["bundled"] }
log = "0.4"
martin-tile-utils = { path = "./martin-tile-utils", version = "0.4.0" }
mbtiles = { path = "./mbtiles", version = "0.9.0" }
Expand All @@ -72,7 +73,7 @@ serde_with = "3"
serde_yaml = "0.9"
size_format = "1.0.2"
spreet = { version = "0.11", default-features = false }
sqlite-hashes = { version = "0.6", default-features = false, features = ["md5", "window", "hex"] } # window forces libsqlite3-sys to bundle sqlite3. We require v3.44.0 or newer.
sqlite-hashes = { version = "0.7.1", default-features = false, features = ["md5", "aggregate", "hex"] }
sqlx = { version = "0.7", features = ["sqlite", "runtime-tokio"] }
subst = { version = "0.3", features = ["yaml"] }
thiserror = "1"
Expand Down
4 changes: 2 additions & 2 deletions mbtiles/src/mbtiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::path::Path;
use enum_display::EnumDisplay;
use log::debug;
use serde::{Deserialize, Serialize};
use sqlite_hashes::register_md5_function;
use sqlite_hashes::register_md5_functions;
use sqlx::sqlite::SqliteConnectOptions;
use sqlx::{query, Connection as _, Executor, SqliteConnection, SqliteExecutor, Statement};

Expand Down Expand Up @@ -225,7 +225,7 @@ pub async fn attach_hash_fn(conn: &mut SqliteConnection) -> MbtResult<()> {
// Safety: we know that the handle is a SQLite connection is locked and is not used anywhere else.
// The registered functions will be dropped when SQLX drops DB connection.
let rc = unsafe { sqlite_hashes::rusqlite::Connection::from_handle(handle) }?;
register_md5_function(&rc)?;
register_md5_functions(&rc)?;
Ok(())
}

Expand Down

0 comments on commit 115c976

Please sign in to comment.