1 #ifndef CARMA_DBMS_MONITORPOINTSELECTOR_H
2 #define CARMA_DBMS_MONITORPOINTSELECTOR_H
15 #include "carma/dbms/MonitorDescription.h"
242 const std::string& table=
"",
243 const std::string& columnAliasPrepender=
"",
244 const std::string& blankingFlagTableAlias=
"",
245 const std::string& validityTableAlias=
"",
246 const std::string& enumIndexTableAlias=
"",
247 const bool& onlyAliases=
false)
259 columnPrefix_ = columnPrefix;
262 std::string getColumnPrefix()
const {
return columnPrefix_; }
320 std::string columnPrefix_;
327 static std::string getModifiedColumnSelection_
329 const std::string& alias,
const bool& onlyAlias);
337 const std::string& table=
"",
338 const std::string& columnAliasPrepender=
"",
339 const std::string& blankingFlagTableAlias=
"",
340 const std::string& validityTableAlias=
"",
341 const std::string& enumIndexTableAlias=
"",
342 const bool& onlyAliases=
false)
const;
361 #endif // CARMA_DBMS_MONITORPOINTSELECTOR_H
Class for sorting a set of MPSelector pointers.
std::vector< std::string > selectedColumns_(const carma::dbms::MonitorAverageType &avgType, const std::string &table="", const std::string &columnAliasPrepender="", const std::string &blankingFlagTableAlias="", const std::string &validityTableAlias="", const std::string &enumIndexTableAlias="", const bool &onlyAliases=false) const
get the column selections as a a vector for making counting, etc easier
void selectOnlyTagID()
convenience method for setting the SelectionMask to permit selecting only the tagID column ...
std::set< MonitorPointSelector *, MPSelectorCompare > MPSelectorSet
A set of MonitorPointSelector points ordered by tagID.
bool blankingFlag
If true, the blankingFlag column is from the BlankingFlags table is selected.
unsigned getTagID() const
get the tagID of the monitor point represented by this selection
~MonitorPointSelector()
destructor
bool minValue
If true, the minValue column is selected.
bool enumString
If true, the corresponding enumerator string column is selected if the monitor point has data type en...
Class to represent an SQL selection (portion of SELECT clause) based on the attributes of a monitor p...
SelectionMask getSelectionMask() const
get the selection mask
void setSelectionMask(const SelectionMask &mask, bool quietly=false)
set the selection mask
void setColumnPrefix(const std::string &columnPrefix)
set the column prefix for the fields returned in the result set for example if the mask is set to sel...
SelectionMask allSelectionMask() const
get a selection mask with all fields set to true.
unsigned selectedColumnCount(carma::dbms::MonitorAverageType &avgType) const
get the number of columns which will be selected based on the selection mask, monitor point data type...
std::string toString() const
string representation of this selection
A MonitorDescription object holds all information on a monitor point which is stored in the database ...
bool maxValue
If true, the maxValue column is selected.
Holds info on which monitor point fields should be selected (ie returned) by a query), if a value is set to true, the corresponding column is included in the selection (in cases where the selection makes sense, see the description of individual fields), if false it is not.
bool validityID
If true, the validityID column is selected.
bool tagID
If true, the tagID column is selected.
bool blankingFlagID
if true, the blankingFlagID column is selected.
relationships between the monitor and dbms systems
bool validity
If true, the validity column from the Validities table is selected.
bool doSelectEnumString() const
should the enumerator string column be selected based on the selection mask and on the datatype...
SelectionMask nullSelectionMask() const
get a selection mask with all fields set to false
MonitorAverageType
average type of the monitor[point,data file,table]
access of column names in the database
void setDefaultSelection_()
set the default selection
bool iSample
If true, the iSample column is selected.
unsigned getSupplementalTableJoinCount() const
returns the number of supplemental tables which will need to be joined to the main monitor table(s) t...
bool time
If true, the time column (frameCount for frame and minute averages, integrationID for astronomical in...
Abstract base class to represent an SQL selection (portion of SELECT clause)
MonitorPointDataType getDataType() const
get the data type of the monitor point associated with this selector
an abstract class from which database queries may be launched.
bool value
If true, the value column is selected.
MonitorPointSelector(const unsigned &tagID, const carma::dbms::DBConnection *const dbc)
constructor the object is intialized with all the members of its selection mask set to false...
MonitorPointDataType
type of the monitor point.