Skip to main content

systemprompt_analytics/repository/funnel/
mod.rs

1mod finders;
2mod mutations;
3mod stats;
4mod types;
5
6use anyhow::Result;
7use sqlx::PgPool;
8use std::sync::Arc;
9use systemprompt_database::DbPool;
10
11#[derive(Clone, Debug)]
12pub struct FunnelRepository {
13    pool: Arc<PgPool>,
14    write_pool: Arc<PgPool>,
15}
16
17impl FunnelRepository {
18    pub fn new(db: &DbPool) -> Result<Self> {
19        let pool = db.pool_arc()?;
20        let write_pool = db.write_pool_arc()?;
21        Ok(Self { pool, write_pool })
22    }
23}