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 -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ 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
