| 869 | } |
| 870 | |
| 871 | int SQLiteDB::childObjectCount(int parent_ohfi) |
| 872 | { |
| 873 | QSqlQuery query; |
| 874 | query.prepare("SELECT count(child_id) FROM adjacent_objects WHERE parent_id = :object_id"); |
| 875 | query.bindValue(0, parent_ohfi); |
| 876 | if(!query.exec() || !query.next()) { |
| 877 | qDebug() << query.lastError(); |
| 878 | return -1; |
| 879 | } else { |
| 880 | return query.value(0).toInt(); |
| 881 | } |
| 882 | } |
| 883 | |
| 884 | bool SQLiteDB::deleteEntry(int ohfi, int root_ohfi) |
| 885 | { |