41 #include <QtSql/QSqlQuery>
72 const char*
function,
const String& context);
141 bool may_exist =
false);
154 const String& key_column =
"id");
163 const String& parent_table,
Key parent_id);
174 template<
class MetaInfoInterfaceContainer>
176 const String& parent_table)
178 bool table_created =
false;
180 for (
const auto& element : container)
182 if (!element.isMetaEmpty())
187 table_created =
true;
194 template<
class ScoredProcessingResultContainer>
196 const ScoredProcessingResultContainer& container,
197 const String& parent_table)
199 bool table_created =
false;
200 for (
const auto& element : container)
202 if (!element.steps_and_scores.empty())
207 table_created =
true;
211 element.steps_and_scores)
224 const Feature& feature,
int& feature_id,
int parent_id);
227 template <
class FeatureContainer,
class Predicate>
230 if (features.empty())
return false;
231 for (
const Feature& feature : features)
233 if (pred(feature))
return true;
Representation of controlled vocabulary term.
Definition: CVTerm.h:53
Class to hold strings, numeric values, lists of strings and lists of numeric values.
Definition: DataValue.h:59
A container for features.
Definition: FeatureMap.h:106
An LC-MS feature.
Definition: Feature.h:72
Representation of spectrum identification results and associated data.
Definition: IdentificationData.h:95
IdentificationDataInternal::ParentMatches ParentMatches
Definition: IdentificationData.h:146
Helper class for storing .oms files (SQLite format)
Definition: OMSFileStore.h:81
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:228
Key getAddress_(const IdentificationData::IdentifiedMolecule &molecule_var)
void storeProcessingSoftwares_(const IdentificationData &id_data)
void createTableIdentifiedMolecule_()
void store(const FeatureMap &features)
Write data from a FeatureMap object to database.
void createTableAppliedProcessingStep_(const String &parent_table)
void storeFeature_(const FeatureMap &features)
void createTableMoleculeType_()
Key storeDataValue_(const DataValue &value)
void storeDBSearchParams_(const IdentificationData &id_data)
void storeIdentifiedCompounds_(const IdentificationData &id_data)
void createTableDataValue_()
void storeScoreTypes_(const IdentificationData &id_data)
void storeMetaInfos_(const MetaInfoInterfaceContainer &container, const String &parent_table)
Definition: OMSFileStore.h:175
void createTable_(const String &name, const String &definition, bool may_exist=false)
void storeMetaInfo_(const MetaInfoInterface &info, const String &parent_table, Key parent_id)
~OMSFileStore()
Destructor.
void storeMapMetaData_(const FeatureMap &features)
qint64 Key
Type used for database keys.
Definition: OMSFileStore.h:83
void storeDataProcessing_(const FeatureMap &features)
Key storeCVTerm_(const CVTerm &cv_term)
void store(const IdentificationData &id_data)
Write data from an IdentificationData object to database.
void createTableCVTerm_()
void storeObservationMatches_(const IdentificationData &id_data)
void storeParentGroupSets_(const IdentificationData &id_data)
void storeObservations_(const IdentificationData &id_data)
void storeParentSequences_(const IdentificationData &id_data)
void storeScoredProcessingResults_(const ScoredProcessingResultContainer &container, const String &parent_table)
Definition: OMSFileStore.h:195
std::map< std::string, QSqlQuery > prepared_queries_
prepared queries for inserting data into different tables
Definition: OMSFileStore.h:247
void createTableMetaInfo_(const String &parent_table, const String &key_column="id")
void storeAppliedProcessingStep_(const IdentificationData::AppliedProcessingStep &step, Size step_order, const String &parent_table, Key parent_id)
void storeFeatures_(const FeatureMap &features)
void storeInputFiles_(const IdentificationData &id_data)
void storeProcessingSteps_(const IdentificationData &id_data)
void storeAdducts_(const IdentificationData &id_data)
void storeVersionAndDate_()
void storeIdentifiedSequences_(const IdentificationData &id_data)
void storeFeatureAndSubordinates_(const Feature &feature, int &feature_id, int parent_id)
void storeParentMatches_(const IdentificationData::ParentMatches &matches, Key molecule_id)
OMSFileStore(const String &filename, LogType log_type)
Constructor.
void createTableParentMatches_()
QString db_name_
Definition: OMSFileStore.h:244
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:53
LogType
Possible log types.
Definition: ProgressLogger.h:69
A more convenient string class.
Definition: String.h:60
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
void raiseDBError_(const QSqlError &error, int line, const char *function, const String &context)
Raise a more informative database error.
bool tableExists_(const String &db_name, const String &table_name)
Check if a specified database table exists.
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Definition: AppliedProcessingStep.h:56
Variant type holding Peptide/Compound/Oligo references and convenience functions.
Definition: IdentifiedMolecule.h:55