You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Yair Lenga (JIRA)" <ji...@apache.org> on 2016/12/10 22:04:58 UTC

[jira] [Created] (DBUTILS-132) Enable MultiQuery statements

Yair Lenga created DBUTILS-132:
----------------------------------

             Summary: Enable MultiQuery statements
                 Key: DBUTILS-132
                 URL: https://issues.apache.org/jira/browse/DBUTILS-132
             Project: Commons DbUtils
          Issue Type: Improvement
    Affects Versions: 1.6
            Reporter: Yair Lenga
            Priority: Minor


The "batch" interface make it possible to perform repeated statements - updated, delete or insert, based on a statement with placeholders, and provide major speedup over simple updated.

The request is to extend the support for multiple statement, so that it will be possible to pass repeated data sets into the query. Instead of taking Object ... params, it should take Object [] [] params, and should iterate over the input parameters, on the same prepared statement.

The new method signature:
public <T> List<T>  [More ...] query(String sql, ResultSetHandler<T> rsh, Object... params)

My testing (straight JDBC against Sybase ASE) showed that reusing the preparedStatemet should provide significant benefits - because it will eliminate the prepared statement setup, and allow sybase to optimize the call.

I will be happy to help with development or testing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)