db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remke Rutgers <Remke.Rutg...@brightalley.nl>
Subject SQLException on criteria.setLimit() with ordered queries and Orac le versions before 8i
Date Tue, 22 Jul 2003 12:57:08 GMT
Hi all,

I noticed that the LIMIT_STYLE_ORACLE is implemented in BasePeer using an
ordered subquery. 
This gives Error: java.sql.SQLException: ORA-00907: missing right
parenthesis in Oracle 7.3.4

 * @version $Id: BasePeer.java,v 2003/06/20 08:40:02 mpoeschl Exp $
version: torque 3.0.2

However, an ordered subquery is only available from Oracle version 8i
onwards (if I am not mistaken, at least it is not available in 7.3.4 as we
are using).
As far as I know there is no get a limited subset of an ordered query in
Oracle versions below 8i (not without PL/SQL I think). 
My solution would be to create a new adapter DBOraclePre8i, have this extend
DBOracle, and only override 
     * This method is used to check whether the database natively
     * supports limiting the size of the resultset.
     * @return False.
    public boolean supportsNativeLimit()
        return false;

     * This method is used to check whether the database supports
     * limiting the size of the resultset.
     * @return LIMIT_STYLE_NONE.
    public int getLimitStyle()
        return DB.LIMIT_STYLE_NONE;

and add to DBFactory.java:
        adapters.put("oraclepre8i", DBOraclePre8i.class);

I realize that most users no long users pre 8i Oracle instances, but still,
is there any chance of having this applied?
Or maybe someone has an other suggesting as to how to solve this problem?

Remke Rutgers

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

View raw message