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

Method updateNoteLid

sql/resourcetable.cpp:1042–1052  ·  view source on GitHub ↗

Update a resource's owning note. This is done when merging notes

Source from the content-addressed store, hash-verified

1040
1041// Update a resource's owning note. This is done when merging notes
1042void ResourceTable::updateNoteLid(qint32 resourceLid, qint32 newNoteLid) {
1043 NSqlQuery query(db);
1044 db->lockForWrite();
1045 query.prepare("Update datastore set data=:newNoteLid where lid=:resourceLid and key=:key");
1046 query.bindValue(":newNoteLid", newNoteLid);
1047 query.bindValue(":resourceLid", resourceLid);
1048 query.bindValue(":key", RESOURCE_NOTE_LID);
1049 query.exec();
1050 query.finish();
1051 db->unlock();
1052}
1053
1054
1055// Get a resource's map data

Callers 1

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