maoriColours = valueList(colours().maori); // <=== this is the bit to look at here!!
valueList("myQuery.myColumn") what is already better, but still ugly.
I agree. GetQuery().col is a reference to a value, not a definition of a column. But you are right in one way, how do you reference a column?
I think it's safe to say that historically valueList() and query columns in general were poorly implemented (in CF I mean...)
valueList("myQuery.myColumn") what is already better, but still ugly.
A function along the lines of what Micha is saying is ideal, if possible: columnValueList(query query,string column) . Advantages include not only being able to reference queries more flexibly, but also use vars for the column name if needed.
But on the other hand, what is the difference between functionThatReturnsAQuery().column and qry.column? IMHO valuelist should work with both.
But on the other hand, what is the difference between functionThatReturnsAQuery().column and qry.column? IMHO valuelist should work with both.
Agreed. But what about struct.that.holds.query.column? I, for one, use that frequently, despite always running into a bit of trouble in ACF with query of queries and valuelist() both.
but i think it should return a array, not the querycolumn object, simply because if user do this
dump(queryGetColumn(...)); they only see the current row value.
Wouldn’t it be more consistent to call it queryGetColumn(), and query.getColumn() ?
Greetings from Switzerland
Gert Franz
Railo Technologies Professional Open Source
skype: gert.franz ge...@getrailo.com
+41 76 5680 231 www.getrailo.com
Wouldn’t it be more consistent to call it queryGetColumn(), and query.getColumn() ?
after thinking a little bit more abouit the name, i thnk queryColumn is not a good choice, because we have the function queryColumnList and queryColumnArray.
of course this functions should be named queryColumnNamesAsList/queryColumnNamesAsArray, but we cannot change this.
i think we should name the function queryColumnData, so it is clear what this function return.
/micha
FYIfollowing ticket is now resolved
mean valueList,valueArray and quotedValueList working now with any expression and we could also improve performance!