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

queryEvery Argument Reference

query query

closure function

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

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

Expected Result: true

Fork me on GitHub