Insert default values into the new table
| 79 | // Insert default values into the new table |
| 80 | //******************************************* |
| 81 | void ConfigStore::initTable() { |
| 82 | QLOG_TRACE() << "Entering ConfigStore::initTable()"; |
| 83 | |
| 84 | QLOG_DEBUG() << "Initializing table ConfigStore"; |
| 85 | db->lockForWrite(); |
| 86 | NSqlQuery sql(db); |
| 87 | sql.prepare("Insert into ConfigStore (key, value) values (:key, :value);"); |
| 88 | sql.bindValue(":key", CONFIG_STORE_LID); |
| 89 | sql.bindValue(":value", 0); |
| 90 | if (!sql.exec()) { |
| 91 | QLOG_ERROR() << "Insertion of initial counter failed: " << sql.lastError(); |
| 92 | } |
| 93 | sql.finish(); |
| 94 | db->unlock(); |
| 95 | } |
| 96 | |
| 97 | |
| 98 | //******************************************************************* |
no test coverage detected