systemprompt_analytics/repository/funnel/
mod.rs1mod finders;
9mod mutations;
10mod stats;
11mod types;
12
13use crate::Result;
14use sqlx::PgPool;
15use std::sync::Arc;
16use systemprompt_database::DbPool;
17
18#[derive(Clone, Debug)]
19pub struct FunnelRepository {
20 pool: Arc<PgPool>,
21 write_pool: Arc<PgPool>,
22}
23
24impl FunnelRepository {
25 pub fn new(db: &DbPool) -> Result<Self> {
26 let pool = db.pool_arc()?;
27 let write_pool = db.write_pool_arc()?;
28 Ok(Self { pool, write_pool })
29 }
30}