IAverage Class
/private/var/user/Documents/App/Hybrid/JavaScript/Siminov/Database/Design/IAverage.js:57
Parent Module: Database
Exposes API's to get average value of all non-NULL X within a group. String and BLOB values that do not look like numbers are interpreted as 0. The result of avg() is always a floating point value as long as at there is at least one non-NULL input even if all inputs are integers. The result of avg() is NULL if and only if there are no non-NULL inputs.
Item Index
Methods
and
-
column
Used to specify AND condition between where clause.
Parameters:
-
column
StringName of column on which condition need to be specified.
Returns:
IAerageClause Interface.
column
-
column
Used to provide name of column for which average will be calculated.
Parameters:
-
column
StringName of column.
Returns:
IAverage Interface.
execute
()
Object
Used to get average, this method should be called in last to calculate average.
Returns:
Return average.
executeAsync
-
callback
Used to get average asynchronous, this method should be called in last to calculate average.
Parameters:
-
callback
CallbackRequest Callback
groupBy
-
columns
Used to specify GROUP BY statement in conjunction with the aggregate functions to group the result-set by one or more columns.
Parameters:
-
columns
ArrayName of columns.
Returns:
IAverage Interface.
having
-
column
Used to specify HAVING clause to SQL because the WHERE keyword could not be used with aggregate functions.
Parameters:
-
column
StringName of column on which condition need to be applied.
Returns:
IAverageClause Interface.
havingClause
-
havingClause
Used to provide manually created Where clause, instead of using API's.
Parameters:
-
havingClause
StringWhere clause.
Returns:
IAverage Interface.
or
-
column
Used to specify OR condition between where clause.
Parameters:
-
column
StringName of column on which condition need to be specified.
Returns:
IAverageClause Interface.
where
-
column
Column name of which condition will be specified.
Parameters:
-
column
StringName of column.
Returns:
IAerageClause Interface.