| 906 | } |
| 907 | |
| 908 | bool SQLiteDB::getObjectMetadata(int ohfi, metadata_t &metadata) |
| 909 | { |
| 910 | QSqlQuery query( |
| 911 | "SELECT " |
| 912 | "t0.object_id as ohfi," |
| 913 | "t1.parent_id as parent," |
| 914 | "t2.path as path," |
| 915 | "t0.title as name," |
| 916 | "t0.type as type," |
| 917 | "t0.data_type as data_type," |
| 918 | "t2.size as size," |
| 919 | "t2.date_created as date_created " |
| 920 | "FROM object_node t0 " |
| 921 | "JOIN adjacent_objects t1 ON t1.child_id = t0.object_id " |
| 922 | "JOIN sources t2 ON t2.object_id = t0.object_id " |
| 923 | "WHERE t0.object_id = :object_id"); |
| 924 | query.bindValue(0, ohfi); |
| 925 | |
| 926 | if(query.exec() && query.next()) { |
| 927 | fillMetadata(query, metadata); |
| 928 | return true; |
| 929 | } else { |
| 930 | qDebug() << query.lastError(); |
| 931 | return false; |
| 932 | } |
| 933 | } |
| 934 | |
| 935 | int SQLiteDB::getObjectMetadatas(int parent_ohfi, metadata_t **metadata, int index, int max_number) |
| 936 | { |
nothing calls this directly
no outgoing calls
no test coverage detected