Undocumented Query Methods in ColdFusion MX
void query.first() - jump to the beginning of a query void query.last() - jump to the last value in a query boolean query.isFirst() - true if we are looking at the first row boolean query.isLast() - true if we are looking at the last row boolean query.next() - jump to the next row boolean query.previous() - jump to the previous row int findColumn(String name) - get the id of a column by name void sort(int columnId, boolean ascending) - sort by a column int getColumnCount() - returns the number of columns String getColumnTypeName(int columnId) - gets the data type of a column, this one didn't work properly when I tested it, it would return NUMERIC for a field that was a varchar. There is a method called guessColumnType that was probably used to determine it, it guessed wrong.
I had put together a web site called ColdFusion MX Un-Documentation that has some examples of how to use these features. Update: no longer avaliable
Like this? Follow me ↯Tweet Follow @pfreitag
Undocumented Query Methods in ColdFusion MX was first published on August 20, 2002.
The FuseGuard Web Application Firewall for ColdFusion & CFML is a high performance, customizable engine that blocks various attacks against your ColdFusion applications.