Get all notebooks for a particular stack
| 573 | |
| 574 | // Get all notebooks for a particular stack |
| 575 | qint32 NotebookTable::getStack(QList<qint32> &retval, QString &stack){ |
| 576 | NSqlQuery query(db); |
| 577 | db->lockForRead(); |
| 578 | query.prepare("select distinct lid from DataStore where key=:key and data=:stack"); |
| 579 | query.bindValue(":key", NOTEBOOK_STACK); |
| 580 | query.bindValue(":stack", stack); |
| 581 | query.exec(); |
| 582 | while (query.next()) { |
| 583 | retval.append(query.value(0).toInt()); |
| 584 | } |
| 585 | query.finish(); |
| 586 | db->unlock(); |
| 587 | return retval.size(); |
| 588 | |
| 589 | } |
| 590 | |
| 591 | |
| 592 |
no test coverage detected