Use native support for limit and offset when available ------------------------------------------------------
Key: GEOT-2102 URL: http://jira.codehaus.org/browse/GEOT-2102 Project: GeoTools Issue Type: New Feature Components: data jdbc-ng Affects Versions: 2.5.1 Reporter: Andrea Aime Assignee: Andrea Aime Fix For: 2.5.2 Currently maxFeatures is supported thru a wrapper, whilst offset is not supported at all. The SQLDialect should provide information on wheter the two featuers are supported, and allow the encoding in case they are. This would be something like: {code} SQLDialect { public boolean isLimitSupported(): public void encodeLimit(int limit); public boolean isOffsetSupported(); public void encodeOffset(int offset); {code} The usual syntax for encoding offset and limit is something like: {code} select ... from ... where ... order by ... LIMIT x OFFSET y {code} The code above works for H2, PostgreSQL, MySql and Sqllite. Unfortuantely DB2 and Oracle are the usual pain in the neck, and they do not support the above syntax (apparenlty neither does SQL Server) The following document reports a summary: http://troels.arvin.dk/db/rdbms/#select-limit-offset -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- 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