quote frontend init, chips, basic stats

This commit is contained in:
2026-03-09 22:56:13 +01:00
parent 4a4e97f7be
commit 9e678c5586
12 changed files with 216 additions and 4 deletions

View File

@@ -38,6 +38,11 @@ pub enum QuoteError {
}
impl Quote {
pub fn total_count() -> Result<i64, QuoteError> {
let conn = database::conn()?;
let count: i64 = conn.query_row("SELECT COUNT(*) FROM quotes", (), |r| r.get(0))?;
Ok(count)
}
pub fn get_by_id(id: Uuid) -> Result<Quote, QuoteError> {
let conn = database::conn()?;