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

Method getRecentlyUpdated

sql/notetable.cpp:2545–2560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2543
2544
2545void NoteTable::getRecentlyUpdated(QList< QPair< qint32, QString > > &lids) {
2546 NSqlQuery query(db);
2547 lids.clear();
2548 db->lockForRead();
2549 query.prepare("select lid, title from notetable order by dateupdated desc limit 10");
2550 query.exec();
2551 while (query.next()) {
2552 QPair<qint32, QString> pair;
2553 pair.first = query.value(0).toInt();
2554 pair.second = query.value(1).toString();
2555 lids.append(pair);
2556 }
2557 query.finish();
2558 db->unlock();
2559 return;
2560}
2561
2562
2563

Callers 1

buildActionMenuMethod · 0.80

Calls 7

lockForReadMethod · 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