| 163 | } |
| 164 | |
| 165 | static void insert_node(QSqlQuery *stmt, NodeData nd) |
| 166 | { |
| 167 | stmt->finish(); |
| 168 | |
| 169 | stmt->addBindValue(static_cast<int>(nd.nid)); |
| 170 | stmt->addBindValue(static_cast<int>(nd.pid)); |
| 171 | stmt->addBindValue(static_cast<int>(nd.alt)); |
| 172 | stmt->addBindValue(static_cast<int>(nd.kids)); |
| 173 | stmt->addBindValue(static_cast<int>(nd.status)); |
| 174 | stmt->addBindValue(nd.label.c_str()); |
| 175 | |
| 176 | if (!stmt->exec()) |
| 177 | { |
| 178 | print("ERROR: could not execute db statement"); |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | static void save_nodes(QSqlDatabase *db, const Execution *ex) |
| 183 | { |