| 221 | |
| 222 | |
| 223 | void OMSFileStore::storeMetaInfo_(const MetaInfoInterface& info, const String& parent_table, Key parent_id) |
| 224 | { |
| 225 | if (info.isMetaEmpty()) return; |
| 226 | |
| 227 | // this assumes the "..._MetaInfo" and "DataValue_DataType" tables exist already! |
| 228 | auto& query = *prepared_queries_[parent_table + "_MetaInfo"]; |
| 229 | query.bind(":parent_id", parent_id); |
| 230 | // this is inefficient, but MetaInfoInterface doesn't support iteration: |
| 231 | vector<String> info_keys; |
| 232 | info.getKeys(info_keys); |
| 233 | for (const String& info_key : info_keys) |
| 234 | { |
| 235 | query.bind(":name", info_key); |
| 236 | |
| 237 | const DataValue& value = info.getMetaValue(info_key); |
| 238 | if (value.isEmpty()) // use NULL as the type for empty values |
| 239 | { |
| 240 | query.bind(":data_type_id"); |
| 241 | } |
| 242 | else |
| 243 | { |
| 244 | query.bind(":data_type_id", int(value.valueType()) + 1); |
| 245 | } |
| 246 | query.bind(":value", value.toString()); |
| 247 | execWithExceptionAndReset(query, 1, __LINE__, OPENMS_PRETTY_FUNCTION, "error inserting data"); |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | |
| 252 | void OMSFileStore::createTableAppliedProcessingStep_(const String& parent_table) |
nothing calls this directly
no test coverage detected