QueryReduce

This function reduces the query to a single value.

Method Signature

QueryReduce(query=[query], callback=[function:BiFunction], initialValue=[any])

Arguments

ArgumentTypeRequiredDescriptionDefault

query

query

true

The query to iterate over

callback

function:BiFunction

true

The function to invoke for each item. The function will be passed 4 arguments: the accumulator, the current item, the current index, and the query. You can alternatively pass a Java Predicate which will only receive the first 2 args.

initialValue

any

true

The initial value to use for the reduction

Examples

Last updated

Logo

Copyright & Register Trademark by Ortus Solutions, Corp & Ortus Software, LLC