Find a notebook by the stack name
| 777 | |
| 778 | // Find a notebook by the stack name |
| 779 | void NotebookTable::findByStack(QList<qint32> &lids, QString stackName) { |
| 780 | NSqlQuery query(db); |
| 781 | db->lockForRead(); |
| 782 | query.prepare("Select lid from DataStore where key=:key and data=:name"); |
| 783 | query.bindValue(":key", NOTEBOOK_STACK); |
| 784 | query.bindValue(":name", stackName); |
| 785 | query.exec(); |
| 786 | while(query.next()) { |
| 787 | lids.append(query.value(0).toInt()); |
| 788 | } |
| 789 | query.finish(); |
| 790 | db->unlock(); |
| 791 | } |
| 792 | |
| 793 | |
| 794 |