ARDBCGetEntryStatistics
Description
This function gathers statistical information about a set of data. The plug-in server calls this function when it receives a request from the BMC Remedy AR System server to get entry statistics.
Important
If you do not define this function and the plug-in server receives a get entry statistics request, the BMC Remedy AR System server receives an error message and does not retrieve the data.
Synopsis
#include "ardbc.h"
int ARDBCGetEntryStatistics(
void *object,
char *tableName,
ARVendorFieldList *vendorFieldList,
ARInternalId transId,
ARQualifierStruct *qualifier,
ARFieldValueOrArithStruct *target,
unsigned int statistic,
ARInternalIdList *groupByList,
ARStatisticsResultList *results,
ARStatusList *status)
Input arguments
object
Pointer to the plug-in instance that the call to ARPluginCreateInstance
returned.
tableName
Name of the external table from which to retrieve the statistics.
vendorFieldList
List of external form fields. The plug-in uses this list to map BMC Remedy AR System field identification numbers (field IDs) to corresponding external form field names.
Note
All other ARDBC input arguments and return values see BMC Remedy AR System field IDs, not external form IDs.
transId
Transaction identification number (transaction ID) that the plug-in server designates for each transaction. The transaction ID is unique to the thread that the BMC Remedy AR System server uses to access the ARDBC plug-in. There is only one open transaction per server thread.
qualifier
Query that determines the set of entries to retrieve. The qualification can include one or more fields and any combination of conditional, relational, and arithmetic operations (numeric data only).
target
Arithmetic operation that defines the statistic to compute. The statistic can include one or more fields and any combination of arithmetic operations. The system generates an error if the user does not have read permission for a field or if a field does not exist. If you specify AR_STAT_OP_COUNT
for the statistic
parameter, assign a tag value of 0
to omit this parameter.
statistic
Value that indicates the statistic type.
|
The total number of matching entries ( |
|
The sum of values for each group ( |
|
The average value for each group ( |
|
The minimum value for each group ( |
|
The maximum value for each group ( |
groupByList
List of zero or more fields to group the results by. The system computes a result for each group of entries having the same value in the specified field. Specifying more than one field creates groups within groups, each of which returns a separate statistic. Specify NULL
for this parameter (or zero fields) to compute a single result for all matching entries.
Return values
results
List of zero or more results. If you specify one or more fields for the groupByList
parameter, each item in the list represents a group. Each result structure contains the field values that define the group and the statistic for that group.
status
List of zero or more notes, warnings, or errors generated from a call to this function. For a description of all possible values, see Error checking.
Comments
Log in or register to comment.