(Last) Railo beta release (4.2.0.007)

92 views
Skip to first unread message

Michael Offner

unread,
Apr 9, 2014, 5:16:18 AM4/9/14
to ra...@googlegroups.com
On the "Development" update provider, you can find the latest Railo Beta release (4.2.0.007).
That release not only bring a lot of bug fixes, it also has some new features.

Iterator (Callback/Closure) Functions
In the last release we already added a couple of new iterator functions to Railo (arrayEach,arrayEvery,arrayMap,...), in this release we even extended that list with iterator functions for the "query" and  "string lists".
So we have new the following functions:
- QueryEach
- QueryEvery
- QueryFilter
- QueryMap
- QueryReduce
- QuerySome
- ListEach
- ListEvery
- ListFilter
- ListMap
- ListReduce
- ListSome

We had a vivid discussion about how the argument scope of the udf/closure called with the query functions should look like, again thx to everybody for that!
We decided not do add a new "QueryColumn" type to Railo and simply pass the current row as a struct to the closure/udf and the hole query with the 3th argument
(We will do a detailed blog post about this in the near future).
Of Course all the new query functions can also be used "member functions" (Example: myQuery.each(function(struct row,numeric rowNumber,query query){dump(row)});).

The "List" Functions work the same way as the array functions, with the different that you call them with a string list and not a array ;-)
ATM the list functions are not supported as "member functions" (more below).

In the last release we also added iterator functions that are not specific to a type, functions that can handle all kind of "collections", the same way <cfloop collection="..."> can.
problem was that the short names of this functions getting in conflict with existing  UDFs defined by existimg CFML applications, for example the function "map" that is also used as UDF in "wirebox".
So we decided to rename this functions to "collection...", so for example "Map" is now renamed to "collectionMap".

Of course all this new iterator functions (except ...reduce) are supporting parallel execution like the existing ones!

Member Functions
Railo is supporting member functions for some time now, for the types [array,date,struct,query]. In the current beta release ACF has adopted this feature and they added additional support for the type string,"list" and image as well.
In this release we added support for "string" as well (and the next release will support "image"), what we not have is support for "list" functions, because it was not sure at the time of the release how they will look like in ACF (current implementation is not ... very good and they plan to change it for the next beta release).
Until the final release all of this is not curved in stone, so please feel free to eat it alive!

we also added new member function for strings (startsWith,endsWith,isEmpty)

GetBuiltInFunction (experimental)
This new function is returning you any built in function as a object that can be used the same way as a closure/udf.
Example:
function test(function finder,string str,string sub){
   return finder(sub,str);
}
if(custom) func=function (string sub, strig str){...};
else if(caseSensitive) func=getBuiltinFunction("find");
else func =getBuiltinFunction("findNoCase");
res=test(func,str,sub);

Function Reference Documentation in Admin
in the function reference in the Railo Administrator you can now filter functions by keywords, so for example you choose "iterator" to list only the iterator functions.

Unary operators
Thx to Adam Cameron we have uncovered a bug with all unary operators that is fixed with this release.

This is the last beta release for 4.2, so please report any problem you have with it
Have fun
Micha 


List of Jira Tickets solved
Enhancement
[RAILO-2250] - add member function isEmpty() to String

Feature Request
[RAILO-2986] - add function QueryEach
[RAILO-2987] - add function QueryEvery
[RAILO-2992] - add function QueryMap
[RAILO-2994] - extend function ListFilter
[RAILO-2995] - add function ListMap
[RAILO-2996] - add function ListReduce
[RAILO-2997] - add function ListSome
[RAILO-2998] - add string member functions
[RAILO-3001] - add member methods startsWith() and endsWith() to string objects

Bugs
[RAILO-2961] - returning a complex object containing an array of complex objects with base components, does not return base components properties
[RAILO-2963] - Providing array of Structs for SOAP function argument as an array of Complex objects
[RAILO-2965] - properties of complex soap arguments are not dynamically typed
[RAILO-2976] - webservice Complex Objects as arguments don't get accessible data.
[RAILO-2978] - Soap webservices Complex type composed of an array of complex types, throws exception
[RAILO-3003] - webservice with component argument breaks
[RAILO-3005] - railo-inst.jar is deleted during upgrade process
[RAILO-3022] - unary operator creating a new variable in a other scope in some situation

Meikel

unread,
Apr 10, 2014, 12:25:30 PM4/10/14
to ra...@googlegroups.com
please have a look at the german version.
my admin has no "umlaute" ;-)

thank you

Michael

Michael Offner

unread,
Apr 11, 2014, 2:13:34 AM4/11/14
to ra...@googlegroups.com
We will
Danke für den Hinweis

Micha
--
Did you find this reply useful?  Help the Railo community and add it to the Railo Server wiki at https://github.com/getrailo/railo/wiki
---
You received this message because you are subscribed to the Google Groups "Railo" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/railo/bfc5f29d-81b1-49f3-affb-a9300194d34c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
/micha

Michael Offner CTO Railo Technologies GmbH
Reply all
Reply to author
Forward
0 new messages