mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
store: Add get_deleted_(addressbooks/calendars)
This commit is contained in:
@@ -87,6 +87,20 @@ impl CalendarStore for SqliteStore {
|
||||
Ok(cals)
|
||||
}
|
||||
|
||||
#[instrument]
|
||||
async fn get_deleted_calendars(&self, principal: &str) -> Result<Vec<Calendar>, Error> {
|
||||
let cals = sqlx::query_as!(
|
||||
Calendar,
|
||||
r#"SELECT principal, id, synctoken, displayname, "order", description, color, timezone, deleted_at
|
||||
FROM calendars
|
||||
WHERE principal = ? AND deleted_at IS NOT NULL"#,
|
||||
principal
|
||||
)
|
||||
.fetch_all(&self.db)
|
||||
.await.map_err(crate::Error::from)?;
|
||||
Ok(cals)
|
||||
}
|
||||
|
||||
#[instrument]
|
||||
async fn insert_calendar(&self, calendar: Calendar) -> Result<(), Error> {
|
||||
sqlx::query!(
|
||||
|
||||
Reference in New Issue
Block a user