| 135 | |
| 136 | |
| 137 | void OMSFileLoad::loadProcessingSoftwares_(IdentificationData& id_data) |
| 138 | { |
| 139 | if (!db_->tableExists("ID_ProcessingSoftware")) return; |
| 140 | |
| 141 | |
| 142 | SQLite::Statement query(*db_, "SELECT * FROM ID_ProcessingSoftware"); |
| 143 | bool have_scores = db_->tableExists("ID_ProcessingSoftware_AssignedScore"); |
| 144 | SQLite::Statement subquery(*db_, ""); |
| 145 | if (have_scores) |
| 146 | { |
| 147 | subquery = SQLite::Statement(*db_, "SELECT score_type_id " \ |
| 148 | "FROM ID_ProcessingSoftware_AssignedScore " \ |
| 149 | "WHERE software_id = :id ORDER BY score_type_order ASC"); |
| 150 | } |
| 151 | while (query.executeStep()) |
| 152 | { |
| 153 | Key id = query.getColumn("id").getInt64(); |
| 154 | ID::ProcessingSoftware software(query.getColumn("name").getString(), |
| 155 | query.getColumn("version").getString()); |
| 156 | if (have_scores) |
| 157 | { |
| 158 | subquery.bind(":id", id); |
| 159 | while (subquery.executeStep()) |
| 160 | { |
| 161 | Key score_type_id = subquery.getColumn(0).getInt64(); |
| 162 | software.assigned_scores.push_back(score_type_refs_[score_type_id]); |
| 163 | } |
| 164 | subquery.reset(); // get ready for new executeStep() |
| 165 | } |
| 166 | ID::ProcessingSoftwareRef ref = id_data.registerProcessingSoftware(software); |
| 167 | processing_software_refs_[id] = ref; |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | |
| 172 | DataValue OMSFileLoad::makeDataValue_(const SQLite::Statement& query) |
nothing calls this directly
no test coverage detected