treewide: cleanup
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ia01590cdeed872cc8ebd16f6ca95f3cc6a6a6964
This commit is contained in:
parent
0ba898c881
commit
185e3b562a
16 changed files with 258 additions and 219 deletions
|
|
@ -1888,10 +1888,12 @@ impl StorageBackend for SqliteBackend {
|
|||
.unchecked_transaction()
|
||||
.map_err(crate::error::db_ctx("batch_tag_media", &ctx))?;
|
||||
// Prepare statement once for reuse
|
||||
let mut stmt = tx.prepare_cached(
|
||||
"INSERT OR IGNORE INTO media_tags (media_id, tag_id) VALUES (?1, ?2)",
|
||||
)
|
||||
.map_err(crate::error::db_ctx("batch_tag_media", &ctx))?;
|
||||
let mut stmt = tx
|
||||
.prepare_cached(
|
||||
"INSERT OR IGNORE INTO media_tags (media_id, tag_id) VALUES (?1, \
|
||||
?2)",
|
||||
)
|
||||
.map_err(crate::error::db_ctx("batch_tag_media", &ctx))?;
|
||||
let mut count = 0u64;
|
||||
for mid in &media_ids {
|
||||
for tid in &tag_ids {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue