MCPcopy Create free account
hub / github.com/YACReader/yacreader / deleteComicsFromLabel

Method deleteComicsFromLabel

YACReaderLibrary/db_helper.cpp:617–635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

615}
616
617void DBHelper::deleteComicsFromLabel(const QList<ComicDB> &comicsList, qulonglong labelId, QSqlDatabase &db)
618{
619 db.transaction();
620
621 QLOG_DEBUG() << "deleteComicsFromLabel----------------------------------";
622
623 QSqlQuery query(db);
624 query.prepare("DELETE FROM comic_label WHERE comic_id = :comic_id AND label_id = :label_id");
625 for (const auto &comic : comicsList) {
626 query.bindValue(":comic_id", comic.id);
627 query.bindValue(":label_id", labelId);
628 query.exec();
629
630 QLOG_DEBUG() << "cid = " << comic.id << "lid = " << labelId;
631 QLOG_DEBUG() << query.lastError().databaseText() << "-" << query.lastError().driverText();
632 }
633
634 db.commit();
635}
636
637void DBHelper::deleteComicsFromReadingList(const QList<ComicDB> &comicsList, qulonglong readingListId, QSqlDatabase &db)
638{

Callers 1

deleteComicsFromListMethod · 0.45

Calls 2

bindValueMethod · 0.80
execMethod · 0.80

Tested by

no test coverage detected