getmethod is the most common method used for retrieving results. It executes using the configured
QueryBuilderand returns the results.
getcan also take a list or array of columns to use as a shortcut. If any are passed, those columns will be used instead of any columns previously set on the
firstmethod. This method will return a single record (a
Structby default). If no row is found an empty
Structwill be returned by default.
valuesmethod will return the column of your choosing as a simple array.
valuesmethod will return the expression given for each row as a simple array.
valuesexcept it only returns a single, simple value. Where
getunder the hood, this method calls
throwWhenNotFoundboolean is set to
RecordCountExceptionwill be thrown. Otherwise the
defaultValueprovided to the method will be returned.
valuemethod will return the expression given for the first row found.
chunkcan be called on any query like you would call
get. You can stop the retrieving and processing early by returning
falsefrom the callback.
countof the number of records the query would return. This can be desirable for performance reasons if your query count is rather large. It instead determines if there are more records by asking for one more row that your specified
maxRows. If the number of rows returned exceeds your specified
maxRowsthen the pagination returns
hasMore: true. The
resultswill always contain your specified
maxRows(or less, if there aren't enough records).
paginatemethod. It can be a struct or a component. It needs one function defined and will be passed the following parameters.
paginationCollectorargument or by calling
setPaginationCollectoron a query builder instance.
simplePaginatemethod was added. This uses a new method on the