This function reduces the query to a single value.
QueryReduce(query=[query], callback=[function:BiFunction], initialValue=[any])
Argument | Type | Required | Description | Default |
---|---|---|---|---|
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 |
- QueryAddColumn
- QueryAddRow
- QueryAppend
- QueryClear
- QueryColumnArray
- QueryColumnCount
- QueryColumnData
- QueryColumnExists
- QueryCurrentRow
- QueryDeleteColumn
- QueryDeleteRow
- QueryEach
- QueryEvery
- QueryFilter
- QueryGetCell
- QueryGetResult
- QueryInsertAt
- QueryKeyExists
- QueryMap
- QueryNew
- QueryPrepend
- QueryRecordCount
- QueryReverse
- QueryRowData
- QueryRowSwap
- QuerySetCell
- QuerySetRow
- QuerySlice
- QuerySome
- QuerySort