patch applied.

john mcnally

On Tue, 2002-04-09 at 13:02, Bill Schneider wrote:
> Supplied a patch for Oracle native limits a while back and it probably got
> rejected because I tried to fix Sybase too and no one could test it on
> Sybase.  Resubmitting with the Sybase stuff taken out.
> 
> -- Bill
> 
> Index: src/java/org/apache/torque/util/BasePeer.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-turbine-torque/src/java/org/apache/torque/util/BaseP
> eer.java,v
> retrieving revision 1.34
> diff -u -r1.34 BasePeer.java
> --- src/java/org/apache/torque/util/BasePeer.java 18 Mar 2002 07:59:02 -0000
> 1.34
> +++ src/java/org/apache/torque/util/BasePeer.java 9 Apr 2002 19:56:28 -0000
> @@ -1323,7 +1323,20 @@
>              criteria.setLimit(-1);
>          }
> 
> -        if (limitString != null) query.setLimit(limitString);
> +        if (limitString != null)
> +        {
> +            switch (db.getLimitStyle())
> +            {
> +                case DB.LIMIT_STYLE_ORACLE:
> +                    whereClause.add("rownum <= " + limitString);
> +                    break;
> +                default:
> +                    query.setLimit(limitString);
> +            }
> +        }
> 
>          String sql = query.toString();
>          category.debug(sql);
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to