Return-Path: Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 39227 invoked by uid 1037); 26 Jan 2001 22:20:18 -0000 Date: 26 Jan 2001 22:20:18 -0000 Message-ID: <20010126222018.39225.qmail@apache.org> From: balld@apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/src/org/apache/cocoon/processor/xsp/library/sql esql.xsl balld 01/01/26 14:20:18 Modified: src/org/apache/cocoon/processor/xsp/library/sql esql.xsl Log: added experimental support for postgresql and mysql limit clauses Revision Changes Path 1.55 +54 -4 xml-cocoon/src/org/apache/cocoon/processor/xsp/library/sql/esql.xsl Index: esql.xsl =================================================================== RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xsp/library/sql/esql.xsl,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- esql.xsl 2001/01/22 23:49:44 1.54 +++ esql.xsl 2001/01/26 22:20:16 1.55 @@ -1,5 +1,5 @@ - + @@ -409,11 +457,12 @@ _esql_query.results = _esql_query.statement.execute(_esql_query.query); + System.err.println("QUERY: "+_esql_query.query); if (_esql_query.results) { _esql_query.resultset = _esql_query.statement.getResultSet(); _esql_query.resultset_metadata = _esql_query.resultset.getMetaData(); _esql_query.position = 0; - if (_esql_query.skip_rows > 0) { + if (_esql_connection.use_limit_clause == 0 && _esql_query.skip_rows > 0) { while (_esql_query.resultset.next()) { _esql_query.position++; if (_esql_query.position == _esql_query.skip_rows) { @@ -485,10 +534,11 @@ while (_esql_query.resultset.next()) { - _esql_query.position++; - if (_esql_query.max_rows != -1 && _esql_query.position - _esql_query.skip_rows == _esql_query.max_rows-1) { + if (_esql_connection.use_limit_clause == 0 && _esql_query.max_rows != -1 && _esql_query.position - _esql_query.skip_rows == _esql_query.max_rows-1) { + _esql_query.position++; break; } + _esql_query.position++; }