// This module contains all the database interaction logic,
// using `sqlx` to query the PostgreSQL database.
//
// Functions in this module will be called by the API handlers
// to fetch or store data.

pub mod system_config;
pub mod companies;
pub mod market_data;
pub mod session_data;
pub mod provider_cache;
pub mod history;

pub use companies::{get_company_by_symbol, upsert_company};
pub use market_data::{
    batch_insert_daily_data, batch_insert_financials, get_daily_data_by_symbol,
    get_financials_by_symbol, get_latest_realtime_quote, insert_realtime_quote,
};
pub use session_data::{insert_session_data, get_session_data, delete_session_data};
pub use provider_cache::{get_cache, set_cache};
