db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Extending Platform interface
Date Wed, 09 Mar 2005 19:23:27 GMT
Hi all,

I'd like to prepare set of patches to implement support of the stored procedures 
returning a result set. In order to do this platform independently, I'd like to 
get opinions on whether following changes to the Platform interface are 
acceptable or not.

   * Add a method to check if statement is a CallableStatement or not:

         isCallableStatement(PreparedStatement stmt);

     Problem is that simple check (stmt instanceof CallableStatement)
     does not work at least for HSQLDB, and I don't know about other
     platforms. So, by placing the check into the Platform it should be
     possible to implement this check on per-platform base. Abstract
     implementation can use instanceof check.


   * Add a method to register stored procedure result as a ResultSet.

         registerOutResultSet(CallableStatement stmt, int position);

     Problem is that while some JDBC drivers are happy with Type.OTHER,
     Oracle requires OracleTypes.CURSOR.


   * Add a method to retrieve result set from the CallableStatement.

         getResultSet(CallableStatement stmt);

     According to some, stmt.getResultSet() works on some platforms.
     On Oracle, you must call stmt.getObject(1).


Opinions, suggestions, corrections?

Thanks,
Vadim


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


Mime
View raw message