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

Method findByNotebookGuid

sql/sharednotebooktable.cpp:423–440  ·  view source on GitHub ↗

Find a shared notebook LID by its GUID

Source from the content-addressed store, hash-verified

421
422// Find a shared notebook LID by its GUID
423qint32 SharedNotebookTable::findByNotebookGuid(QString id) {
424 NSqlQuery query(db);
425 db->lockForRead();
426 query.prepare("Select lid from DataStore where key=:key and data=:id");
427 query.bindValue(":key", SHAREDNOTEBOOK_NOTEBOOK_GUID);
428 query.bindValue(":id", id);
429 query.exec();
430 while (query.next()) {
431 qint32 retval = query.value(0).toInt();
432 query.finish();
433 db->unlock();
434 return retval;
435 }
436 query.finish();
437 db->unlock();
438 NotebookTable ntable(db);
439 return ntable.getLid(id);
440}
441
442
443// Find a shared notebook by the GUID

Callers 1

syncMethod · 0.80

Calls 7

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

Tested by

no test coverage detected