added handling of user_ts aggregate min/max using arrays
@@ -1798,11 +1798,24 @@ bool Connection::jsonAggregates(const Value& payload, const Value& aggregates, S
sql.append((*itr)["operation"].GetString());
sql.append('(');
if (itr->HasMember("column"))
+ {
+
+ string column_name= (*itr)["column"].GetString();
+ // FIXME:
+ if (column_name == "user_ts")
+ {
+ // FIXME:
+ Logger::getLogger()->debug("DBG PG jsonAggregates - user_ts :%s: ", column_name.c_str());
+
+ sql.append("to_char(user_ts, '" F_DATEH24_US "')");
+ }
+ else
{
sql.append("\"");
- sql.append((*itr)["column"].GetString());
+ sql.append(column_name);
sql.append("\"");
}
+ }
else if (itr->HasMember("json"))
{
const Value& json = (*itr)["json"];
