mirror of
https://github.com/chatmail/core.git
synced 2026-05-16 21:36:30 +03:00
Use repeat_vars() more (#3133)
This commit is contained in:
@@ -472,9 +472,12 @@ pub async fn kill_action(context: &Context, action: Action) -> Result<()> {
|
||||
|
||||
/// Remove jobs with specified IDs.
|
||||
async fn kill_ids(context: &Context, job_ids: &[u32]) -> Result<()> {
|
||||
if job_ids.is_empty() {
|
||||
return Ok(());
|
||||
}
|
||||
let q = format!(
|
||||
"DELETE FROM jobs WHERE id IN({})",
|
||||
job_ids.iter().map(|_| "?").collect::<Vec<&str>>().join(",")
|
||||
sql::repeat_vars(job_ids.len())?
|
||||
);
|
||||
context
|
||||
.sql
|
||||
|
||||
Reference in New Issue
Block a user