MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / getNewUnsequencedCount

Method getNewUnsequencedCount

sql/notebooktable.cpp:988–1002  ·  view source on GitHub ↗

Get a count of all new unsequenced notebooks

Source from the content-addressed store, hash-verified

986
987// Get a count of all new unsequenced notebooks
988int NotebookTable::getNewUnsequencedCount() {
989 db->lockForRead();
990 NSqlQuery query(db);
991 query.prepare("Select count(lid) from DataStore where key=:key and data=0 and lid not in (select lid from datastore where key=:localkey and data=1)");
992 query.bindValue(":key", NOTEBOOK_UPDATE_SEQUENCE_NUMBER);
993 query.bindValue(":localkey", NOTEBOOK_IS_LOCAL);
994 query.exec();
995 qint32 retval = 0;
996 while(query.next()) {
997 retval = query.value(0).toInt();
998 }
999 query.finish();
1000 db->unlock();
1001 return retval;
1002}
1003
1004
1005

Callers

nothing calls this directly

Calls 6

lockForReadMethod · 0.80
bindValueMethod · 0.80
valueMethod · 0.80
prepareMethod · 0.45
execMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected