> Only an attribute name, not every expression
> - filter: you mention this as CQL but I expect an actual filter can be
> passed in
>
> Nope, I really meant a CQL formatted string, a Filter cannot be passed because
> it's not an Expression, and all filter function params are to be Expression
> objects instead.
> (at least this is my understanding).
>
Okay, I notice for that many of the relationship functions Dave Blasby has made
matching functions.
As an idea could we make a function called filter( String, Expression, … ) in
order to keep this above board and not make use of magic strings.
> What we do when we hit the next system that requires more extra params?
> A single open ended optional param gives us extensibility without having to
> count
> the nulls: say we add a new param for a third system, the first two would
> have to
> be null and the third valid, then a fourth one comes in and we have to leave
> three
> nulls before adding the fourth param and so on, it's messy.
>
The downside to an optional parameter is that we cannot describe the contents
very well
programatically. Still if that will help, is there any chance we can make it a
String so at least a user interface can prompt the user for something.
> This trouble is caused by function params being positional instead of being
> named.
>
Agreed, naming the parameters would be an easy way out:
So we end up with…
nearest( the_geom, point, filter( "greaterThan", category, 3 ) )
nearest( the_geom, point, filter( "greaterThan", category, 3 ), "10" )
nearest( the_geom, point, filter( "greaterThan", category, 3 ), "<->" )
nearest( the_geom, point, filter( "greaterThan", category, 3 ), "<#>" )
> It seems to me a filter function is cleaner than both of the above
> approaches, requires less effort to
> be implemented, and provides the same amount of functionality.
>
Yep - I like it. Just throwing other ideas at the wall to see if anything comes
of it.
Jody
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel