Commit 926c2cb8 authored by Alessio Netti's avatar Alessio Netti
Browse files

Bugfixes

- Fixed a bug associated to virtual sensor queries under the new schema
- Symbol for scaling in dcdbquery is now '@'
parent 82e687b6
......@@ -145,7 +145,7 @@ void PhysicalSensorCache::populate(Connection* connection, SensorConfig& sc, uin
CassStatement* statement = NULL;
CassFuture *future = NULL;
const CassPrepared* prepared = nullptr;
const char* queryBefore = "SELECT * FROM " KEYSPACE_NAME "." CF_SENSORDATA " WHERE sid = ? AND ws = ? AND ts <= ? ORDER BY ts DESC LIMIT " PSC_READ_BEHIND;
const char* queryBefore = "SELECT * FROM " KEYSPACE_NAME "." CF_SENSORDATA " WHERE sid = ? AND ws = ? AND ts <= ? ORDER BY ws DESC, ts DESC LIMIT " PSC_READ_BEHIND;
const char* queryAfter = "SELECT * FROM " KEYSPACE_NAME "." CF_SENSORDATA " WHERE sid = ? AND ws = ? AND ts > ? LIMIT " PSC_READ_AHEAD;
/* Query before... */
......
......@@ -235,7 +235,7 @@ void DCDBQuery::doQuery(const char* hostname, std::list<std::string> sensors, DC
functName = match[1].str();
str = match[2].str();
}
boost::regex sensorRegex("([^\\%]+)\\%?([^\\%]*)", boost::regex::extended);
boost::regex sensorRegex("([^\\@]+)\\@?([^\\@]*)", boost::regex::extended);
if(boost::regex_search(str, match, sensorRegex)) {
sensorName = match[1].str();
modifierStr = match[2].str();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment