I'm looking at using schema to document the Query and its responses. This is mostly OK, but I've run into a blocker with the Aggregate.
The spec has the following structure:
Aggregate (OPTIONAL)
- Columns (list)
- ColName: column name, see below
- Aggregator: aggregator function, one of AVG,
SUM, COUNT, MIN, MAX, STDDEV
- GroupBy (list) (OPTIONAL)
--ColName: column name
That suggests an object containing two lists:
{
"Aggregate":
}
which could expand to something like this: (A)
{
"Aggregate": {
"Columns": [
,
{ "ColName": "b", "Aggregator": "AVG" }],
"GroupBy": ["a", "b"]
}
}
of if GroupBy has to have a ColName then it would be this: (B)
{
"Aggregate": {
"Columns": [
,
{ "ColName": "b", "Aggregator": "AVG" }],
"GroupBy": [
,
{ "ColName": "b" }]
}
}
We have no examples of GroupBy and the only example of Aggregate (C, below) does not have an array, just a single item:
{
"Aggregate": {
"Columns":
}
}