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

Method getRootId

common/sqlitedb.cpp:1137–1153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1135}
1136
1137int SQLiteDB::getRootId(int ohfi)
1138{
1139 QSqlQuery query;
1140 int root_ohfi = ohfi;
1141
1142 query.prepare("SELECT parent_id FROM adjacent_objects WHERE child_id = :child_id");
1143 while(root_ohfi >= OHFI_BASE_VALUE) {
1144 query.bindValue(0, root_ohfi);
1145 if(!query.exec() || !query.next()) {
1146 qDebug() << query.lastError();
1147 root_ohfi = 0;
1148 } else {
1149 root_ohfi = query.value(0).toInt();
1150 }
1151 }
1152 return root_ohfi;
1153}
1154
1155int SQLiteDB::getObjectType(int ohfi)
1156{

Callers

nothing calls this directly

Calls 1

valueMethod · 0.80

Tested by

no test coverage detected