On 12/05/11 16:49, Andrea Aime wrote:
On Thu, May 12, 2011 at 4:17 AM, Niels<[email protected]> wrote:
I noticed that whenever there is a concat in an expression of your filter in
a query, that filter is applied as a post-filter because geotools can't
translate it to a where clause.
But why don't SQL dialects like oracle support concat? Surely it is
possible.
I agree, it is surely possible. Just no one ever took the time to scan through
the current list of functions and update the sql encoders for the
various databases
to add support for encoding the functions.
It is also less trivial than it seems because there are a lot of them
and you have
to write a unit test for each to make sure their sql encoding actually works.
I guess a good test would be a JDBCFunctionTest base class with tests for each
and any function we support in some JDBC dialect, the dialects that do encode
would get the test run with sql and check the encoding, the others
will just make
a check of proper filter splitting I guess.
No need to start with the whole lot, just adding support for string
concatenation
in the Oracle dialect could be a starting point, other functions and associated
test methods can be added with time (as well as function encoding in other
dialects)
Oh, another detail. Many functions are commonly supported in the existing
databases, such as string, date and number manipulation.
However if we look at the spatial ones they might be supported only starting
with a specific version of a db (say, postgis 1.3) or with a specific level of
implementation (Oracle XE misses a lot of functions that Oracle Spatial
full edition has). One has to be careful when declaring specific function
support in the filter caps and check the db at hand actually supports them.
Cheers
Andrea
Thanks for the explanation, I thought it was something like that.
Maybe if I have some spare time some day 8-)
Cheers,
--
*Niels Charlier*
Software Engineer
CSIRO Earth Science and Resource Engineering
Phone: +61 8 6436 8914
Australian Resources Research Centre
26 Dick Perry Avenue, Kensington WA 6151
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel