24 #ifndef SEARCHERSQLITE_H_
25 #define SEARCHERSQLITE_H_
49 string tableInfo(
const string& tableName,
string& errorMsg )
const;
54 string getCreatedDate()
const;
55 virtual bool isConnected()
const;
56 virtual void stopSearch();
62 virtual void setChemicalNames(
const std::vector<string>& chemNames );
63 virtual void setSpeciesNames(
const std::vector<string>& speciesNames );
67 virtual void setFrequencyRange(
double minValue,
double maxValue );
68 virtual void setIntensityRange(
double minValue,
double maxValue );
69 virtual void setSmu2Range(
double minValue,
double maxValue );
70 virtual void setLogaRange(
double minValue,
double maxValue );
71 virtual void setElRange(
double minValue,
double maxValue );
72 virtual void setEuRange(
double minValue,
double maxValue );
73 virtual void setQNS(
const std::vector<string>& qns );
77 virtual void setFilterTop20(
bool filter =
true );
78 virtual void setFilterPlanetaryAtmosphere(
bool filter =
true );
79 virtual void setFilterHotCores(
bool filter =
true );
80 virtual void setFilterDarkClouds(
bool filter =
true );
81 virtual void setFilterDiffuseClouds(
bool filter =
true );
82 virtual void setFilterComets(
bool filter =
true );
83 virtual void setFilterAgbPpnPn(
bool filter =
true );
84 virtual void setFilterExtragalactic(
bool filter =
true );
94 virtual std::vector<SplatResult> doSearch(
string& errorMsg,
int offset );
95 virtual long doSearchCount(
string& errorMsg );
102 virtual void setSearchResultLimit(
int limit );
106 bool executeQuery( sqlite3_stmt*& statement,
const string& query,
107 string& errorMsg )
const;
116 string prepareQuery(
bool countOnly,
int offset )
const;
117 std::string getTrue()
const;
118 string numToString(
double number )
const;
119 string getBetweenClause(
const string& columnName,
double low,
double high)
const;
120 string getInClause(
const string& columnName,
const std::vector<string>& values )
const;
121 string getLikeClause(
const string& columnName,
const std::vector<string>& values )
const;
167 enum TableColumns { SPECIES_ID_COL, SPECIES_NAME_COL, CHEMICAL_NAME_COL,
168 FREQUENCY_COL,
TEMPERATURE_COL, RESOLVED_QNS_COL, INTENSITY_COL, SMU2_COL, LOGA_COL, EL_COL,
188 const static std::string
AND;
195 const static std::string
IN;
197 const static std::string
OR;
static const std::string IN
static const std::string SPECIES_ID_COLUMN
static const std::string EL_COLUMN
virtual void reset()
Overrides PlotTool::reset().
static const std::string FILTER_COMET_COLUMN
static const std::string SINGLE_QUOTE
static const int DEFAULT_VALUE
static const std::string SPECIES_COLUMN
static const std::string OPEN_PAREN
static const std::string FILTER_TOP20_COLUMN
static const std::string SELECT
std::vector< string > chemicalNames
static const std::string FILTER_DIFFUSECLOUD_COLUMN
Interface needed to support molecular line searching and identification.
static const std::string LOGA_COLUMN
std::vector< string > qns
static const std::string OR
static const std::string FILTER_KNOWN_AST_COLUMN
static const std::string TEMPERATURE_COLUMN
static const std::string INTENSITY_COLUMN
std::vector< string > speciesNames
bool recommendedOnly;
Searches a local sqlite database for molecular lines meeting the specified search criteria...
static const std::string FILTER_HOTCORE_COLUMN
static std::vector< string > filterNames
static const std::string COMMA
static const std::string AND
double minValueFreq
Search parameters.
static const std::string FILTER_DARKCLOUD_COLUMN
static const std::string FILTER_AGB_PPN_PN_COLUMN
static const std::string EQUALS
static const std::string BETWEEN
static const std::string EU_COLUMN
std::vector< bool > filters
static const std::string FILTER_PLANET_COLUMN
static const std::string SMU2_COLUMN
static const std::string FREQUENCY_COLUMN
casacore::Table columns
std::set< ScanKey > filter(const std::set< ScanKey > scans, const ArrayKey &arrayKey)
given a set of scan keys, return the subset that matches the given array key
static const std::string FILTER_EXTRAGALACTIC_COLUMN
static const std::string TABLE_SPECIES
static std::vector< string > resultColumns
static const std::string LIKE
static const std::string RESOLVED_QNS_COLUMN
static const std::string CLOSE_PAREN
static const std::string TABLE_MAIN
casacore::Table Names
static const std::string CHEMICAL_NAME_COLUMN
static const std::string PERIOD
static const std::string FROM
SQL Constants.
int rowLimit
Limiting the number of rows returned by a search.