Jody Garnett ha scritto:
> Andrea Aime wrote:
>> What it would be nice to have is the ability, from within 
>> JDCBFeatureCollection, do so something like:
>> mySqlBuilder.getEncoder().encode(expression)
>>   
> I think we may need to make a full SQL builder available ie that can 
> handle:
> - SortBy
> - Expression
> - Filter
> - type name to table names
> - attribute descriptor to column name

SqlBuilder as stands today already handles:
- SortBy (sqlOrderBy method)
- Filter (sqlWhere method, thought it's silly in that it adds WHERE in
   front of the encoded filter...)
- type name to table name (sqlFrom)
- attribute descriptor to column name
   (sqlColumns( StringBuffer sql, FIDMapper mapper, AttributeType 
attributes[] ))

What we need to add is:
- Expression
- extend the creation of select clause to accept expressions instead of
   plain attribute names

thought I could personally get away with just the first... yet yes,
adding a encode(Filter) that does not prefix the result with "WHERE "
would be nice...

> My impression is jdeolive built something like this for his H2 
> DataStore, can we check if the design meets our needs?

I'll have a look and report back. If Justin wants to chime in in
the meantime, I won't certainly mind ;)

>> All of this is no small change, and moreover, I need a fix on
>> 2.4.x, and quickly too.
>>   
> Darn that is rough; can we check H2 DataStore approach and see if we can 
> start in on that solution making only the functionality you need today 
> is included? I also had to hack away at some of this kind of code in 
> order to check CRS for the number of ordinates used (which matters when 
> encoding an expression against a specific table etc...).

This one is new to me. Any jira where I can read up what you did?

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to