Download the public beta of ColdFusion Splendor from here
I started a series of blog posts on language enhancements and covered “Script support for tags“ last week. Continuing on this, today I am going to blog about “Member function” that I hope should interest most of you. Before I get into the details of member functions, here is the list of language features:
- Script support for tags
- Member functions for CF data type/data structure
- Improved JSON serialization
- Easy to use CF functions for Query tag
- Elvis operator (?:)
- Promoting built-in CF function to first class
- Miscellaneous new functions: QueryGetRow, ListEach and others.
Headless function
<cfscript> ArrayAppend(empArray, newObject); StructIsEmpty(empStruct); </cfscript>
As member function of array/Struct
<cfscript> empArray.append(newObject); empStruct.isEmpty(); </cfscript>
The Member function support in Splendor is quite exhaustive and covers most of the data types present in ColdFusion. The complete list of data types supported are:
@Gert,
I think the Member Functions docs page is now confusing. You’re right, queryGetResult() doesn’t exist – even tho it’s mentioned on that page. However, I filed the ER for q.getResult() which didn’t exist in CF10. (I don’t take credit for q.getResult() tho b/c I believe it was requested before by others)
Thanks,
-Aaron
@Aaron: I suppose qry.getResult() is not a member function, since there is no such function as queryGetResult(). It is rather an undocumented Java method of the query method.
I guess now more of these undocumented methods will pop up in the CFML engines, since with member functions available people will go hunting for oop like notation on complex objects.
Gert
Thank you for adding myQuery.getResult() which returns the same as cfquery’s result attribute.
I’ve added it to the doc here: https://wikidocs.adobe.com/wiki/display/coldfusionen/ColdFusion+Language+Enhancements
Thanks!,
-Aaron
You must be logged in to post a comment.