Read all Info from the database
| 119 | |
| 120 | /// Read all Info from the database |
| 121 | static bool read_info(QSqlDatabase *db, Execution &ex) |
| 122 | { |
| 123 | const auto query = "select * from Info;"; |
| 124 | QSqlQuery select_info_ (*db); |
| 125 | select_info_.prepare(query); |
| 126 | |
| 127 | bool success = select_info_.exec(); |
| 128 | if(!success) return false; |
| 129 | |
| 130 | auto &sd = ex.solver_data(); |
| 131 | |
| 132 | while (select_info_.next()) |
| 133 | { |
| 134 | const auto nid = NodeID(select_info_.value(0).toInt()); |
| 135 | const auto info_text = select_info_.value(1).toString().toStdString(); |
| 136 | |
| 137 | sd.setInfo(nid, {info_text}); |
| 138 | } |
| 139 | |
| 140 | return success; |
| 141 | } |
| 142 | |
| 143 | /// Read all nogoods from the database |
| 144 | static bool read_nogoods(QSqlDatabase *db, Execution &ex) |