Given the notebook ID, return the LID
| 34 | |
| 35 | // Given the notebook ID, return the LID |
| 36 | qint32 SharedNotebookTable::getLid(qlonglong id){ |
| 37 | qint32 retval = 0; |
| 38 | NSqlQuery query(db); |
| 39 | db->lockForRead(); |
| 40 | query.prepare("Select lid from DataStore where key=:key and data=:data"); |
| 41 | query.bindValue(":key", SHAREDNOTEBOOK_ID); |
| 42 | query.bindValue(":data", id); |
| 43 | query.exec(); |
| 44 | if (query.next()) |
| 45 | retval = query.value(0).toInt(); |
| 46 | query.finish(); |
| 47 | db->unlock(); |
| 48 | return retval; |
| 49 | } |
| 50 | |
| 51 | |
| 52 | // Synchronize a shared notebook |
no test coverage detected