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

Method resetLinkedNotebooksDirty

sql/notebooktable.cpp:1039–1048  ·  view source on GitHub ↗

Linked notebooks are not uploaded, so we reset the dirty flags in case they were updated locally

Source from the content-addressed store, hash-verified

1037// Linked notebooks are not uploaded, so we reset the dirty flags in case
1038// they were updated locally
1039void NotebookTable::resetLinkedNotebooksDirty() {
1040 db->lockForWrite();
1041 NSqlQuery query(db);
1042 query.prepare("Delete from datastore where key=:key and lid in (select lid from datastore where key=:linkedkey)");
1043 query.bindValue(":key", NOTEBOOK_ISDIRTY);
1044 query.bindValue(":linkedkey", LINKEDNOTEBOOK_GUID);
1045 query.exec();
1046 query.finish();
1047 db->unlock();
1048}
1049
1050
1051

Callers 1

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