db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gmon...@apache.org
Subject svn commit: r586154 - /db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBSybase.java
Date Thu, 18 Oct 2007 22:06:42 GMT
Author: gmonroe
Date: Thu Oct 18 15:06:41 2007
New Revision: 586154

URL: http://svn.apache.org/viewvc?rev=586154&view=rev
Log:
Fix for a problem that occurs when the query criteria has an offset defined but no record
limit.  Sybase/MSSQL DBs will now pass the testOffsetLimit test case.

Modified:
    db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBSybase.java

Modified: db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBSybase.java
URL: http://svn.apache.org/viewvc/db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBSybase.java?rev=586154&r1=586153&r2=586154&view=diff
==============================================================================
--- db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBSybase.java (original)
+++ db/torque/runtime/trunk/src/java/org/apache/torque/adapter/DBSybase.java Thu Oct 18 15:06:41
2007
@@ -166,6 +166,9 @@
     public void generateLimits(Query query, int offset, int limit)
         throws TorqueException
     {
+        if ( limit < 0 && offset >= 0 ) { // Offset only test
+            return;
+        }
         if (limit + offset > 0)
         {
             query.setRowcount(String.valueOf(limit + offset));



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message