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

Method updateReadingRemoteProgress

YACReaderLibrary/db_helper.cpp:1073–1093  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1071}
1072
1073void DBHelper::updateReadingRemoteProgress(const ComicInfo &comicInfo, QSqlDatabase &db)
1074{
1075 QSqlQuery updateComicInfo(db);
1076 updateComicInfo.prepare("UPDATE comic_info SET "
1077 "read = :read, "
1078 "currentPage = :currentPage, "
1079 "hasBeenOpened = :hasBeenOpened, "
1080 "lastTimeOpened = :lastTimeOpened, "
1081 "rating = :rating"
1082 " WHERE id = :id ");
1083
1084 updateComicInfo.bindValue(":read", comicInfo.read ? 1 : 0);
1085 updateComicInfo.bindValue(":currentPage", comicInfo.currentPage);
1086 updateComicInfo.bindValue(":hasBeenOpened", comicInfo.hasBeenOpened ? 1 : 0);
1087 updateComicInfo.bindValue(":lastTimeOpened", QDateTime::currentSecsSinceEpoch());
1088 updateComicInfo.bindValue(":id", comicInfo.id);
1089 updateComicInfo.bindValue(":rating", comicInfo.rating);
1090 updateComicInfo.exec();
1091
1092 updateComicInfo.clear();
1093}
1094
1095// server v1
1096void DBHelper::updateFromRemoteClient(qulonglong libraryId, const ComicInfo &comicInfo)

Callers

nothing calls this directly

Calls 3

bindValueMethod · 0.80
execMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected