41 #include <QtSql/QSqlQuery> 57 bool tableExists_(
const String& db_name,
const String& table_name);
73 const char*
function,
const String& context,
const String& query =
"");
142 bool may_exist =
false);
155 const String& key_column =
"id");
164 const String& parent_table,
Key parent_id);
175 template<
class MetaInfoInterfaceContainer,
class DBKeyTable>
177 const String& parent_table,
const DBKeyTable& db_keys)
179 bool table_created =
false;
180 for (
const auto& element : container)
182 if (!element.isMetaEmpty())
187 table_created =
true;
194 template<
class ScoredProcessingResultContainer,
class DBKeyTable>
196 const String& parent_table,
const DBKeyTable& db_keys)
198 bool table_created =
false;
199 for (
const auto& element : container)
201 if (!element.steps_and_scores.empty())
206 table_created =
true;
221 const Feature& feature,
int& feature_id,
int parent_id);
224 template <
class FeatureContainer,
class Predicate>
227 if (features.empty())
return false;
228 for (
const Feature& feature : features)
230 if (pred(feature))
return true;
std::map< const IdentificationData::ObservationMatch *, Key > observation_match_keys_
Definition: OMSFileStore.h:262
void storeFeatureAndSubordinates_(const Feature &feature, int &feature_id, int parent_id)
std::map< const IdentificationData::DBSearchParam *, Key > search_param_keys_
Definition: OMSFileStore.h:254
A more convenient string class.
Definition: String.h:58
void storeIdentifiedSequences_(const IdentificationData &id_data)
Definition: AppliedProcessingStep.h:55
void storeVersionAndDate_()
LogType
Possible log types.
Definition: ProgressLogger.h:68
std::map< const IdentificationData::IdentifiedCompound *, Key > identified_compound_keys_
Definition: OMSFileStore.h:258
A container for features.
Definition: FeatureMap.h:98
std::map< const IdentificationData::ScoreType *, Key > score_type_keys_
Definition: OMSFileStore.h:250
std::map< const IdentificationData::InputFile *, Key > input_file_keys_
Definition: OMSFileStore.h:251
void createTableIdentifiedMolecule_()
IdentificationDataInternal::ParentMatches ParentMatches
Definition: IdentificationData.h:146
Representation of spectrum identification results and associated data.
Definition: IdentificationData.h:94
void createTableParentMatches_()
Key getDatabaseKey_(const IdentificationData::IdentifiedMolecule &molecule_var)
void storeParentMatches_(const IdentificationData::ParentMatches &matches, Key molecule_id)
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
void storeAdducts_(const IdentificationData &id_data)
void createTableCVTerm_()
void storeProcessingSteps_(const IdentificationData &id_data)
Class to hold strings, numeric values, lists of strings and lists of numeric values.
Definition: DataValue.h:58
QString db_name_
Definition: OMSFileStore.h:241
std::map< const DataProcessing *, Key > feat_processing_keys_
Definition: OMSFileStore.h:264
void createTableMetaInfo_(const String &parent_table, const String &key_column="id")
OMSFileStore(const String &filename, LogType log_type)
Constructor.
void storeParentSequences_(const IdentificationData &id_data)
~OMSFileStore()
Destructor.
void storeParentGroupSets_(const IdentificationData &id_data)
void raiseDBError_(const QSqlError &error, int line, const char *function, const String &context, const String &query="")
Raise a more informative database error.
std::map< const IdentificationData::IdentifiedOligo *, Key > identified_oligo_keys_
Definition: OMSFileStore.h:260
void storeScoredProcessingResults_(const ScoredProcessingResultContainer &container, const String &parent_table, const DBKeyTable &db_keys)
Definition: OMSFileStore.h:195
void createTableDataValue_()
Helper class for storing .oms files (SQLite format)
Definition: OMSFileStore.h:81
bool tableExists_(const String &db_name, const String &table_name)
Check if a specified database table exists.
void storeIdentifiedCompounds_(const IdentificationData &id_data)
std::map< const IdentificationData::ParentSequence *, Key > parent_sequence_keys_
Definition: OMSFileStore.h:256
std::map< std::string, QSqlQuery > prepared_queries_
prepared queries for inserting data into different tables
Definition: OMSFileStore.h:244
void storeDBSearchParams_(const IdentificationData &id_data)
Representation of controlled vocabulary term.
Definition: CVTerm.h:52
An LC-MS feature.
Definition: Feature.h:70
qint64 Key
Type used for database keys.
Definition: OMSFileStore.h:84
void storeFeature_(const FeatureMap &features)
Variant type holding Peptide/Compound/Oligo references and convenience functions. ...
Definition: IdentifiedMolecule.h:54
void storeObservationMatches_(const IdentificationData &id_data)
void storeInputFiles_(const IdentificationData &id_data)
void storeProcessingSoftwares_(const IdentificationData &id_data)
void store(const IdentificationData &id_data)
Write data from an IdentificationData object to database.
std::map< const IdentificationData::IdentifiedPeptide *, Key > identified_peptide_keys_
Definition: OMSFileStore.h:259
void storeDataProcessing_(const FeatureMap &features)
bool anyFeaturePredicate_(const FeatureContainer &features, const Predicate &pred)
check whether a predicate is true for any feature (or subordinate thereof) in a container ...
Definition: OMSFileStore.h:225
void storeMetaInfos_(const MetaInfoInterfaceContainer &container, const String &parent_table, const DBKeyTable &db_keys)
Definition: OMSFileStore.h:176
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
std::map< const IdentificationData::ProcessingSoftware *, Key > processing_software_keys_
Definition: OMSFileStore.h:252
Key storeCVTerm_(const CVTerm &cv_term)
void storeScoreTypes_(const IdentificationData &id_data)
std::map< const IdentificationData::ProcessingStep *, Key > processing_step_keys_
Definition: OMSFileStore.h:253
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:52
std::map< const IdentificationData::ParentGroupSet *, Key > parent_grouping_keys_
Definition: OMSFileStore.h:257
void createTableAppliedProcessingStep_(const String &parent_table)
std::map< const IdentificationData::Observation *, Key > observation_keys_
Definition: OMSFileStore.h:255
std::map< const AdductInfo *, Key > adduct_keys_
Definition: OMSFileStore.h:261
void storeFeatures_(const FeatureMap &features)
void storeObservations_(const IdentificationData &id_data)
void createTable_(const String &name, const String &definition, bool may_exist=false)
void createTableMoleculeType_()
void storeMapMetaData_(const FeatureMap &features)
void storeAppliedProcessingStep_(const IdentificationData::AppliedProcessingStep &step, Size step_order, const String &parent_table, Key parent_id)
void storeMetaInfo_(const MetaInfoInterface &info, const String &parent_table, Key parent_id)
Key storeDataValue_(const DataValue &value)