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])

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

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub