- query = Query.trend(view,select,where,interval,group)
- query = Query.topN(view,select,where,interval,sort,truncate)
- query.view = string
- query.select = string
- query.where = string
- query.interval = string
- query.group = string
- query.sort = string
- query.sortorder = string
- query.truncate = integer
- query.nullsinkeys = boolean
- table = query.run()
The constructor methods trend() and topN() are intended to provide convenient ways to create a query object and set some of its properties. However it is also valid to use query = new Query() and then set each property in turn.
The view property must be one of the defined database views.
The select property is a comma-separated list of fields defined in the view.
The optional where property is a filter.
The interval property is a time interval.
The optional group property is a time grouping.
The optional sort property is be a value field defined in the view.
The optional sortorder property is "ascending" or "descending".
The optional truncate property controls the number of output rows.
The optional nullsinkeys property can be set to "true" to allow empty keys to be included.