query
This type represents a representation of a database query result set.
It provides language specific methods to access columnar data, both as value lists and within iterative loops
Query Methods
addColumn(columnName=[string], datatype=[any], array=[array])
Adds a column to a query and populates its rows with the contents of a one-dimensional array.
Arguments:
each(callback=[function:Consumer], parallel=[boolean], maxThreads=[integer])
Iterates over query rows and passes each row per iteration to a callback function
Arguments:
every(closure=[function:Predicate], parallel=[boolean], maxThreads=[integer])
Executes a callback/closure against every row in a query and returns true if the callback/closure returned true for every row.
Arguments:
filter(callback=[function:Predicate], parallel=[boolean], maxThreads=[integer])
Filters query rows specified in filter criteria
Arguments:
getCell(column_name=[string], row_number=[integer])
This function maps the query to a new query.
Arguments:
insertAt(value=[query], position=[numeric])
Inserts a query data into another query at a specific position
Arguments:
isEmpty()
Determine whether a given value is empty.
We check for emptiness of anything that can be casted to: Array, Struct, Query, or String.
map(callback=[function:Function], parallel=[boolean], maxThreads=[integer])
This function maps the query to a new query.
Arguments:
reduce(callback=[function:BiFunction], initialValue=[any])
This function reduces the query to a single value.
Arguments:
rowSwap(source=[numeric], destination=[numeric])
In a query object, swap the record in the sourceRow with the record from the destinationRow.
Arguments:
setRow(rowNumber=[integer], rowData=[any])
Adds or updates a row in a query based on the provided row data and position.
Arguments:
some(callback=[function:Predicate], parallel=[boolean], maxThreads=[integer], initialValue=[any])
This function calls a given closure/function with every element in a given query and returns true, if one of the closure calls returns true
Arguments:
toJSON(queryFormat=[string], useSecureJSONPrefix=[string], useCustomSerializer=[boolean])
Converts a BoxLang variable into a JSON (JavaScript Object Notation) string.
Arguments:
Examples
Last updated