11 #include <atm/AOverallQualitySQLManager.h>
12 #include <fwk/CentralConfig.h>
13 #include <det/Detector.h>
14 #include <utl/ErrorLogger.h>
15 #include <utl/TimeStamp.h>
16 #include <utl/Reader.h>
17 #include <utl/StringCompare.h>
28 AOverallQualitySQLManager::GetDBResFundamental(
const std::string& tableName,
29 const std::string& columnName,
38 if (tableName ==
"overall_quality") {
43 query <<
"SELECT " << columnName <<
" "
44 "FROM overall_quality "
45 "WHERE start_time <= \"" << detTime.
GetGPSSecond() <<
"\" "
47 "OR end_time IS NULL) ORDER BY last_modified DESC, start_time DESC LIMIT 1";
51 query <<
"SELECT " << columnName <<
" "
52 "FROM overall_quality,software "
53 "WHERE start_time <= \"" << detTime.
GetGPSSecond() <<
"\" "
55 "OR end_time IS NULL) AND "
56 "overall_quality.software_id = software.software_id "
57 "AND software.software_version = \"" << fDatabaseSoftwareVersion <<
"\" "
58 "ORDER BY overall_quality.last_modified DESC, start_time DESC LIMIT 1";
60 return Query(query, QueryInfoMessage(tableName, columnName));
bool StringEquivalent(const std::string &a, const std::string &b, Predicate p)
Utility to compare strings for equivalence. It takes a predicate to determine the equivalence of indi...
A TimeStamp holds GPS second and nanosecond for some event.
#define REGISTER_A_MANAGER(_name_, _Type_)
unsigned long GetGPSSecond() const
GPS second.
std::map< std::string, std::string > IndexMap
Manager for aerosol portion of atmospheric monitoring database.
Status
Specifies success or (eventually) various possible failure modes.