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

Method addToDeleteQueue

sql/notetable.cpp:1694–1715  ·  view source on GitHub ↗

Add to the deletion queue

Source from the content-addressed store, hash-verified

1692
1693// Add to the deletion queue
1694void NoteTable::addToDeleteQueue(qint32 lid, Note n) {
1695 get(n,lid,true,true);
1696 NSqlQuery query(db);
1697 db->lockForWrite();
1698
1699 query.prepare("insert into datastore (lid,key,data) values (:lid, :key, :data)");
1700
1701 QString guid = n.guid;
1702 QString notebookGuid = n.notebookGuid;
1703
1704 query.bindValue(":lid", lid);
1705 query.bindValue(":key", NOTE_DELETE_PENDING_GUID);
1706 query.bindValue(":data" , guid);
1707 query.exec();
1708
1709 query.bindValue(":lid", lid);
1710 query.bindValue(":key", NOTE_DELETE_PENDING_NOTEBOOK);
1711 query.bindValue(":data" , notebookGuid);
1712 query.exec();
1713
1714 db->unlock();
1715}
1716
1717
1718

Callers 1

expungeAllMethod · 0.80

Calls 5

lockForWriteMethod · 0.80
bindValueMethod · 0.80
prepareMethod · 0.45
execMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected