From 5e4515928b60d4cf175f99b5c63c69ce20672a83 Mon Sep 17 00:00:00 2001 From: Yuanxin Cao Date: Sat, 9 Nov 2024 16:38:59 -0500 Subject: [PATCH] add comments --- optd-persistent/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/optd-persistent/src/lib.rs b/optd-persistent/src/lib.rs index 8125e68..2638940 100644 --- a/optd-persistent/src/lib.rs +++ b/optd-persistent/src/lib.rs @@ -13,10 +13,14 @@ mod migrator; pub mod cost_model; pub use cost_model::interface::CostModelStorageLayer; +/// The filename of the SQLite database for migration. pub const DATABASE_FILENAME: &str = "sqlite.db"; +/// The URL of the SQLite database for migration. pub const DATABASE_URL: &str = "sqlite:./sqlite.db?mode=rwc"; +/// The filename of the SQLite database for testing. pub const TEST_DATABASE_FILENAME: &str = "init.db"; +/// The URL of the SQLite database for testing. pub static TEST_DATABASE_FILE: LazyLock = LazyLock::new(|| { std::env::current_dir() .unwrap() @@ -27,6 +31,7 @@ pub static TEST_DATABASE_FILE: LazyLock = LazyLock::new(|| { .unwrap() .to_owned() }); +/// The URL of the SQLite database for testing. pub static TEST_DATABASE_URL: LazyLock = LazyLock::new(|| get_sqlite_url(TEST_DATABASE_FILE.as_str()));