systemprompt_analytics/repository/core_stats/mod.rs
1mod activity;
2mod breakdowns;
3mod leaderboards;
4mod overview;
5
6use anyhow::Result;
7use sqlx::PgPool;
8use std::sync::Arc;
9use systemprompt_database::DbPool;
10
11#[derive(Debug)]
12pub struct CoreStatsRepository {
13 pool: Arc<PgPool>,
14}
15
16impl CoreStatsRepository {
17 pub fn new(db: &DbPool) -> Result<Self> {
18 let pool = db.pool_arc()?;
19 Ok(Self { pool })
20 }
21}