Ben Caradoc-Davies ha scritto: > I would like to see support for functions dynamically discoverable from > data sources. The use case is a database that exposes functions that can > be called in a filter query. GeoTools will not know about these > functions until it connects to the database. If the data store is > configured to permit it, the functions are passed to the database for > execution. > > The "registered functions" prototype in community-schemas does this by > overriding bits of FilterFactoryImpl. In effect, any unknown function is > passed to the data store as a fallback, and the data store SQL encoder > will have to decide whether it should be encoded. > > It would be good if the new filter arrangements support this approach, > or at least, do not make it unimplementable.
Hum, I will have to look into your modifications... can you point me at the file? While I see the usage of such a feature, I also see serious problems: the filter functions are declared at a global level, but these you're talking about are available only for a specific datastore, yet there is no way to tell which one, this poses a serious usability problem in environments where there are multiple data stores. Say I generate the WFS capabilities from the list of available functions, some are available only on postgis, yet there is no way to tell so, and one such functions is used against a shapefile instead. What's going to happen? I hope an exception gets thrown (silent failure would be worse, no user feedback), yet that would be totally unexpected from the user point of view. Sorry I did not have the time to follow the debate on this topic when it was happening (a couple months ago I believe), so maybe I'm missing something obvious here? Cheers Andrea -- Andrea Aime OpenGeo - http://opengeo.org Expert service straight from the developers. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel