| 458 | } |
| 459 | |
| 460 | bool SQLiteDB::updateAdjacencyList(int ohfi, int id_parent) |
| 461 | { |
| 462 | QSqlQuery query; |
| 463 | query.prepare("SELECT * FROM adjacent_objects WHERE parent_id == :parent_id AND child_id == :child_id"); |
| 464 | query.bindValue(0, id_parent); |
| 465 | query.bindValue(1, ohfi); |
| 466 | |
| 467 | if(query.exec() && query.next()) { |
| 468 | return true; |
| 469 | } |
| 470 | |
| 471 | query.prepare("INSERT INTO adjacent_objects (parent_id, child_id)" |
| 472 | "VALUES (:parentid, :child_id)"); |
| 473 | query.bindValue(0, id_parent); |
| 474 | query.bindValue(1, ohfi); |
| 475 | bool ret = query.exec(); |
| 476 | if(!ret) { |
| 477 | qDebug() << query.lastError(); |
| 478 | } |
| 479 | return ret; |
| 480 | } |
| 481 | |
| 482 | int SQLiteDB::insertDefaultEntry(const QString &path, const QString &name, const QString &title, int id_parent, int type) |
| 483 | { |
nothing calls this directly
no outgoing calls
no test coverage detected