Last active
November 5, 2015 17:46
-
-
Save elpete/521cdd4ee0b9bc506ed3 to your computer and use it in GitHub Desktop.
ACF vs Lucee ColumnList Implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
data = QueryNew('name,id,salary', 'cf_sql_varchar,cf_sql_integer,cf_sql_integer', [ | |
{ name = 'Jack Harkness', id = 1, salary = 5800000 }, | |
{ name = 'Donna Noble', id = 2, salary = 4800000 }, | |
{ name = 'Clara Oswald', id = 3, salary = 6200000 }, | |
{ name = 'Rory Williams', id = 4, salary = 2650000 }, | |
{ name = 'Sarah Jane Smith', id = 5, salary = 2200000 } | |
]); | |
writeDump(data.columnList); | |
writeDump(getMetadata(data)); | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
data = QueryNew('name,id,salary', 'cf_sql_varchar,cf_sql_integer,cf_sql_integer', [ | |
{ name = 'Jack Harkness', id = 1, salary = 5800000 }, | |
{ name = 'Donna Noble', id = 2, salary = 4800000 }, | |
{ name = 'Clara Oswald', id = 3, salary = 6200000 }, | |
{ name = 'Rory Williams', id = 4, salary = 2650000 }, | |
{ name = 'Sarah Jane Smith', id = 5, salary = 2200000 } | |
]); | |
columnArray = []; | |
for(column in getMetadata(data)) { | |
ArrayAppend(columnArray, column.name); | |
} | |
writeDump(ArrayToList(columnArray)); | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment