Hi all,

So I went ahead and implemented paging support for postgis, which really means 
taking the startIndex and maxFeatures parameters and generating the sql 
queries with OFFSET and LIMIT.

In the process, among consulting QueryCapabilities, I had to make a couple 
changes to SQLBuilder, DefaultSQLBuilder and PostgisSQLBuilder.

The thing is, SQLBuilder is meant to create the whole select statement, but 
that was not being respected. I.e., JDBC1DataStore was relying on SQLBuilder 
to create the select statement except for the ORDER BY clause, which it was 
appending in constructQuery, which is private.

This was preventing me to append OFFSET and LIMIT as needed, as those clauses 
shall go after ORDER BY.

So I overloaded buildSQLQuery to also receive the query's SortBy[], startIndex 
and maxFeatures parameters, and call sqlOrderBy from inside 
DefaultSQLBuilder.buildSQLQuery instead of from inside the private 
JDBC1DataStore.constructQuery.

All in all, tested end to end with geoserver and it works great, so this is a 
warning for anyone who wants to complain or present his concerns before I 
commit later today.

Regards,

Gabriel


-------------------------------------------------------------------------
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