Michael Bedward ha scritto:
> On 21 May 2010 00:54, LSA wrote:
>> There is not ability to enter expressions without attributes. For example,
>> evaluate the following expression 1=1 - you will get exception, that first 1
>> is unexpected. However, it is quite possible situation, for example, how can
>> you evaluate the following: ID()=1?
> 
> You can't as far as I know. CQL's domain is working with feature data.
> It can't identify all mathematical operators or the syntax for user
> methods, data structures and so on. In other words, it's not a general
> expression parser.

CQL imposes the following filter structure "field name = expression" so
you cannot do something like "1=1" which would be a "expression = 
expression" structure.

However we have ECQL, Extended CQL, an extension to make CQL more
general, though not standard compliant anymore, that can take the above.
Just use ECQL.toFilter(...) and you should be fine

Cheers
Andrea


-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------

_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to