Status/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 07/18/2015
Components: Language
Versions: 11.0
Failure Type: Enhancement Request
Found In Build/Fixed In Build: CF11_Final / CF2018U5
Priority/Frequency: Trivial / Unknown
Locale/System: English / Platforms All
Vote Count: 25
Full detail: http://blog.adamcameron.me/2015/07/cfml-suggestion-make-queries-implement.html
TL;DR:
Implement these:
Query.append(): adds a row to the end of a query, or concatenates two queries together.
Query.clear(): does the query equivalent of TRUNCATE TABLE in SQL.
Query.deleteAt(): removes row(s?) from the query.
Query.insertAt(): sticks 'em back in again. These two operations are possible with QoQ, but not pretty.
Query.each(): essential. I can't believe ColdFusion does not have this yet (Lucee does).
Query.slice(): copies rows from within a query.
Query.len(): I'd put this in anyhow, even if one can use recordCount: it's such a ubiquitous function for collections.
Query.filter(): removes rows from the query based on the filter rules.
Query.map(): should already have been implemented.
Query.new(): already got it. Well, not as a method. It would be good to have an OO way of creating a query though, without falling back to queryNew().
Query.prepend(): adds rows (/another query) to the front of a query.
Query.reduce(): should already have been implemented.
Query.set(): possibly use .filter() and .insertAt() instead?
Query.sort(): sorts the query.
Query.find(): possibly. Although would be better placed to use .filter() or .reduce(), perhaps?
Query.reverse(): reverses order of row. Although achievable via .reduceRight()
Query.swap(): swaps specified rows.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4022420
External Customer Info:
External Company:
External Customer Name: Adam
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: