[niepce/lr-import: 12/20] Update rusqlite to 0.26.3.




commit 7b59dfc826d233e1c312ca0806fd84dc89aa4b96
Author: Hubert Figuière <hub figuiere net>
Date:   Wed Dec 8 23:53:25 2021 -0500

    Update rusqlite to 0.26.3.
    
    - split some SQL calls

 Cargo.lock                          | 4 ++--
 crates/npc-engine/Cargo.toml        | 2 +-
 crates/npc-engine/src/db/library.rs | 6 ++----
 3 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/Cargo.lock b/Cargo.lock
index 1cb9755..6576eb4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1106,9 +1106,9 @@ dependencies = [
 
 [[package]]
 name = "rusqlite"
-version = "0.26.1"
+version = "0.26.3"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "8a82b0b91fad72160c56bf8da7a549b25d7c31109f52cc1437eac4c0ad2550a7"
+checksum = "4ba4d3462c8b2e4d7f4fcfcf2b296dc6b65404fbbc7b63daa37fd485c149daf7"
 dependencies = [
  "bitflags",
  "fallible-iterator",
diff --git a/crates/npc-engine/Cargo.toml b/crates/npc-engine/Cargo.toml
index 69c5c1a..a4a2041 100644
--- a/crates/npc-engine/Cargo.toml
+++ b/crates/npc-engine/Cargo.toml
@@ -22,7 +22,7 @@ lazy_static = "^1.2.0"
 libc = "0.2.39"
 maplit = "1.0.2"
 lrcat-extractor = { version = "0.2.0" }
-rusqlite = { version = "0.26.1", features = ["functions"] }
+rusqlite = { version = "0.26.3", features = ["functions"] }
 
 npc-fwk = { path = "../npc-fwk" }
 
diff --git a/crates/npc-engine/src/db/library.rs b/crates/npc-engine/src/db/library.rs
index 9193144..afedf7d 100644
--- a/crates/npc-engine/src/db/library.rs
+++ b/crates/npc-engine/src/db/library.rs
@@ -961,10 +961,8 @@ impl Library {
     ) -> Result<()> {
         if let Some(ref conn) = self.dbconn {
             if let Some(PropertyValue::String(xmp)) = props.get(&Np::Index(NpNiepceXmpPacket)) {
-                conn.execute(
-                    "UPDATE files SET xmp=?1 WHERE id=?2;",
-                    params![xmp, image_id],
-                )?;
+                let mut stmt = conn.prepare("UPDATE files SET xmp=?1 WHERE id=?2;")?;
+                stmt.execute(params![xmp, image_id])?;
             }
             return Ok(());
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]