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

Method getLid

sql/sharednotebooktable.cpp:36–49  ·  view source on GitHub ↗

Given the notebook ID, return the LID

Source from the content-addressed store, hash-verified

34
35// Given the notebook ID, return the LID
36qint32 SharedNotebookTable::getLid(qlonglong id){
37 qint32 retval = 0;
38 NSqlQuery query(db);
39 db->lockForRead();
40 query.prepare("Select lid from DataStore where key=:key and data=:data");
41 query.bindValue(":key", SHAREDNOTEBOOK_ID);
42 query.bindValue(":data", id);
43 query.exec();
44 if (query.next())
45 retval = query.value(0).toInt();
46 query.finish();
47 db->unlock();
48 return retval;
49}
50
51
52// Synchronize a shared notebook

Callers 1

findByNotebookGuidMethod · 0.45

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