MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / storeAppliedProcessingStep_

Method storeAppliedProcessingStep_

src/openms/source/FORMAT/OMSFileStore.cpp:281–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279
280
281 void OMSFileStore::storeAppliedProcessingStep_(const ID::AppliedProcessingStep& step, Size step_order,
282 const String& parent_table, Key parent_id)
283 {
284 // this assumes the "..._AppliedProcessingStep" table exists already!
285 auto& query = *prepared_queries_[parent_table + "_AppliedProcessingStep"];
286 query.bind(":parent_id", parent_id);
287 query.bind(":processing_step_order", int(step_order));
288 if (step.processing_step_opt)
289 {
290 query.bind(":processing_step_id", processing_step_keys_[&(**step.processing_step_opt)]);
291 if (step.scores.empty()) // insert processing step information only
292 {
293 query.bind(":score_type_id"); // NULL
294 query.bind(":score"); // NULL
295 execWithExceptionAndReset(query, 1, __LINE__, OPENMS_PRETTY_FUNCTION, "error inserting data");
296 }
297 }
298 else // use NULL for missing processing step reference
299 {
300 query.bind(":processing_step_id");
301 }
302 for (const auto& score_pair : step.scores)
303 {
304 query.bind(":score_type_id", score_type_keys_[&(*score_pair.first)]);
305 query.bind(":score", score_pair.second);
306 execWithExceptionAndReset(query, 1, __LINE__, OPENMS_PRETTY_FUNCTION, "error inserting data");
307 }
308 }
309
310
311 void OMSFileStore::storeScoreTypes_(const IdentificationData& id_data)

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.45

Tested by

no test coverage detected