query.getColumnList() returns string list, not Array - ACF incompat

Description

The query.getColumnList() method in ACF returns an array:

<cfscript> myQuery = queryNew( 'ID,name,age' ); writeDump( myQuery.getColumnList() ); </cfscript>

But in Lucee this returns a stringified list.

It’s worth noting that it is absolutely bonkers for ACF to put “list” in the name and yet provide an array… but still. It is worth noting the incompat and discussing a potential fix.

Perhaps we should add a getColumnArray() member method instead?

Attachments

1

relates to

Activity

Michael Born @ Ortus 
20 September 2022 at 15:57

Apologies , I misunderstood your first comment. All good, as long as we decide on a consistent return type.

See also https://luceeserver.atlassian.net/browse/LDEV-4190.

Pothys - MitrahSoft 
14 September 2022 at 06:05

The queryColumnList() member function is query.ColumnList and not a query.getColumnList() https://github.com/lucee/Lucee/blob/6.0/core/src/main/java/resource/fld/core-base.fld#L10421

Also, getColumnlist is not a BIF, it comes from QueryImpl java class https://github.com/lucee/Lucee/blob/fc3f3d152ebdc9695d9f76b52528d34fc4118c06/core/src/main/javaryItympe

Michael Born @ Ortus 
13 September 2022 at 16:09

query.getColumnList() is not BIF in both lucee and ACF. It comes from the Java class

In ACF, yes. Not in Lucee, though?

Pothys - MitrahSoft 
9 September 2022 at 10:29

I've checked this ticket with the lucee latest version 5.3.10.67-SNAPSHOT. In lucee, when using a query.getColumnList(boolean) returns the results in a list. Seems ACF using a query.getColumnList() returns the results in an array.

query.getColumnList() is not BIF in both lucee and ACF. It comes from the Java class

Already lucee has a function called QueryColumnArray(). It returns the query column names in an array.

Details

Assignee

Reporter

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Priority

Created 8 September 2022 at 16:37
Updated 18 June 2023 at 16:41