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

Method getShareUsers

sql/sharednotebooktable.cpp:452–469  ·  view source on GitHub ↗

Find users for a specific shared notebook

Source from the content-addressed store, hash-verified

450
451//Find users for a specific shared notebook
452qint32 SharedNotebookTable::getShareUsers(QStringList &users, qint32 lid) {
453 qint32 retval = 0;
454 users.clear();
455
456 NSqlQuery query(db);
457 db->lockForRead();
458 query.prepare("Select data from DataStore where lid=:lid and key=:key");
459 query.bindValue(":lid", lid);
460 query.bindValue(":key", SHAREDNOTEBOOK_USERNAME);
461 query.exec();
462 while (query.next()) {
463 retval++;
464 users.append(query.value(0).toString());
465 }
466 query.finish();
467 db->unlock();
468 return retval;
469}
470
471
472// Remove a shared notebook

Callers 1

writeSharedNotebooksMethod · 0.80

Calls 8

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

Tested by

no test coverage detected