query.reduce()

Iterates over every row of the given query and calls the closure with that row.

This function will reduce the query to a single value and will return this value.

query.reduce( query, closure [, initialValue ] )

Returns: any

Argument Description
query
query, required

query to iterate

Alias: object

closure
function, required

function/closure that implements the following constructor

[function(any result, struct row[, number rowNumber, query query]):any].

Alias: function, callback, udf

initialValue
object, optional

inital value passed as part of the first closure call

Alias: initial, initalValue

Examples

There are currently no examples for this function

See also