MCPcopy Create free account
hub / github.com/codestation/qcma / updateAdjacencyList

Method updateAdjacencyList

common/sqlitedb.cpp:460–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458}
459
460bool 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
482int SQLiteDB::insertDefaultEntry(const QString &path, const QString &name, const QString &title, int id_parent, int type)
483{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected