casa
5.7.0-16
|
Searches a local sqlite database for molecular lines meeting the specified search criteria. More...
#include <SearcherSQLite.h>
Public Member Functions | |
SearcherSQLite (const string &databasePath) | |
string | tableInfo (const string &tableName, string &errorMsg) const |
Returns a string containing (columnName, columnType) information for all the columns in the table. More... | |
string | getCreatedDate () const |
Returns the date the database file was installed. More... | |
virtual bool | isConnected () const |
Returns whether or not a connection has been established to the database provider. More... | |
virtual void | stopSearch () |
Provide a way to interrupt long searches. More... | |
virtual void | reset () |
Set all the search parameters back to their defaults. More... | |
virtual void | setChemicalNames (const std::vector< string > &chemNames) |
Search Paramaters. More... | |
virtual void | setSpeciesNames (const std::vector< string > &speciesNames) |
virtual void | setFrequencyRange (double minValue, double maxValue) |
Units are assumed to be MHz. More... | |
virtual void | setIntensityRange (double minValue, double maxValue) |
virtual void | setSmu2Range (double minValue, double maxValue) |
virtual void | setLogaRange (double minValue, double maxValue) |
virtual void | setElRange (double minValue, double maxValue) |
virtual void | setEuRange (double minValue, double maxValue) |
virtual void | setQNS (const std::vector< string > &qns) |
virtual void | setFilterTop20 (bool filter=true) |
Astronomical Filters. More... | |
virtual void | setFilterPlanetaryAtmosphere (bool filter=true) |
virtual void | setFilterHotCores (bool filter=true) |
virtual void | setFilterDarkClouds (bool filter=true) |
virtual void | setFilterDiffuseClouds (bool filter=true) |
virtual void | setFilterComets (bool filter=true) |
virtual void | setFilterAgbPpnPn (bool filter=true) |
virtual void | setFilterExtragalactic (bool filter=true) |
virtual std::vector< SplatResult > | doSearch (string &errorMsg, int offset) |
Performing the Search. More... | |
virtual long | doSearchCount (string &errorMsg) |
virtual void | setSearchResultLimit (int limit) |
Sets the maximum number of rows that will be returned as a result of a database search. More... | |
virtual | ~SearcherSQLite () |
Public Member Functions inherited from casa::Searcher | |
Searcher () | |
virtual | ~Searcher () |
Private Member Functions | |
bool | executeQuery (sqlite3_stmt *&statement, const string &query, string &errorMsg) const |
string | prepareQuery (bool countOnly, int offset) const |
std::string | getTrue () const |
string | numToString (double number) const |
string | getBetweenClause (const string &columnName, double low, double high) const |
string | getInClause (const string &columnName, const std::vector< string > &values) const |
string | getLikeClause (const string &columnName, const std::vector< string > &values) const |
Private Attributes | |
sqlite3 * | db |
Set-up. More... | |
double | minValueFreq |
Search parameters. More... | |
double | maxValueFreq |
double | minValueIntensity |
double | maxValueIntensity |
double | minValueSmu2 |
double | maxValueSmu2 |
double | minValueLoga |
double | maxValueLoga |
double | minValueEl |
double | maxValueEl |
double | minValueEu |
double | maxValueEu |
std::vector< string > | speciesNames |
bool recommendedOnly; More... | |
std::vector< string > | chemicalNames |
std::vector< string > | qns |
std::vector< bool > | filters |
int | rowLimit |
Limiting the number of rows returned by a search. More... | |
Static Private Attributes | |
static std::vector< string > | filterNames |
static const std::string | TABLE_MAIN |
casacore::Table Names More... | |
static const std::string | TABLE_SPECIES |
static const std::string | FREQUENCY_COLUMN |
casacore::Table columns More... | |
static const std::string | TEMPERATURE_COLUMN |
static const std::string | SPECIES_ID_COLUMN |
static const std::string | SPECIES_COLUMN |
static const std::string | SMU2_COLUMN |
static const std::string | EL_COLUMN |
static const std::string | EU_COLUMN |
static const std::string | LOGA_COLUMN |
static const std::string | INTENSITY_COLUMN |
static const std::string | RESOLVED_QNS_COLUMN |
static const std::string | CHEMICAL_NAME_COLUMN |
static std::vector< string > | resultColumns |
static const std::string | FILTER_KNOWN_AST_COLUMN |
static const std::string | FILTER_PLANET_COLUMN |
static const std::string | FILTER_HOTCORE_COLUMN |
static const std::string | FILTER_DIFFUSECLOUD_COLUMN |
static const std::string | FILTER_DARKCLOUD_COLUMN |
static const std::string | FILTER_COMET_COLUMN |
static const std::string | FILTER_EXTRAGALACTIC_COLUMN |
static const std::string | FILTER_AGB_PPN_PN_COLUMN |
static const std::string | FILTER_TOP20_COLUMN |
static const std::string | FROM |
SQL Constants. More... | |
static const std::string | SELECT |
static const std::string | BETWEEN |
static const std::string | AND |
static const std::string | OPEN_PAREN |
static const std::string | CLOSE_PAREN |
static const std::string | SINGLE_QUOTE |
static const std::string | COMMA |
static const std::string | PERIOD |
static const std::string | EQUALS |
static const std::string | IN |
static const std::string | LIKE |
static const std::string | OR |
static const int | DEFAULT_VALUE |
Searches a local sqlite database for molecular lines meeting the specified search criteria.
Definition at line 41 of file SearcherSQLite.h.
|
private |
Enumerator | |
---|---|
FILTER_TOP_20 | |
FILTER_PLANETARY_ATMOSPHERE | |
FILTER_HOT_CORES | |
FILTER_DARK_CLOUDS | |
FILTER_DIFFUSE_CLOUDS | |
FILTER_COMETS | |
FILTER_AGB_PPN_PN | |
FILTER_EXTRAGALACTIC | |
END_FILTERS |
Definition at line 145 of file SearcherSQLite.h.
|
private |
Enumerator | |
---|---|
SPECIES_ID_COL | |
SPECIES_NAME_COL | |
CHEMICAL_NAME_COL | |
FREQUENCY_COL | |
TEMPERATURE_COL | |
RESOLVED_QNS_COL | |
INTENSITY_COL | |
SMU2_COL | |
LOGA_COL | |
EL_COL | |
EU_COL | |
END_COL |
Definition at line 167 of file SearcherSQLite.h.
casa::SearcherSQLite::SearcherSQLite | ( | const string & | databasePath | ) |
|
virtual |
|
virtual |
Performing the Search.
The offset is used when there is a limit on the number of rows that will be returned from the database. In the case that the number of rows that meet the search criteria exceeds the search limit, the offset indicates the starting index of the rows that are returned.
Implements casa::Searcher.
|
virtual |
Implements casa::Searcher.
|
private |
|
private |
|
virtual |
Returns the date the database file was installed.
Implements casa::Searcher.
|
private |
|
private |
|
private |
|
virtual |
Returns whether or not a connection has been established to the database provider.
Implements casa::Searcher.
|
private |
|
private |
|
virtual |
Set all the search parameters back to their defaults.
Implements casa::Searcher.
|
virtual |
Search Paramaters.
Implements casa::Searcher.
|
virtual |
Implements casa::Searcher.
|
virtual |
Implements casa::Searcher.
|
virtual |
Implements casa::Searcher.
|
virtual |
Implements casa::Searcher.
|
virtual |
Implements casa::Searcher.
|
virtual |
Implements casa::Searcher.
|
virtual |
Implements casa::Searcher.
|
virtual |
Implements casa::Searcher.
|
virtual |
Implements casa::Searcher.
|
virtual |
Astronomical Filters.
Implements casa::Searcher.
|
virtual |
Units are assumed to be MHz.
Implements casa::Searcher.
|
virtual |
Implements casa::Searcher.
|
virtual |
Implements casa::Searcher.
|
virtual |
Implements casa::Searcher.
|
virtual |
Sets the maximum number of rows that will be returned as a result of a database search.
Setting this value to a negative or zero value means that there will be no limit on the number of search results from the database.
Implements casa::Searcher.
|
virtual |
Implements casa::Searcher.
|
virtual |
Implements casa::Searcher.
|
virtual |
Provide a way to interrupt long searches.
Implements casa::Searcher.
|
virtual |
Returns a string containing (columnName, columnType) information for all the columns in the table.
Implements casa::Searcher.
|
staticprivate |
Definition at line 188 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 187 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 166 of file SearcherSQLite.h.
|
private |
Definition at line 141 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 190 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 192 of file SearcherSQLite.h.
|
private |
Set-up.
Definition at line 124 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 199 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 161 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 194 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 162 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 180 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 178 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 177 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 176 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 179 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 175 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 173 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 174 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 181 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 149 of file SearcherSQLite.h.
|
private |
Definition at line 148 of file SearcherSQLite.h.
|
staticprivate |
casacore::Table columns
Definition at line 156 of file SearcherSQLite.h.
|
staticprivate |
SQL Constants.
Definition at line 185 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 195 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 164 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 196 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 163 of file SearcherSQLite.h.
|
private |
Definition at line 136 of file SearcherSQLite.h.
|
private |
Definition at line 138 of file SearcherSQLite.h.
|
private |
Definition at line 128 of file SearcherSQLite.h.
|
private |
Definition at line 130 of file SearcherSQLite.h.
|
private |
Definition at line 134 of file SearcherSQLite.h.
|
private |
Definition at line 132 of file SearcherSQLite.h.
|
private |
Definition at line 135 of file SearcherSQLite.h.
|
private |
Definition at line 137 of file SearcherSQLite.h.
|
private |
Search parameters.
Definition at line 127 of file SearcherSQLite.h.
|
private |
Definition at line 129 of file SearcherSQLite.h.
|
private |
Definition at line 133 of file SearcherSQLite.h.
|
private |
Definition at line 131 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 189 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 197 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 193 of file SearcherSQLite.h.
|
private |
Definition at line 142 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 165 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 170 of file SearcherSQLite.h.
|
private |
Limiting the number of rows returned by a search.
Definition at line 202 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 186 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 191 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 160 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 159 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 158 of file SearcherSQLite.h.
|
private |
bool recommendedOnly;
Definition at line 140 of file SearcherSQLite.h.
|
staticprivate |
casacore::Table Names
Definition at line 152 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 153 of file SearcherSQLite.h.
|
staticprivate |
Definition at line 157 of file SearcherSQLite.h.