Get a list of all notebooks
| 540 | |
| 541 | // Get a list of all notebooks |
| 542 | qint32 NotebookTable::getAll(QList<qint32> &books) { |
| 543 | NSqlQuery query(db); |
| 544 | db->lockForRead(); |
| 545 | query.prepare("select distinct lid from DataStore where key=:key"); |
| 546 | query.bindValue(":key", NOTEBOOK_GUID); |
| 547 | query.exec(); |
| 548 | while (query.next()) { |
| 549 | books.append(query.value(0).toInt()); |
| 550 | } |
| 551 | query.finish(); |
| 552 | db->unlock(); |
| 553 | return books.size(); |
| 554 | } |
| 555 | |
| 556 | |
| 557 |