[ColdBox 3.7.0] QueryHelper getCSV functional change request

Can I make a suggestion/request a change for the QueryHelper getCSV function? Currently the function is using qry.columnList to get the list of columns in the query. The problem with this is that is returns an alpha sorted list of the columns. Not very helpful when trying to use this function to dump a query out with a specified column order. One of the comments on Ben Nadel’s blog post about this (http://www.bennadel.com/blog/644-QUERY-ColumnList-Does-Not-Return-True-Column-Ordering.htm) mentions using “ArrayToList(qTableSelected.getColumnList())” to get the column list in the original query’s order.

So, all that to ask, can the QueryHelpers function be updated to use the getColumnList() function to get the column order instead? Or even add on an argument to allow the caller to determine which behavior they want?

Thanks

-Ed Andrade

The big question would probably be whether that worked in Railo since it’s an undocumented feature.

Feel free to sign up for a JIRA account and add an enhancement ticket:
https://ortussolutions.atlassian.net/browse/COLDBOX

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

That is a good question… I am on ACF10 and I do not have Railo setup anywhere so I can not easily test it out right now…

-Ed

I just tried it on the latest build of railo and it does appear to work. The only bad thing is it upper cases the column names so if you were using them for output or some case-sensitive operation that wouldn’t work any longer. Does ACF also uppercase the column names with getColumnList()?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Yes, ACT does uppercase the column names returned by getColumnList(), but I am guessing columnList does too as there is an lcase wrapping it in the QueryHelper code. wlEmoticon-smile[1].png

-Ed