Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xx01cyx committed Nov 9, 2024
1 parent 49f600a commit 5e45159
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions optd-persistent/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> = LazyLock::new(|| {
std::env::current_dir()
.unwrap()
Expand All @@ -27,6 +31,7 @@ pub static TEST_DATABASE_FILE: LazyLock<String> = LazyLock::new(|| {
.unwrap()
.to_owned()
});
/// The URL of the SQLite database for testing.
pub static TEST_DATABASE_URL: LazyLock<String> =
LazyLock::new(|| get_sqlite_url(TEST_DATABASE_FILE.as_str()));

Expand Down

0 comments on commit 5e45159

Please sign in to comment.