[jira] [Commented] (DBUTILS-88) Make AsyncQueryRunner be a decorator around a QueryRunner

2012-03-24 Thread Moandji Ezana (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/DBUTILS-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13237481#comment-13237481
 ] 

Moandji Ezana commented on DBUTILS-88:
--

Does anything need to happen for this issue and DB-UTILS-87 to be committed?

 Make AsyncQueryRunner be a decorator around a QueryRunner
 -

 Key: DBUTILS-88
 URL: https://issues.apache.org/jira/browse/DBUTILS-88
 Project: Commons DbUtils
  Issue Type: Task
Reporter: Moandji Ezana
Priority: Minor
 Attachments: AsyncQueryRunner_wraps_QueryRunner.txt, 
 DBUTILS-88v1.patch, DBUTILS-88v2.patch


 AsyncQueryRunner duplicates much of the code in QueryRunner. Would it be 
 possible for AsyncQueryRunner to simply decorate a QueryRunner with async 
 functionality, in the same way a BufferedInputStream might decorate an 
 InputStream?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (DBUTILS-87) Return generated key on insert

2012-02-19 Thread Moandji Ezana (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/DBUTILS-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13211358#comment-13211358
 ] 

Moandji Ezana commented on DBUTILS-87:
--

I'm waiting for DBUTILS-88 to be resolved before adding the insert methods to 
AsyncQueryRunner.

 Return generated key on insert
 --

 Key: DBUTILS-87
 URL: https://issues.apache.org/jira/browse/DBUTILS-87
 Project: Commons DbUtils
  Issue Type: New Feature
Reporter: Moandji Ezana
Assignee: William R. Speirs
 Attachments: QueryRunner_insert.txt


 It would be useful to have an insert method on QueryRunner that returns the 
 id of the new record.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (DBUTILS-88) Make AsyncQueryRunner be a decorator around a QueryRunner

2012-02-16 Thread Moandji Ezana (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/DBUTILS-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13210115#comment-13210115
 ] 

Moandji Ezana commented on DBUTILS-88:
--

Looks good to me. It might be worth marking the other constructors as 
@Deprecated, too. If AsyncQueryRunner is about wrapping a QueryRunner, 
AsyncQueryRunner(ExecutorService executorService, QueryRunner queryRunner) best 
expresses that.

Ultimately, it might be worth making QueryRunner an interface that is 
implemented by both AsyncQueryRunner and the current QueryRunner (renamed to 
BasicQueryRunner?).

 Make AsyncQueryRunner be a decorator around a QueryRunner
 -

 Key: DBUTILS-88
 URL: https://issues.apache.org/jira/browse/DBUTILS-88
 Project: Commons DbUtils
  Issue Type: Task
Reporter: Moandji Ezana
Priority: Minor
 Attachments: AsyncQueryRunner_wraps_QueryRunner.txt, 
 DBUTILS-88v1.patch


 AsyncQueryRunner duplicates much of the code in QueryRunner. Would it be 
 possible for AsyncQueryRunner to simply decorate a QueryRunner with async 
 functionality, in the same way a BufferedInputStream might decorate an 
 InputStream?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (DBUTILS-87) Return generated key on insert

2012-02-07 Thread Moandji Ezana (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/DBUTILS-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13202804#comment-13202804
 ] 

Moandji Ezana commented on DBUTILS-87:
--

Looking at this patch I noticed that there are two other possible calls which 
users might want to create the prepared statement:

prepareStatement(String sql, int[] columnIndexes)
prepareStatement(String sql, String[] columnNames)

What would you see as the API for this? While I agree that those could be 
useful, I'm not sure it's really necessary:

1. Multi-column primary keys might be handled by the JDBC driver, if all 
columns are defined as being part of the primary key. This is pure speculation 
on my part.

2. Multi-column primary keys are fairly rare.

3. Whatever the API we come up with has to be replicated in the 
AsyncQueryRunner, so it's a lot of extra methods.

Otherwise, the patch is missing (as noted above) JavaDocs and the async 
implementation, but looks sound. If you can update your patch with these 
additional things, I'll look to commit it. Thanks!

Cool. I'll try to make time for it this week.

 Return generated key on insert
 --

 Key: DBUTILS-87
 URL: https://issues.apache.org/jira/browse/DBUTILS-87
 Project: Commons DbUtils
  Issue Type: New Feature
Reporter: Moandji Ezana
Assignee: William R. Speirs
 Attachments: QueryRunner_insert.txt


 It would be useful to have an insert method on QueryRunner that returns the 
 id of the new record.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (DBUTILS-87) Return generated key on insert

2012-02-01 Thread Moandji Ezana (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/DBUTILS-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13197766#comment-13197766
 ] 

Moandji Ezana commented on DBUTILS-87:
--

@Sebb: I agree, but I wanted to get some initial feedback on whether the 
functionality is desired, implemented in a sane way, etc.

As soon as that is agreed, I'll fill in the documentation, fix any code style 
mistakes and also add this functionality to the AsyncQueryRunner and (if 
possible) batch methods.

 Return generated key on insert
 --

 Key: DBUTILS-87
 URL: https://issues.apache.org/jira/browse/DBUTILS-87
 Project: Commons DbUtils
  Issue Type: New Feature
Reporter: Moandji Ezana
Assignee: William R. Speirs
 Attachments: QueryRunner_insert.txt


 It would be useful to have an insert method on QueryRunner that returns the 
 id of the new record.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira