use std::error::Error;
use crate::SettingRow;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct SettingsQuery<'a> {
pub table: &'a str,
pub key_column: &'a str,
pub value_column: &'a str,
pub order_by: &'a str,
}
pub trait SettingsStore {
fn load_settings(
&self,
query: &SettingsQuery<'_>,
) -> Result<Vec<SettingRow>, Box<dyn Error + Send + Sync>>;
fn update_setting(
&self,
query: &SettingsQuery<'_>,
key: &str,
value: &str,
) -> Result<(), Box<dyn Error + Send + Sync>>;
}