24 lines
482 B
Rust
24 lines
482 B
Rust
use std::io;
|
|
|
|
use rusqlite::Connection;
|
|
use uuid::Uuid;
|
|
|
|
//pub mod data;
|
|
pub mod db;
|
|
pub mod fs;
|
|
pub mod program;
|
|
pub mod timing;
|
|
|
|
pub fn print_uuid() -> io::Result<Uuid> {
|
|
let db_path = "nancy.db";
|
|
|
|
let conn = Connection::open(db_path).expect("Couldn't open database");
|
|
conn.pragma_update(None, "foreign_keys", &"ON").unwrap();
|
|
|
|
let uuid = db::local_uuid(&conn).expect("Error when extracting local dataset UUID");
|
|
|
|
println!("UUID is {}", uuid);
|
|
|
|
Ok(uuid)
|
|
}
|