pub struct SqliteAnalyticsRepository { /* private fields */ }Available on crate feature
sqlite only.Implementations§
Source§impl SqliteAnalyticsRepository
impl SqliteAnalyticsRepository
pub const fn new(pool: Pool<SqliteConnectionManager>) -> Self
Trait Implementations§
Source§impl AnalyticsRepository for SqliteAnalyticsRepository
impl AnalyticsRepository for SqliteAnalyticsRepository
Source§fn get_sales_summary(&self, query: AnalyticsQuery) -> Result<SalesSummary>
fn get_sales_summary(&self, query: AnalyticsQuery) -> Result<SalesSummary>
Get sales summary for a time period
Source§fn get_revenue_by_period(
&self,
query: AnalyticsQuery,
) -> Result<Vec<RevenueByPeriod>>
fn get_revenue_by_period( &self, query: AnalyticsQuery, ) -> Result<Vec<RevenueByPeriod>>
Get revenue broken down by time periods
Source§fn get_top_products(&self, query: AnalyticsQuery) -> Result<Vec<TopProduct>>
fn get_top_products(&self, query: AnalyticsQuery) -> Result<Vec<TopProduct>>
Get top selling products
Source§fn get_product_performance(
&self,
query: AnalyticsQuery,
) -> Result<Vec<ProductPerformance>>
fn get_product_performance( &self, query: AnalyticsQuery, ) -> Result<Vec<ProductPerformance>>
Get product performance with period comparison
Source§fn get_customer_metrics(&self, query: AnalyticsQuery) -> Result<CustomerMetrics>
fn get_customer_metrics(&self, query: AnalyticsQuery) -> Result<CustomerMetrics>
Get customer metrics
Source§fn get_top_customers(&self, query: AnalyticsQuery) -> Result<Vec<TopCustomer>>
fn get_top_customers(&self, query: AnalyticsQuery) -> Result<Vec<TopCustomer>>
Get top customers by spend
Source§fn get_inventory_health(&self) -> Result<InventoryHealth>
fn get_inventory_health(&self) -> Result<InventoryHealth>
Get inventory health summary
Source§fn get_low_stock_items(
&self,
threshold: Option<Decimal>,
) -> Result<Vec<LowStockItem>>
fn get_low_stock_items( &self, threshold: Option<Decimal>, ) -> Result<Vec<LowStockItem>>
Get low stock items
Source§fn get_inventory_movement(
&self,
query: AnalyticsQuery,
) -> Result<Vec<InventoryMovement>>
fn get_inventory_movement( &self, query: AnalyticsQuery, ) -> Result<Vec<InventoryMovement>>
Get inventory movement summary
Source§fn get_order_status_breakdown(
&self,
query: AnalyticsQuery,
) -> Result<OrderStatusBreakdown>
fn get_order_status_breakdown( &self, query: AnalyticsQuery, ) -> Result<OrderStatusBreakdown>
Get order status breakdown
Source§fn get_fulfillment_metrics(
&self,
query: AnalyticsQuery,
) -> Result<FulfillmentMetrics>
fn get_fulfillment_metrics( &self, query: AnalyticsQuery, ) -> Result<FulfillmentMetrics>
Get fulfillment metrics
Source§fn get_return_metrics(&self, query: AnalyticsQuery) -> Result<ReturnMetrics>
fn get_return_metrics(&self, query: AnalyticsQuery) -> Result<ReturnMetrics>
Get return metrics
Source§fn get_demand_forecast(
&self,
skus: Option<Vec<String>>,
days_ahead: u32,
) -> Result<Vec<DemandForecast>>
fn get_demand_forecast( &self, skus: Option<Vec<String>>, days_ahead: u32, ) -> Result<Vec<DemandForecast>>
Get demand forecast for SKUs
Source§fn get_revenue_forecast(
&self,
periods_ahead: u32,
granularity: TimeGranularity,
) -> Result<Vec<RevenueForecast>>
fn get_revenue_forecast( &self, periods_ahead: u32, granularity: TimeGranularity, ) -> Result<Vec<RevenueForecast>>
Get revenue forecast
Source§fn get_sales_summary_batch(
&self,
queries: Vec<AnalyticsQuery>,
) -> Result<Vec<SalesSummary>>
fn get_sales_summary_batch( &self, queries: Vec<AnalyticsQuery>, ) -> Result<Vec<SalesSummary>>
Get multiple sales summaries for different queries
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteAnalyticsRepository
impl !UnwindSafe for SqliteAnalyticsRepository
impl Freeze for SqliteAnalyticsRepository
impl Send for SqliteAnalyticsRepository
impl Sync for SqliteAnalyticsRepository
impl Unpin for SqliteAnalyticsRepository
impl UnsafeUnpin for SqliteAnalyticsRepository
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