pub struct MarketDatabaseService { /* private fields */ }Expand description
Service for managing market data persistence in PostgreSQL
Implementations§
Source§impl MarketDatabaseService
impl MarketDatabaseService
Sourcepub async fn initialize_database(&self) -> Result<(), Error>
pub async fn initialize_database(&self) -> Result<(), Error>
Initializes the database tables and triggers
Sourcepub async fn store_market_hierarchy(
&self,
hierarchy: &[MarketNode],
) -> Result<(), Error>
pub async fn store_market_hierarchy( &self, hierarchy: &[MarketNode], ) -> Result<(), Error>
Stores the complete market hierarchy in the database
Sourcepub async fn get_market_hierarchy(
&self,
) -> Result<Vec<MarketHierarchyNode>, Error>
pub async fn get_market_hierarchy( &self, ) -> Result<Vec<MarketHierarchyNode>, Error>
Retrieves market hierarchy from the database
Sourcepub async fn get_instruments_by_node(
&self,
node_id: &str,
) -> Result<Vec<MarketInstrument>, Error>
pub async fn get_instruments_by_node( &self, node_id: &str, ) -> Result<Vec<MarketInstrument>, Error>
Retrieves market instruments for a specific node
Sourcepub async fn search_instruments(
&self,
search_term: &str,
) -> Result<Vec<MarketInstrument>, Error>
pub async fn search_instruments( &self, search_term: &str, ) -> Result<Vec<MarketInstrument>, Error>
Searches for instruments by name or epic
Sourcepub async fn get_statistics(&self) -> Result<DatabaseStatistics, Error>
pub async fn get_statistics(&self) -> Result<DatabaseStatistics, Error>
Gets statistics about the stored data
Auto Trait Implementations§
impl Freeze for MarketDatabaseService
impl !RefUnwindSafe for MarketDatabaseService
impl Send for MarketDatabaseService
impl Sync for MarketDatabaseService
impl Unpin for MarketDatabaseService
impl !UnwindSafe for MarketDatabaseService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more