Skip to content

Commit

Permalink
feat: dummy config
Browse files Browse the repository at this point in the history
  • Loading branch information
apskhem committed May 9, 2024
1 parent fe9f7ed commit bcbab8a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
16 changes: 11 additions & 5 deletions hermes/bin/src/runtime_extensions/app_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,22 @@
use crate::app::HermesAppName;

pub(crate) struct SqliteConfig {
/// Path to the SQLite database file.
db_file: Option<String>,
/// Path to the SQLite database file, not set if it's in-memory database.
pub(crate) db_file: Option<String>,
/// Maximum size of the SQLite database in bytes.
max_db_size: u32,
pub(crate) max_db_size: u32,
}

pub(crate) fn get_app_persistent_sqlite_db_cfg(_app_name: &HermesAppName) -> Option<SqliteConfig> {
todo!()
Some(SqliteConfig {
db_file: Some(String::from("hermes_datastore.db")),
max_db_size: 1_048_576
})
}

pub(crate) fn get_app_inmemory_sqlite_db_cfg(_app_name: &HermesAppName) -> Option<SqliteConfig> {
todo!()
Some(SqliteConfig {
db_file: None,
max_db_size: 1_048_576
})
}
1 change: 1 addition & 0 deletions hermes/bin/src/runtime_extensions/hermes/sqlite/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

mod connection;
mod host;
mod state;
mod statement;

/// Advise Runtime Extensions of a new context
Expand Down

0 comments on commit bcbab8a

Please sign in to comment.