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

Method deleteComicsFromReadingList

YACReaderLibrary/db_helper.cpp:637–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

635}
636
637void DBHelper::deleteComicsFromReadingList(const QList<ComicDB> &comicsList, qulonglong readingListId, QSqlDatabase &db)
638{
639 db.transaction();
640
641 QLOG_DEBUG() << "deleteComicsFromReadingList----------------------------------";
642
643 QSqlQuery query(db);
644 query.prepare("DELETE FROM comic_reading_list WHERE comic_id = :comic_id AND reading_list_id = :reading_list_id");
645 for (const auto &comic : comicsList) {
646 query.bindValue(":comic_id", comic.id);
647 query.bindValue(":reading_list_id", readingListId);
648 query.exec();
649 }
650
651 db.commit();
652}
653
654// updates
655void DBHelper::update(ComicDB *comic, QSqlDatabase &db)

Callers 1

deleteComicsFromListMethod · 0.45

Calls 2

bindValueMethod · 0.80
execMethod · 0.80

Tested by

no test coverage detected