queryReverse

Returns a reversed version of the query

queryReverse(query) → returns query

Member Function Syntax

query.reverse()

Argument Reference

query query
Required

Compatibility

ColdFusion:

Version 2018.0.5+ New function in CF2018 Update 5

Lucee:

Version 6+ Added in Lucee 6.0.0.18

Examples
Sample code invoking the queryReverse function

heroes = queryNew(
            "id,Name",
            "integer,varchar",
            [
                {"id":1,"Name":"Bruce Banner"},
                {"id":2,"Name":"Tony Stark"},
                {"id":3,"Name":"Bobby Drake"},
                {"id":4,"Name":"Jean Grey"}
            ]
        )
writeOutput("The query:<br />");
writeDump(heroes);
writeOutput("The reversed query:<br />");
writeDump(heroes.reverse());

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

Fork me on GitHub