Created
February 7, 2017 20:00
-
-
Save displague/a01d34dbdda3561f0bec70b4da95b33a to your computer and use it in GitHub Desktop.
QuerySome implementation for Adobe CF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// return true if closure passes for any query row (supplied as a struct) | |
// based on http://cfdocs.org/querysome available in Lucee | |
boolean function QuerySome(required query q, required function f) { | |
for (var r in q) if (f(r)) return true; | |
return false; | |
} | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment