queryEvery

Executes a callback/closure against every row in a query and returns true if the callback/closure returned true for every row.

queryEvery(query, closure [, parallel] [, maxThreads]) → returns boolean

Member Function Syntax

query.every(closure [, parallel] [, maxThreads])

This function requires Lucee. Not supported on Adobe ColdFusion.

queryEvery Argument Reference

query query
Required

closure function
Required

parallel boolean

maxThreads numeric
Default: 20

Links more information about queryEvery

Examples sample code invoking the queryEvery function

Find out if every value in the query is greater than 50

<cfscript>
data = query(foo: [51,52,535]);
allGT50 = queryEvery(function(row){ return row.foo > 50; });
</cfscript>

Expected Result: true


Fork me on GitHub