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

Method getLastUpdateSequenceNumber

sql/linkednotebooktable.cpp:557–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555
556
557qint32 LinkedNotebookTable::getLastUpdateSequenceNumber(qint32 lid) {
558 NSqlQuery query(db);
559 db->lockForRead();
560 query.prepare("select data from datastore where lid=:lid and key=:key");
561 query.bindValue(":lid", lid);
562 query.bindValue(":key", LINKEDNOTEBOOK_LAST_USN);
563 query.exec();
564 qint32 retval = 0;
565 if (query.next()) {
566 retval = query.value(0).toInt();
567 }
568 query.finish();
569 db->unlock();
570 return retval;
571}
572
573
574

Callers 1

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