Reference/es_mba_addresult
Syntax
int es_mba_addresult( struct es_mba *agg, const char *fieldname, int aggtype );
Arguments
struct es_mba *agg |
Database aggregator. |
const char *fieldname |
Database or formula field name. |
int aggtype |
Aggregation type. See below for list of enumerated values. |
Return Codes
ES_ERROR_NONE |
Success. No errors. |
ES_ERROR_INVALIDFIELDTYPE |
fieldname is not an integer or double-precision type. |
|
ES_ERROR_FIELDEXISTS |
fieldname has already been specified as a key or result. |
|
ES_ERROR_UNKNOWNFIELD |
fieldname is not a valid database or forumula field name. |
ES_ERROR_INVALIDAGGTYPE |
aggtype is not one of the valid aggregation types listed below. |
Description
Specify a database or formula field to be an aggregated result. A result field can be an integer or a double-precision number.
Formula fields defined to be results must first be defined via es_mba_addformula().
The aggtype parameter controls how the result field gets aggregated. Valid values include:
ES_AGGREGATE_SUM |
Aggregate result value by summing. |
ES_AGGREGATE_MAX |
Aggregate result by choosing the maximum value. |
ES_AGGREGATE_MIN |
Aggregate result by choosing the minimum value. |
ES_AGGREGATE_MIN |
Aggregate result by counting the number of result values. |
[Back To Reference]
[Back To Reference/es_mba]
|