aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorTeddy Wing2022-04-02 20:35:28 +0200
committerTeddy Wing2022-04-02 20:35:28 +0200
commitbc0afe2353f925124c67bf5785813432de44af57 (patch)
tree7c4d12048af856fe7884d6a678fc13916d0472d5 /src/lib.rs
parent02bc0d184fa60668bafe8de5ba844d132aa2ffb3 (diff)
downloadyaqlite-bc0afe2353f925124c67bf5785813432de44af57.tar.bz2
Add a SQL update function to update a record from YAML
Add a new `db_update()` function to update an existing database record from a YAML hash. Had a little trouble building up the params for the prepared SQL statement but finally managed to set up the types correctly and include the record ID to update. Thanks to this Stack Overflow answer by Shepmaster (https://stackoverflow.com/users/155423/shepmaster) for pointing me in the right direction: https://stackoverflow.com/questions/46624591/cannot-call-rusqlites-query-because-it-expects-the-type-rusqlitetypestos/46625932#46625932
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 10240fa..910aa2c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -18,11 +18,13 @@
pub mod insert;
pub mod select;
pub mod sqlite;
+pub mod update;
pub mod yaml;
pub use insert::*;
pub use select::*;
+pub use update::*;
/// Yaqlite errors.