<< Back to previous view

[JDBC-96] execute! should accept a PreparedStatement Created: 13/May/14  Updated: 18/May/14  Resolved: 18/May/14

Status: Resolved
Project: java.jdbc
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Major
Reporter: Tejas Dinkar Assignee: Sean Corfield
Resolution: Completed Votes: 0
Labels: enhancement, patch

Attachments: Text File 0001-execute-can-now-accept-prepared-statements-as-well.patch    
Patch: Code and Test

 Description   

This patch to clojure.java.jdbc allows you to pass in a prepared statement to the execute function.

I have already signed the CLA (Tejas Dinkar).

I can also open a pull request from here: https://github.com/gja/java.jdbc/tree/execute-should-accept-a-prepared-statement



 Comments   
Comment by Sean Corfield [ 14/May/14 12:26 AM ]

This looks very nice Tejas, thank you! I'll apply the patch at the weekend and verify everything and let you know if I hit any issues.

Comment by Sean Corfield [ 18/May/14 7:11 PM ]

Patch applied. Will be in 0.3.4 version of library.





[JDBC-68] Optional 'identifer' kwarg should be responsible to keywordize row keys Created: 14/Aug/13  Updated: 15/Sep/13  Resolved: 15/Sep/13

Status: Resolved
Project: java.jdbc
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Shantanu Kumar Assignee: Sean Corfield
Resolution: Declined Votes: 0
Labels: enhancement
Environment:

Clojure (JVM)


Attachments: File identifier-should-keywordize.diff    
Patch: Code

 Description   

Optional 'identifier' kwarg only transforms the string column name to another string; the row keys are always keywordized. In some result parsing cases, where a different transformation may be required the default keywordization would be unnecessary.

A possible solution is to expand the responsibility of 'identifier' to keywordize (default behavior) when required. This solution is attached as a patch to this issue, and passes all tests.



 Comments   
Comment by Sean Corfield [ 14/Aug/13 3:34 PM ]

The problem with this approach is that anyone using the `identifiers` approach - overriding the default behavior - will now have broken code. I'll give it more thought. I think a :keyword? true|false argument, passed thru everything is the only way to maintain backward compatibility but that's a lot of churn so breaking backward compatibility may be the less painful approach (esp. since 0.3.0 is a whole new API anyway).

Comment by Sean Corfield [ 15/Sep/13 4:15 PM ]

java.jdbc has always converted column identifiers to keywords and having keys in maps be keywords is idiomatic in Clojure. If some folks want non-keywords, they can post-process the results.

Adding another option to turn keywords on and off will make the API more complex and breaking compatibility by suddenly not turning the column names into keywords, and forcing a lot of existing code to change, is not acceptable at this point.





Generated at Tue Jul 22 12:41:12 CDT 2014 using JIRA 4.4#649-r158309.