mirror of
https://github.com/chatmail/core.git
synced 2026-04-20 15:06:30 +03:00
sql: make all queries persistent and update to upstream sqlx
&str queries are not persistent by default. To make queries persistent, they have to be constructed with sqlx::query. Upstream sqlx does not contain the change that make all queries persistent, but it is not needed anymore. but
This commit is contained in:
@@ -401,7 +401,10 @@ fn is_marker(txt: &str) -> bool {
|
||||
|
||||
/// Deletes all locations from the database.
|
||||
pub async fn delete_all(context: &Context) -> Result<(), Error> {
|
||||
context.sql.execute("DELETE FROM locations;").await?;
|
||||
context
|
||||
.sql
|
||||
.execute(sqlx::query("DELETE FROM locations;"))
|
||||
.await?;
|
||||
context.emit_event(EventType::LocationChanged(None));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user