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

Method getAll

sql/sharednotebooktable.cpp:335–349  ·  view source on GitHub ↗

Get a list of all shared notebooks

Source from the content-addressed store, hash-verified

333
334// Get a list of all shared notebooks
335qint32 SharedNotebookTable::getAll(QList<qint32> &values){
336 QLOG_TRACE() << "Entering SharedNotebookTable::getAll()";
337
338 NSqlQuery query(db);
339 db->lockForRead();
340 query.prepare("select distinct lid from DataStore where key=:key");
341 query.bindValue(":key", SHAREDNOTEBOOK_ID);
342 query.exec();
343 while (query.next()) {
344 values.append(query.value(0).toInt());
345 }
346 query.finish();
347 db->unlock();
348 return values.size();
349}
350
351
352// Get the shared notebook ID when given the LID

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