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

Method insert

YACReaderLibrary/db_helper.cpp:1428–1445  ·  view source on GitHub ↗

inserts

Source from the content-addressed store, hash-verified

1426
1427// inserts
1428qulonglong DBHelper::insert(Folder *folder, QSqlDatabase &db)
1429{
1430 auto added = QDateTime::currentSecsSinceEpoch();
1431 folder->added = added;
1432
1433 QSqlQuery query(db);
1434 query.prepare("INSERT INTO folder (parentId, name, path, added, type) "
1435 "VALUES (:parentId, :name, :path, :added, :type)");
1436 query.bindValue(":parentId", folder->parentId);
1437 query.bindValue(":name", folder->name);
1438 query.bindValue(":path", folder->path);
1439 query.bindValue(":added", added);
1440 auto intType = static_cast<int>(folder->type);
1441 query.bindValue(":type", intType);
1442 query.exec();
1443
1444 return query.lastInsertId().toULongLong();
1445}
1446
1447qulonglong DBHelper::insert(ComicDB *comic, QSqlDatabase &db, bool insertAllInfo)
1448{

Callers 15

initDefaultShorcutsMethod · 0.45
onRawDataReadyMethod · 0.45
scheduleDecodeMethod · 0.45
deliverDecodedImageMethod · 0.45
enqueueScaleMethod · 0.45
deliverScaledImageMethod · 0.45
setToolbarIconPairFunction · 0.45
getReadingListsMethod · 0.45
getFoldersFromParentMethod · 0.45
getLabelsMethod · 0.45
getAuthorsFunction · 0.45
restoreAllMethod · 0.45

Calls 2

bindValueMethod · 0.80
execMethod · 0.80

Tested by

no test coverage detected