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

closure function

parallel boolean

maxThreads numeric
Default: 20

Links more information about queryEvery

Sample code invoking the queryEvery function

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

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

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