|
From: Mauricio P. <mau...@ax...> - 2010-09-21 07:56:54
|
On Monday 20 September 2010 02:29:02 pm Feras Odeh wrote: > Hello.. > > > > Is it possible to give a CQL query a list of values as we can make in > standard SQL using the IN clause? If yes what kind of objects it could > take? The "in predicate" was added in ECQL. (Have a look in the bnf http://docs.codehaus.org/display/GEOTOOLS/ECQL+Parser+Design#ECQLParserDesign- INPredicate) this is the rule for the falue list: <in value list> ::= <expression> {"," <expression>} Thus, you could write sentences like: Filter filter = ECQL.toFilter("length IN (4100001,4100002, 4100003 )"); or Filter filter = ECQL.toFilter("name IN ('one','two','three')"); other Filter filter = ECQL.toFilter("length IN ( (1+2), 3-4, [5*6] )"); > > > > Thanks > > Feras cheers -- Mauricio Pazos www.axios.es |