cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAY-1967) Deprecate SQLTemplate parameter batches
Date Sun, 02 Nov 2014 10:39:34 GMT
Andrus Adamchik created CAY-1967:
------------------------------------

             Summary: Deprecate SQLTemplate parameter batches
                 Key: CAY-1967
                 URL: https://issues.apache.org/jira/browse/CAY-1967
             Project: Cayenne
          Issue Type: Improvement
            Reporter: Andrus Adamchik
            Assignee: Andrus Adamchik


One of the hurdles in creating a cleaner API for SQLTemplate is its support for parameter
batches:

SQLTemplate template = ...

Map<String, Object>[] params = new Map<>[2];
params[0] = ..
params[1] = ..

sqlTemplate.setParams(params);

There's a very small performance benefit to using batches vs. say using QueryChain:

SQLTemplate template = ...;
Query[] queries = new Query[2];
queries[0] = template.queryQueryWithParameters(..);
queries[1] = template.queryQueryWithParameters(..);

QueryChain chain = new QueryChain(queries);

Probably not noticeable enough by anyone. So going to deprecate parameter batches. 



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

Mime
View raw message