1 2 3 4 5 6 7 8 9 10 11 12
use super::Database; use rusqlite::params; impl Database { pub fn delete_note(&self, note_id: u32) -> Result<usize, Box<dyn std::error::Error>> { let out = self .conn .execute("DELETE FROM notes WHERE id = ?1", params![note_id])?; Ok(out) } }