systemprompt_analytics/repository/tools/
mod.rs1mod detail_queries;
2mod list_queries;
3
4use anyhow::Result;
5use sqlx::PgPool;
6use std::sync::Arc;
7use systemprompt_database::DbPool;
8
9#[derive(Debug)]
10pub struct ToolAnalyticsRepository {
11 pool: Arc<PgPool>,
12 #[allow(dead_code)]
13 write_pool: Arc<PgPool>,
14}
15
16impl ToolAnalyticsRepository {
17 pub fn new(db: &DbPool) -> Result<Self> {
18 let pool = db.pool_arc()?;
19 let write_pool = db.write_pool_arc()?;
20 Ok(Self { pool, write_pool })
21 }
22}