<!--
RSS generated by JIRA (4.4#649-r158309) at Fri May 24 04:53:37 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+JDBC+ORDER+BY+updated+DESC%2C+priority+DESC%2C+created+ASC&tempMax=1000&field=key&field=summary
-->
<!-- If you wish to do custom client-side styling of RSS, uncomment this:
<?xml-stylesheet href="http://dev.clojure.org/jira/styles/jiraxml2html.xsl" type="text/xsl"?>
-->
<rss version="0.92">
    <channel>
        <title>Clojure JIRA</title>
        <link>http://dev.clojure.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+JDBC+ORDER+BY+updated+DESC%2C+priority+DESC%2C+created+ASC</link>
        <description>An XML representation of a search request</description>
                <language>en-us</language>
                        <issue start="0" end="57" total="57"/>
                <build-info>
            <version>4.4</version>
            <build-number>649</build-number>
            <build-date>25-07-2011</build-date>
        </build-info>
<item>
            <title>[JDBC-46] A mechanism for reading specialized types from result sets could be useful</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-46</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;I had this idea when trying to adapt Korma to use with postgres tables with columns of array types. I had some success using Korma&apos;s transform functions to convert the java.sql.Array objects into a seq on the way out, but recent changes to Korma seem to indicate that the transform functions are not guaranteed to run before the connection is closed. This interferes with efforts to read the arrays, which I think can be their own result sets.&lt;/p&gt;

&lt;p&gt;Presumably korma could be changed to support reading the arrays on the way out, but maybe being able to customize the read behavior within c.j.jdbc would be simpler.&lt;/p&gt;

&lt;p&gt;The first idea I&apos;ve had toward this end is to create a protocol with a single function that objects being read out of the resultset get passed through. It would default to the identity function, but users could e.g. extend it to java.sql.Array. I don&apos;t know if there are significant performance implications for an extra function call for each value coming out of the database.&lt;/p&gt;

&lt;p&gt;I&apos;ll have a patch in this vein attached shortly.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15975">JDBC-46</key>
            <summary>A mechanism for reading specialized types from result sets could be useful</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="gfredericks">Gary Fredericks</reporter>
                        <labels>
                    </labels>
                <created>Wed, 23 Jan 2013 09:23:06 -0600</created>
                <updated>Tue, 21 May 2013 21:40:26 -0500</updated>
                    <resolved>Fri, 19 Apr 2013 21:34:49 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30472" author="gfredericks" created="Wed, 23 Jan 2013 10:26:21 -0600"  >&lt;p&gt;Attached patch. Is there any straightforward way to test this? Or a place it should be documented?&lt;/p&gt;</comment>
                    <comment id="30473" author="seancorfield" created="Wed, 23 Jan 2013 10:48:27 -0600"  >&lt;p&gt;Docs: just needs good docstring since the clojure.github.com site is auto-generated from those (although it is still triggered manually it seems).&lt;/p&gt;

&lt;p&gt;Test: mvn test&lt;/p&gt;

&lt;p&gt;I have Derby, HSQLDB, MySQL, MS SQL Server (two drivers), MySQL. I don&apos;t have Postgres to test against. By default mvn test only tries Derby, HSQLDB and SQLite. TEST_DBS=... mvn test will test more.&lt;/p&gt;</comment>
                    <comment id="30474" author="seancorfield" created="Wed, 23 Jan 2013 10:49:43 -0600"  >&lt;p&gt;Would be nice to have a test with a custom conversion, mapping any String to some constant perhaps? Perhaps a separate test ns that is required and tested from test_jdbc.clj?&lt;/p&gt;</comment>
                    <comment id="30475" author="gfredericks" created="Wed, 23 Jan 2013 14:38:59 -0600"  >&lt;p&gt;Oh, we have to be careful with testing because I believe any extensions to the protocol are going to be effective for all the remaining tests, right?&lt;/p&gt;</comment>
                    <comment id="30476" author="gfredericks" created="Wed, 23 Jan 2013 15:53:25 -0600"  >&lt;p&gt;Attached new patch with docstrings and a test. I&apos;ve only run the tests with MySQL. Let me know if there&apos;s anything else I can do.&lt;/p&gt;</comment>
                    <comment id="30507" author="gfredericks" created="Tue, 29 Jan 2013 16:37:21 -0600"  >&lt;p&gt;This patch recently came in handy in an different situation, when jdbc was returning Integers instead of Longs, we had a really clean spot to do the conversion.&lt;/p&gt;</comment>
                    <comment id="30899" author="seancorfield" created="Sun, 7 Apr 2013 03:44:18 -0500"  >&lt;p&gt;There have been a lot of code changes since you submitted the patch and right now the patch doesn&apos;t apply. Can you re-submit the patch against the latest master branch so I can try again? Thanx!&lt;/p&gt;</comment>
                    <comment id="30933" author="gfredericks" created="Thu, 11 Apr 2013 21:32:21 -0500"  >&lt;p&gt;I&apos;m getting 3 test failures on master currently (with a basic &lt;tt&gt;mvn test&lt;/tt&gt;), and after applying this new patch (p3) I still get 3 failures. So hopefully that means I didn&apos;t break anything.&lt;/p&gt;</comment>
                    <comment id="30978" author="seancorfield" created="Fri, 19 Apr 2013 21:34:49 -0500"  >&lt;p&gt;Applied. Will be in 0.3.0-alpha2&lt;/p&gt;</comment>
                    <comment id="31091" author="gfredericks" created="Wed, 15 May 2013 09:52:03 -0500"  >&lt;p&gt;I&apos;m thinking this feature is no longer necessary due to the :row-fn option &amp;#8211; since the only motivation in the first place was to have the opportunity to transform a result before the connection closes.&lt;/p&gt;

&lt;p&gt;There would still be no easy way to do it from Korma, but that&apos;s Korma&apos;s fault. So maybe we should remove this before 0.3.0 is released?&lt;/p&gt;</comment>
                    <comment id="31130" author="seancorfield" created="Tue, 21 May 2013 19:19:20 -0500"  >&lt;p&gt;This turns out to be a very useful hook for certain database types. I used it to solve an issue with Oracle, to enable users to automatically convert Oracle-specific datatypes to regular values, in &lt;a href=&quot;http://dev.clojure.org/jira/browse/JDBC-57&quot; title=&quot;Better support for Oracle&quot;&gt;&lt;del&gt;JDBC-57&lt;/del&gt;&lt;/a&gt;. So, thank you... even if you think it isn&apos;t necessary now!&lt;/p&gt;</comment>
                    <comment id="31131" author="gfredericks" created="Tue, 21 May 2013 19:53:30 -0500"  >&lt;p&gt;That use case could be served by :row-fn, right? You just like that it&apos;s easier? I don&apos;t mind it if others still find it valuable, I just wanted to make sure we didn&apos;t accidentally cement redundant features.&lt;/p&gt;</comment>
                    <comment id="31132" author="seancorfield" created="Tue, 21 May 2013 21:40:26 -0500"  >&lt;p&gt;:row-fn is intended for whole-row transformations - it is lazily mapped over the result set - so it&apos;s really meant for post-processing your data in a general sense while the connection is open. The protocol-based column reader is intended to transform specific types of data, independent of any application semantics (e.g., Oracle returns an oracle.sql.TIMESTAMP which can be automatically transformed into a java.sql.Timestamp or Date or whatever).&lt;/p&gt;

&lt;p&gt;And :result-set-fn is intended for whole-result-set transformation, just prior to returning the result set.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11812" name="JDBC-46-p1.patch" size="1923" author="gfredericks" created="Wed, 23 Jan 2013 10:26:21 -0600" />
                    <attachment id="11813" name="JDBC-46-p2.patch" size="3560" author="gfredericks" created="Wed, 23 Jan 2013 15:53:25 -0600" />
                    <attachment id="11953" name="JDBC-46-p3.patch" size="3549" author="gfredericks" created="Thu, 11 Apr 2013 21:32:21 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-56] Problem with find-connection when using agents with c3p0 connection pool</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-56</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;I use an agent to offload email processing and update a db on completion. If I use a c3p0 connection pool, I get an exception and a complaint that the connection isn&apos;t open (see stacktrace). The code works if I wrap the agent fn in a clojure.java.jdbc/with-connection and get a connection from the pool in the agent thread.&lt;/p&gt;

&lt;p&gt;The in jdbc.clj, the find-connection (db-find-connection in HEAD) checks for an existing connection and tries to use it without checking if it&apos;s open. This causes an exception with a c3p0 connection that was acquired in another thread.&lt;/p&gt;

&lt;p&gt;Here&apos;s the stacktrace I&apos;m seeing (note the &quot;You can&apos;t operate on a closed Connection!!!&quot;):&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;2013-05-16 10:32:22,208 [clojure-agent-send-off-pool-7] DEBUG com.mchange.v2.sql.SqlUtils - Converting Throwable to SQLException...
java.lang.NullPointerException
	at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:186)
	at clojure.java.jdbc$prepare_statement.doInvoke(jdbc.clj:450)
	at clojure.lang.RestFn.invoke(RestFn.java:425)
	at clojure.lang.AFn.applyToHelper(AFn.java:163)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.core$apply.invoke(core.clj:621)
	at clojure.java.jdbc$with_query_results_STAR_.invoke(jdbc.clj:646)
	at clj_record.core$find_by_sql$func__3362__auto____3378.invoke(core.clj:72)
	at clj_record.core$find_by_sql.invoke(core.clj:71)
	at clj_record.core$find_records.invoke(core.clj:85)
	at clj_record.core$find_record.invoke(core.clj:91)
	at neataudio.domain.interview_participant_relationship$find_record.invoke(interview_participant_relationship.clj:18)
	at neataudio.domain.interview_participant_relationship$update_email_status.invoke(interview_participant_relationship.clj:37)
	at neataudio.controllers.participant_controller$notify$fn__5113$fn__5114$func__3362__auto____5115$fn__5116.invoke(participant_controller.clj:104)
	at clojure.java.jdbc$transaction_STAR_$fn__3162.invoke(jdbc.clj:372)
	at clojure.java.jdbc$transaction_STAR_.invoke(jdbc.clj:371)
	at neataudio.controllers.participant_controller$notify$fn__5113$fn__5114$func__3362__auto____5115.invoke(participant_controller.clj:101)
	at neataudio.controllers.participant_controller$notify$fn__5113$fn__5114.invoke(participant_controller.clj:101)
	at neataudio.controllers.participant_controller$notify$fn__5113.invoke(participant_controller.clj:101)
	at clojure.lang.AFn.applyToHelper(AFn.java:185)
	at clojure.lang.AFn.applyTo(AFn.java:151)
	at clojure.core$apply.invoke(core.clj:623)
	at clojure.core$binding_conveyor_fn$fn__4115.doInvoke(core.clj:1848)
	at clojure.lang.RestFn.applyTo(RestFn.java:146)
	at clojure.lang.Agent$Action.doRun(Agent.java:114)
	at clojure.lang.Agent$Action.run(Agent.java:163)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:680)
java.sql.SQLException: You can&apos;t operate on a closed Connection!!!
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
	at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:222)
	at clojure.java.jdbc$prepare_statement.doInvoke(jdbc.clj:450)
	at clojure.lang.RestFn.invoke(RestFn.java:425)
	at clojure.lang.AFn.applyToHelper(AFn.java:163)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.core$apply.invoke(core.clj:621)
	at clojure.java.jdbc$with_query_results_STAR_.invoke(jdbc.clj:646)
	at clj_record.core$find_by_sql$func__3362__auto____3378.invoke(core.clj:72)
	at clj_record.core$find_by_sql.invoke(core.clj:71)
	at clj_record.core$find_records.invoke(core.clj:85)
	at clj_record.core$find_record.invoke(core.clj:91)
	at neataudio.domain.interview_participant_relationship$find_record.invoke(interview_participant_relationship.clj:18)
	at neataudio.domain.interview_participant_relationship$update_email_status.invoke(interview_participant_relationship.clj:37)
	at neataudio.controllers.participant_controller$notify$fn__5113$fn__5114$func__3362__auto____5115$fn__5116.invoke(participant_controller.clj:104)
	at clojure.java.jdbc$transaction_STAR_$fn__3162.invoke(jdbc.clj:372)
	at clojure.java.jdbc$transaction_STAR_.invoke(jdbc.clj:371)
	at neataudio.controllers.participant_controller$notify$fn__5113$fn__5114$func__3362__auto____5115.invoke(participant_controller.clj:101)
	at neataudio.controllers.participant_controller$notify$fn__5113$fn__5114.invoke(participant_controller.clj:101)
	at neataudio.controllers.participant_controller$notify$fn__5113.invoke(participant_controller.clj:101)
	at clojure.lang.AFn.applyToHelper(AFn.java:185)
	at clojure.lang.AFn.applyTo(AFn.java:151)
	at clojure.core$apply.invoke(core.clj:623)
	at clojure.core$binding_conveyor_fn$fn__4115.doInvoke(core.clj:1848)
	at clojure.lang.RestFn.applyTo(RestFn.java:146)
	at clojure.lang.Agent$Action.doRun(Agent.java:114)
	at clojure.lang.Agent$Action.run(Agent.java:163)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NullPointerException
	at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:186)
	... 28 more
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>OS X 10.8.3&lt;br/&gt;
Java 1.6.0_45&lt;br/&gt;
Clojure 1.5&lt;br/&gt;
c3p0 0.9.1.2&lt;br/&gt;
java.jdbc 0.2.1 (the problem also seems to be there in HEAD at the time of logging this)</environment>
            <key id="16188">JDBC-56</key>
            <summary>Problem with find-connection when using agents with c3p0 connection pool</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="edoloughlin">Ed O&apos;Loughlin</reporter>
                        <labels>
                    </labels>
                <created>Thu, 16 May 2013 04:43:42 -0500</created>
                <updated>Tue, 21 May 2013 12:36:16 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="31093" author="edoloughlin" created="Thu, 16 May 2013 04:50:41 -0500"  >&lt;p&gt;Apologies: this is a crappy bug report. I&apos;m under a bit of pressure at the moment so I can&apos;t make a test case.&lt;/p&gt;</comment>
                    <comment id="31128" author="seancorfield" created="Tue, 21 May 2013 12:36:16 -0500"  >&lt;p&gt;If you use the new API, you pass the db-spec into the functions and it will take care of getting the connection, using it, and closing it - and that will all happen on the same (agent) thread. I would not expect you to be able to get a connection in one thread and use it from another thread.&lt;/p&gt;

&lt;p&gt;When you get a chance, please post an example of both the working and non-working code, but my initial thinking is this isn&apos;t a bug, just an inherent limitation of working with connections across threads....?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-55] More reflection warnings to investigate</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-55</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Reflection warning, clojure/java/jdbc.clj:618:50 - reference to field executeQuery can&apos;t be resolved.&lt;br/&gt;
Reflection warning, clojure/java/jdbc.clj:618:33 - reference to field close can&apos;t be resolved.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16187">JDBC-55</key>
            <summary>More reflection warnings to investigate</summary>
                <type id="3" iconUrl="http://dev.clojure.org/jira/images/icons/task.gif">Task</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Tue, 14 May 2013 20:04:54 -0500</created>
                <updated>Tue, 21 May 2013 10:08:02 -0500</updated>
                    <resolved>Tue, 21 May 2013 10:08:02 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31092" author="jafingerhut" created="Wed, 15 May 2013 10:34:01 -0500"  >&lt;p&gt;Patch jdbc-55-fix-reflection-warnings-v1.txt dated May 15 2013 adds one more type hint that eliminates the two mentioned instances of reflection.&lt;/p&gt;</comment>
                    <comment id="31127" author="seancorfield" created="Tue, 21 May 2013 10:08:02 -0500"  >&lt;p&gt;Patch applied. Thank you!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11992" name="jdbc-55-fix-reflection-warnings-v1.txt" size="1086" author="jafingerhut" created="Wed, 15 May 2013 10:34:01 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[JDBC-57] Better support for Oracle</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-57</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;This is just a suggestion, and i am not sure if it is the right way to do this. &lt;/p&gt;

&lt;p&gt;When fetching data from Oracle the oracle jdbc driver returns all the numeric type columns as BigDecimal and date/datetime columns as oracle.sql.TIMESTAMP. This causes a lot of headache as we have to remember to convert the data to the correct type. &lt;/p&gt;

&lt;p&gt;Although, this can be handled at the application level by using a :row-fn, it would be really nice if this library handles the conversion itself.&lt;/p&gt;
</description>
                <environment>Oracle 10g and above</environment>
            <key id="16190">JDBC-57</key>
            <summary>Better support for Oracle</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="hmanish79@gmail.com">Manish Handa</reporter>
                        <labels>
                    </labels>
                <created>Sat, 18 May 2013 13:49:57 -0500</created>
                <updated>Mon, 20 May 2013 22:52:57 -0500</updated>
                    <resolved>Mon, 20 May 2013 22:52:57 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31108" author="hmanish79@gmail.com" created="Sat, 18 May 2013 14:10:52 -0500"  >&lt;p&gt;Patch for handling results returned by oracle jdbc thin driver&lt;/p&gt;</comment>
                    <comment id="31116" author="seancorfield" created="Sun, 19 May 2013 13:44:41 -0500"  >&lt;p&gt;I think the right solution here will be to modify the result-set-read-column protocol function to be passed rsmeta and i and then Oracle users can extend the protocol to those types and perform the conversions they want. I don&apos;t believe automcatically converting BigDecimal is going to be the right choice for all users although doing the conversion for oracle.sql.TIMESTAMP is a more arguable conversion.&lt;/p&gt;</comment>
                    <comment id="31119" author="hmanish79@gmail.com" created="Mon, 20 May 2013 09:57:11 -0500"  >&lt;p&gt;Agreed. I thought of this, but it requires changing the protocol to take rsmeta along with the column index. i have uploaded another patch for this change.&lt;/p&gt;

&lt;p&gt;Also, it&apos;ll be better to leave the handling of oracle.sql.Timestamp to the application as it needs a dependency on the oracle thin driver (which we should certainly not add to java.jdbc). &lt;/p&gt;

&lt;p&gt;So, after this updated protocol, the oracle users can extend it with something like this (much better now):&lt;/p&gt;

&lt;p&gt;;;; Oracle users can define this in their applications&lt;br/&gt;
;; to extend it to BigDecimal and other oracle types&lt;br/&gt;
(extend-protocol IResultSetReadColumn&lt;br/&gt;
     oracle.sql.TIMESTAMP&lt;br/&gt;
     (result-set-read-column &lt;span class=&quot;error&quot;&gt;&amp;#91;x _ _&amp;#93;&lt;/span&gt; (.timestampValue x))&lt;/p&gt;

&lt;p&gt;     java.math.BigDecimal&lt;br/&gt;
     (result-set-read-column &lt;span class=&quot;error&quot;&gt;&amp;#91;val rsmeta idx&amp;#93;&lt;/span&gt;&lt;br/&gt;
       (if-not (= (.getScale rsmeta idx) 0)&lt;br/&gt;
          (.doubleValue val) ;;; reals&lt;br/&gt;
          (if (= (.getPrecision rsmeta idx) 1)&lt;br/&gt;
              (= 1 (.longValue val)) ;;; booleans&lt;br/&gt;
              (.longValue val))))) ;; integrals&lt;/p&gt;</comment>
                    <comment id="31120" author="seancorfield" created="Mon, 20 May 2013 10:45:24 -0500"  >&lt;p&gt;Thanx. Yes, that was where I was going with this, and while we&apos;re in alpha for 0.3.0 I&apos;m not averse to changing the signatures of new stuff introduced in the API rewrite. I&apos;ll review the patch later and probably roll it in this week (I just got back from a web tech conference in MN and I&apos;m busy catching up on work!).&lt;/p&gt;</comment>
                    <comment id="31123" author="seancorfield" created="Mon, 20 May 2013 22:52:57 -0500"  >&lt;p&gt;Patch applied. Tests updated to match&lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/warning.gif&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;. Will be in 0.3.0-alpha5.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11999" name="datatype.patch" size="2024" author="hmanish79@gmail.com" created="Mon, 20 May 2013 09:57:34 -0500" />
                    <attachment id="11997" name="oracle-fix.patch" size="2172" author="hmanish79@gmail.com" created="Sat, 18 May 2013 14:10:52 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-53] create-table &amp; drop-table doesn&apos;t honor naming strategy</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-53</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;create-table &amp;amp; drop-table doesn&apos;t take the current naming strategy into account.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16156">JDBC-53</key>
            <summary>create-table &amp; drop-table doesn&apos;t honor naming strategy</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="r0man">Roman Scherer</reporter>
                        <labels>
                    </labels>
                <created>Wed, 24 Apr 2013 08:47:12 -0500</created>
                <updated>Sun, 12 May 2013 20:56:38 -0500</updated>
                                                                            <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30987" author="seancorfield" created="Wed, 24 Apr 2013 11:08:25 -0500"  >&lt;p&gt;Just to note: the naming strategy stuff, based on dynamically bound globals, is all deprecated in 0.3.0. Alternatives to create-table and drop-table, which respect the new entities function approach, will be provided in an upcoming alpha build of 0.3.0.&lt;/p&gt;</comment>
                    <comment id="31084" author="davidj" created="Sat, 11 May 2013 20:51:07 -0500"  >&lt;p&gt;Any update on this? I noticed the deprecations while reading the code. Could you say a few words or add a few docs on the 0.3 way of doing naming strategies?&lt;/p&gt;</comment>
                    <comment id="31085" author="seancorfield" created="Sat, 11 May 2013 23:20:08 -0500"  >&lt;p&gt;The replacement is entities and identifiers (as keyword arguments in java.jdbc functions and as macros in java.jdbc.sql). You can see some examples here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://clojure.github.io/java.jdbc/doc/clojure/java/jdbc/NameMapping.html&quot;&gt;http://clojure.github.io/java.jdbc/doc/clojure/java/jdbc/NameMapping.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Replacements for create-table / drop-table will be added before beta1. I&apos;m not sure right now how many more alphas we&apos;ll have. There&apos;s a lot of churn in the code right now and I want it to be feature complete and fairly settled before the first beta.&lt;/p&gt;</comment>
                    <comment id="31086" author="moquist" created="Sun, 12 May 2013 20:56:38 -0500"  >&lt;p&gt;Thanks for the update; looking forward to it!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-13] Add unit tests for generated keys</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-13</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Need to test that generated keys come back as expected for various databases - and that DBs which can&apos;t generate keys let you use transactions and select identity kind of SQL stuff.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14532">JDBC-13</key>
            <summary>Add unit tests for generated keys</summary>
                <type id="3" iconUrl="http://dev.clojure.org/jira/images/icons/task.gif">Task</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Mon, 25 Jul 2011 16:50:31 -0500</created>
                <updated>Tue, 7 May 2013 21:28:53 -0500</updated>
                    <resolved>Tue, 7 May 2013 21:28:53 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31067" author="seancorfield" created="Tue, 7 May 2013 21:28:53 -0500"  >&lt;p&gt;This has sort of been handled along the way with functions used in the test suite to reflect how various databases handle key generation / return. Surprisingly few seem to reliably return keys on an insert &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[JDBC-54] db-transaction does not close connection?</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-54</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;See &lt;a href=&quot;https://gist.github.com/aphyr/5493964&quot;&gt;https://gist.github.com/aphyr/5493964&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="16175">JDBC-54</key>
            <summary>db-transaction does not close connection?</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="2" iconUrl="http://dev.clojure.org/jira/images/icons/priority_critical.gif">Critical</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Wed, 1 May 2013 12:37:17 -0500</created>
                <updated>Tue, 7 May 2013 21:27:36 -0500</updated>
                    <resolved>Tue, 7 May 2013 21:27:36 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="31043" author="seancorfield" created="Fri, 3 May 2013 12:39:16 -0500"  >&lt;p&gt;Having reviewed the code, the result of get-connection is never closed, only the result of calling .getConnection on a PreparedStatement and that matches how java.jdbc has always worked, so I don&apos;t believe this is a problem. Aphyr mentioned on Twitter that he believes the problem was just due to his test code and not inherent in java.jdbc but we are still waiting for confirmation. Lowering priority for now.&lt;/p&gt;</comment>
                    <comment id="31065" author="seancorfield" created="Tue, 7 May 2013 20:30:57 -0500"  >&lt;p&gt;I believe I have verified this locally. Under the old API, a connection was only added explicitly at the &quot;top&quot; of a call chain. Under the new API, a connection can be added on-demand in many places which makes the logic much more complex and there are a couple of places where normal usage could indeed cause a connection leak.&lt;/p&gt;</comment>
                    <comment id="31066" author="seancorfield" created="Tue, 7 May 2013 21:27:36 -0500"  >&lt;p&gt;I believe this is resolved in the latest snapshot (which will become Alpha 4 at some point), as I&apos;ve gone thru and changed how get-connection is called and ensured that with-open is used whenever a new connection is actually created.&lt;/p&gt;

&lt;p&gt;The code needs a fair bit of clean up now tho&apos;. I&apos;m not happy with the result of adding that logic so I need to spend some time refactoring...&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-37] Provide support for alternate transaction strategies</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-37</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;The current design of java.jdbc prevents its use as a participant in a distributed XA transaction, where transactional control is delegated to a TransactionManager. It only works with local transactions and absorbs all nested transactions into the outermost one. It&apos;d be nice to have a clean way to override this default behavior.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15608">JDBC-37</key>
            <summary>Provide support for alternate transaction strategies</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="jcrossley3">Jim Crossley</reporter>
                        <labels>
                    </labels>
                <created>Tue, 31 Jul 2012 17:48:54 -0500</created>
                <updated>Fri, 3 May 2013 12:50:19 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29062" author="jcrossley3" created="Tue, 31 Jul 2012 17:49:18 -0500"  >&lt;p&gt;I&apos;ll try to work up a straw-man solution and submit a pull-request.&lt;/p&gt;</comment>
                    <comment id="29063" author="seancorfield" created="Tue, 31 Jul 2012 17:59:35 -0500"  >&lt;p&gt;Thanx Jim. I agree the current setup isn&apos;t ideal in that area. As for &quot;pull-request&quot;, I assume you mean a patch attached to this JIRA ticket (since Clojure and contrib projects cannot accept pull requests). Please also make sure you get a Contributor&apos;s Agreement on file per &lt;a href=&quot;http://clojure.org/contributing&quot;&gt;http://clojure.org/contributing&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="29064" author="jcrossley3" created="Tue, 31 Jul 2012 18:25:47 -0500"  >&lt;p&gt;Sure thing, Sean&lt;/p&gt;</comment>
                    <comment id="29078" author="jcrossley3" created="Thu, 2 Aug 2012 18:31:48 -0500"  >&lt;p&gt;Sean, here&apos;s a first whack introducing a new dynamic var for transaction strategy. &lt;/p&gt;

&lt;p&gt;I know the desire is for a new API with explicit parameter passing, and when that vision congeals, I&apos;m happy to help migrate, but I&apos;d like to always have the option of the dynamic binding as well.&lt;/p&gt;

&lt;p&gt;My thinking is that if a tx strategy function is passed as a parameter, it&apos;ll override whatever may be set in the dynamic var, but how it gets passed is still unclear to me. I considered adding an optional key to the db-spec, but wanted to run that by you first.&lt;/p&gt;

&lt;p&gt;The Agreement is in the mail. I appreciate your feedback.&lt;/p&gt;</comment>
                    <comment id="30900" author="seancorfield" created="Sun, 7 Apr 2013 03:46:49 -0500"  >&lt;p&gt;There have been a lot of code changes lately and this patch no longer applies cleanly. Can you submit a new patch against the latest master? Thanx!&lt;/p&gt;</comment>
                    <comment id="31025" author="jcrossley3" created="Tue, 30 Apr 2013 17:43:42 -0500"  >&lt;p&gt;Sean, I&apos;m not sure I&apos;m totally smitten with the new &quot;transaction?&quot; boolean parameter. At first glance, this seems an awkward way to define a transaction consisting of multiple statements. Can you provide an example usage with the new API of say, inserting, updating and deleting data within a single transaction? I&apos;m hoping an example will clear up my confusion and I can propose a way of parameterizing a particular strategy for executing any transaction.&lt;/p&gt;</comment>
                    <comment id="31027" author="seancorfield" created="Tue, 30 Apr 2013 17:47:22 -0500"  >&lt;p&gt;See &quot;Using Transactions&quot; here &lt;a href=&quot;https://github.com/clojure/java.jdbc/blob/master/doc/clojure/java/jdbc/UsingSQL.md&quot;&gt;https://github.com/clojure/java.jdbc/blob/master/doc/clojure/java/jdbc/UsingSQL.md&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="31028" author="jcrossley3" created="Tue, 30 Apr 2013 18:30:25 -0500"  >&lt;p&gt;Yes, I saw that, and it seemed to confirm that my original patch should work with minor tweaking. And then I was surprised to see the &quot;transactional?&quot; option in the source. I was curious how you expect it to be used.&lt;/p&gt;</comment>
                    <comment id="31030" author="seancorfield" created="Tue, 30 Apr 2013 18:58:52 -0500"  >&lt;p&gt;Folks have asked for the ability to run various functions without an implicit transaction inside them - in fact for some DBs, certain commands cannot be run inside a transaction which was a problem with the old API where you couldn&apos;t turn that off. It allows users to have more explicit control over transactions and it&apos;s also a convenient &quot;implementation artifact&quot; for nesting calls.&lt;/p&gt;

&lt;p&gt;So, bottom line: I expect very few users to actually use it explicitly, unless they specifically need to turn off the implicit transaction wrapping.&lt;/p&gt;

&lt;p&gt;And for most of the API that users will interact with, they don&apos;t even need to worry about it.&lt;/p&gt;

&lt;p&gt;Does that help?&lt;/p&gt;</comment>
                    <comment id="31031" author="seancorfield" created="Tue, 30 Apr 2013 19:04:17 -0500"  >&lt;p&gt;Addressing your question about your patch: Clojure/core specifically wanted java.jdbc to move away from dynamically bound variables, which the new API / implementation achieves (given that all the old API that depends on &lt;b&gt;dynamic-vars&lt;/b&gt; is deprecated now and will be completely removed before 1.0.0).&lt;/p&gt;

&lt;p&gt;If all you need is the ability to specify how the transaction function does its job, via a HOF, then I&apos;ll have a look at what that would take in the context of the new &apos;world&apos;...&lt;/p&gt;</comment>
                    <comment id="31034" author="jcrossley3" created="Tue, 30 Apr 2013 19:33:35 -0500"  >&lt;p&gt;Regarding dynamically bound variables, I think it&apos;s very common and accepted &amp;#8211; even canonical? &amp;#8211; to use them (or some ThreadLocal-like variant) to implement transactions. I would hate to make the api awkward just to avoid them.&lt;/p&gt;

&lt;p&gt;But to answer the core question, yes, I think it&apos;s important to provide an alternative to the assumptions encoded into db-transaction*, e.g. &quot;Any nested transactions are absorbed into the outermost transaction.&quot; I might prefer a strategy in which a nested transaction suspends the current one and creates another, assuming the driver supports it.&lt;/p&gt;

&lt;p&gt;But my primary reason for this, as you know, is to somehow inject a &quot;null strategy&quot; to support distributed transactions, delegating the commit/rollback choice to an external &quot;transaction manager&quot;.&lt;/p&gt;

&lt;p&gt;One question: what do you mean by &quot;implementation artifact&quot; for nesting calls?&lt;/p&gt;</comment>
                    <comment id="31037" author="jcrossley3" created="Wed, 1 May 2013 09:46:22 -0500"  >&lt;p&gt;Sean, how do you feel about turning the &lt;tt&gt;:transactional?&lt;/tt&gt; option to a function instead of a boolean? And that function represents the &lt;tt&gt;:tx-strategy&lt;/tt&gt; used, which could assume the value of a dynamically bound value &lt;tt&gt;&amp;#42;tx-strategy&amp;#42;&lt;/tt&gt; by default, and its value would be &lt;tt&gt;db-transaction*&lt;/tt&gt; by default. And folks could set it to nil to turn off transactions, i.e. &lt;tt&gt;:tx-strategy nil&lt;/tt&gt; or perhaps &lt;tt&gt;:tx-strategy :none&lt;/tt&gt; would equate to &lt;tt&gt;:transactional? false&lt;/tt&gt;. I think that may satisfy core&apos;s recommendation for dynamic variables not being the &lt;b&gt;only&lt;/b&gt; way to alter behavior. Make sense at all? &lt;/p&gt;</comment>
                    <comment id="31039" author="seancorfield" created="Wed, 1 May 2013 10:57:47 -0500"  >&lt;p&gt;I was looking at the code again last night and came to much the same conclusion! I&apos;ll take a run at that this weekend (but I&apos;m not adding a &lt;b&gt;dynamic&lt;/b&gt; variable - Clojure/core were very clear about their reasons for not wanting those in code except in extremely rare situations in code that is guaranteed to be single-threaded).&lt;/p&gt;</comment>
                    <comment id="31040" author="jcrossley3" created="Wed, 1 May 2013 11:22:36 -0500"  >&lt;p&gt;You&apos;re killing me! &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Without the dynamic var, I can&apos;t see any way to transparently allow the db code to participate in a distributed transaction. Can we at least agree that transactional code is guaranteed to be &lt;b&gt;effectively&lt;/b&gt; single-threaded? And by this I mean that a transaction must be associated with a single connection, so any thread using that connection must have exclusive access. Do you really want to force folks using distributed transactions to pass the tx strategy in with every call? I don&apos;t think adding the dynamic var and the option to override it violates the spirit of this guideline: &quot;If you present an interface that implicitly passes a parameter via dynamic binding (e.g. db in sql), also provide an identical interface but with the parameter passed explicitly.&quot;&lt;/p&gt;

&lt;p&gt;What was the specific feedback you received that contradicts that?&lt;/p&gt;</comment>
                    <comment id="31042" author="jcrossley3" created="Fri, 3 May 2013 06:44:33 -0500"  >&lt;p&gt;Sean, I came up with a different solution for using java.jdbc with an XA connection that obviates this issue. So even though I think it&apos;s useful to provide both a dynamic var and a function option as a means to override the logic of &lt;tt&gt;db-transaction*&lt;/tt&gt;, I no longer have a need for it.&lt;/p&gt;

&lt;p&gt;Keep up the good work on java.jdbc!&lt;/p&gt;</comment>
                    <comment id="31044" author="seancorfield" created="Fri, 3 May 2013 12:40:25 -0500"  >&lt;p&gt;I like problems that go away of their own accord but I still like the idea of making the transaction strategy a function so I&apos;ll look at that anyway as a possible (breaking) change for alpha2.&lt;/p&gt;</comment>
                    <comment id="31045" author="jcrossley3" created="Fri, 3 May 2013 12:50:19 -0500"  >&lt;p&gt;Something else you might consider: define a protocol function that encapsulates your &lt;tt&gt;commit/rollback/setAutoCommit&lt;/tt&gt; logic inside &lt;tt&gt;db-transaction*&lt;/tt&gt; and extend it to &lt;tt&gt;java.sql.Connection&lt;/tt&gt;. That way, folks could extend their more specific types, e.g. &lt;tt&gt;XAConnection&lt;/tt&gt;, to your protocol (and avoid making those calls that aren&apos;t allowed by XA). &lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11408" name="jdbc-37.diff" size="2579" author="jcrossley3" created="Thu, 2 Aug 2012 18:31:48 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-40] insert nulls using .setNull (e.g. for Teradata)</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-40</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Hi, I am using this nice package with a large (government) Teradata machine. I found that I can not insert nil values using &lt;tt&gt;insert-rows&lt;/tt&gt;: the Teradata JDBC driver tells me to use &lt;tt&gt;.setNull&lt;/tt&gt; or the form of &lt;tt&gt;.setObject&lt;/tt&gt; including an SQL type code.&lt;/p&gt;

&lt;p&gt;The following replacement definition of &lt;tt&gt;set-parameters&lt;/tt&gt; was the only change needed to get this to work.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defn- set-parameters
  &lt;span class=&quot;code-quote&quot;&gt;&quot;Add the parameters to the given statement.&quot;&lt;/span&gt;
  [^PreparedStatement stmt params]
  (let [pmd (.getParameterMetaData stmt)]
    (dorun
     (map-indexed
      (fn [ix value]
        (let [typ (.getParameterType pmd (inc ix))]
          (&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (nil? value)
            (.setNull stmt (inc ix) typ)
            (.setObject stmt (inc ix) value typ))))
      params))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I am not sure whether the use of &lt;tt&gt;.getParameterMetaData&lt;/tt&gt; is a generally appropriate because the docs &lt;a href=&quot;http://docs.oracle.com/javase/7/docs/api/java/sql/ParameterMetaData.html&quot;&gt;http://docs.oracle.com/javase/7/docs/api/java/sql/ParameterMetaData.html&lt;/a&gt; say:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;For some queries and driver implementations, the data that would be returned by a ParameterMetaData object may not be available until the PreparedStatement has been executed.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Anyway it does work for Teradata. Maybe it could be an option?&lt;/p&gt;


&lt;p&gt;It just occurred to me that it is probably inefficient to retrieve the parameter metadata on every call to &lt;tt&gt;set-parameters&lt;/tt&gt;. It could be done in &lt;tt&gt;insert-rows&lt;/tt&gt; instead. On the other hand, I didn&apos;t actually notice any performance hit when inserting 40,000 rows.&lt;/p&gt;</description>
                <environment>Teradata 14</environment>
            <key id="15746">JDBC-40</key>
            <summary>insert nulls using .setNull (e.g. for Teradata)</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="4" iconUrl="http://dev.clojure.org/jira/images/icons/status_reopened.gif">Reopened</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="floybix">Felix Andrews</reporter>
                        <labels>
                    </labels>
                <created>Fri, 12 Oct 2012 06:07:37 -0500</created>
                <updated>Mon, 22 Apr 2013 04:26:18 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="30893" author="seancorfield" created="Sun, 7 Apr 2013 01:07:33 -0500"  >&lt;p&gt;This was a tricky one. Both .getParameterMetadataData and .getParameterType can throw exceptions. On MS SQL Server, if there is a syntax error in the SQL, the former throws an Exception. On MySQL, the latter throws an exception (every time as far as I can tell, even tho&apos; .getParameterMetaData succeeds). That introduces quite a performance penalty for MySQL (about 10% in my tests).&lt;/p&gt;

&lt;p&gt;However, if I treated MySQL as a special case and swallowed all exceptions and had a fallback to the original .setObject call, I could get everything to pass the test suite without a noticeable performance overhead (still measuring the latest MySQL performance as I write this).&lt;/p&gt;

&lt;p&gt;Although it will probably slow everyone down a little, having to make these calls, it should be more robust and may make the .setObject calls faster in some situations?&lt;/p&gt;</comment>
                    <comment id="30894" author="seancorfield" created="Sun, 7 Apr 2013 01:24:32 -0500"  >&lt;p&gt;Fixed in 0.3.0-SNAPSHOT. May need to be revisited for performance tweaks later. Uncomfortable with MySQL being a special case here... &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/sad.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                    <comment id="30965" author="seancorfield" created="Wed, 17 Apr 2013 18:48:14 -0500"  >&lt;p&gt;This fix breaks PostgreSQL and already has MySQL as an exception so I&apos;m going to roll it back and we&apos;ll have to find another way to support Teradata I&apos;m afraid!).&lt;/p&gt;</comment>
                    <comment id="30981" author="pmoriarty" created="Mon, 22 Apr 2013 04:26:18 -0500"  >&lt;p&gt;PostgreSQL also complains about use of setObject with a null object and no parameter type when using protocolVersion 3. &lt;/p&gt;

&lt;p&gt;Seems to work ok with protocolVersion 2 though.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[JDBC-51] Reflection warning removal</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-51</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Before releasing 0.3.0, make a pass over the code and remove reflection where reasonable.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16130">JDBC-51</key>
            <summary>Reflection warning removal</summary>
                <type id="3" iconUrl="http://dev.clojure.org/jira/images/icons/task.gif">Task</type>
                                <priority id="2" iconUrl="http://dev.clojure.org/jira/images/icons/priority_critical.gif">Critical</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Sun, 7 Apr 2013 14:22:07 -0500</created>
                <updated>Fri, 19 Apr 2013 21:52:53 -0500</updated>
                    <resolved>Fri, 19 Apr 2013 21:52:53 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30979" author="seancorfield" created="Fri, 19 Apr 2013 21:52:53 -0500"  >&lt;p&gt;Declared get-connection to return Connection in 0.3.0-alpha2.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[JDBC-52] Allow execute! to do batch updates via :multi? optional argument</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-52</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;See &lt;a href=&quot;https://groups.google.com/d/msg/clojure-java-jdbc/H3spAaWgkZI/9WJPXJsHiVsJ&quot;&gt;https://groups.google.com/d/msg/clojure-java-jdbc/H3spAaWgkZI/9WJPXJsHiVsJ&lt;/a&gt; for background and justification.&lt;/p&gt;

&lt;p&gt;execute! would take an optional :multi? argument, default false, and execute-helper would either call db-do-prepared directly (as it does now) or apply it, assuming (rest sql-params) is a sequence of vectors, which would become multiple params-groups.&lt;/p&gt;

&lt;p&gt;I think this would also allow insert! to be simplified and implemented in terms of execute! which would be a nice symmetry.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16151">JDBC-52</key>
            <summary>Allow execute! to do batch updates via :multi? optional argument</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Apr 2013 18:18:25 -0500</created>
                <updated>Fri, 19 Apr 2013 21:18:09 -0500</updated>
                    <resolved>Fri, 19 Apr 2013 21:18:09 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30977" author="seancorfield" created="Fri, 19 Apr 2013 21:18:09 -0500"  >&lt;p&gt;Implemented. Will be in alpha2.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-43] Rewrite old API (with *db*) in terms of new API</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-43</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Now that the new API exists, the old API should be rewritten in terms of the new API, passing &lt;b&gt;db&lt;/b&gt; and binding it appropriately. Where no new equivalent exists, extend the new API (in particular, the form of insert that just provides rows without column names is not supported in the new API).&lt;/p&gt;</description>
                <environment></environment>
            <key id="15924">JDBC-43</key>
            <summary>Rewrite old API (with *db*) in terms of new API</summary>
                <type id="3" iconUrl="http://dev.clojure.org/jira/images/icons/task.gif">Task</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Dec 2012 15:46:42 -0600</created>
                <updated>Sun, 7 Apr 2013 14:23:17 -0500</updated>
                    <resolved>Sun, 7 Apr 2013 14:23:17 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30337" author="seancorfield" created="Sun, 30 Dec 2012 19:51:56 -0600"  >&lt;p&gt;Most of this has been done now. It needs extensive testing!&lt;/p&gt;</comment>
                    <comment id="30614" author="gerrard.mcnulty@gmail.com" created="Mon, 18 Feb 2013 16:05:16 -0600"  >&lt;p&gt;When are you planning on making a stable release?  Are the new APIs going to change at all?&lt;/p&gt;</comment>
                    <comment id="30621" author="seancorfield" created="Tue, 19 Feb 2013 18:41:03 -0600"  >&lt;p&gt;There are still a number of open tickets that need completing before I can call this a stable release. Folks are welcome to test the SNAPSHOT release on Sonatype and provide feedback.&lt;/p&gt;</comment>
                    <comment id="30901" author="seancorfield" created="Sun, 7 Apr 2013 14:23:17 -0500"  >&lt;p&gt;0.3.0-alpha1 has been released so this is &quot;done&quot;. What&apos;s left is polishing and bug fixing.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[JDBC-41] How to preserve order of rows?</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-41</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;I&apos;d like to get the ordered record set within with-query-results&lt;br/&gt;
(or the way to restore the original order).&lt;br/&gt;
Is this possible with clojure/java.jdbc?&lt;/p&gt;</description>
                <environment></environment>
            <key id="15921">JDBC-41</key>
            <summary>How to preserve order of rows?</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="kostafey">Konstantin</reporter>
                        <labels>
                    </labels>
                <created>Mon, 24 Dec 2012 03:32:47 -0600</created>
                <updated>Sun, 7 Apr 2013 03:38:00 -0500</updated>
                    <resolved>Sun, 7 Apr 2013 03:38:00 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30315" author="seancorfield" created="Mon, 24 Dec 2012 12:49:52 -0600"  >&lt;p&gt;I assume you mean the order of columns within the rows, not the actual order of rows within the result set?&lt;/p&gt;

&lt;p&gt;I&apos;m looking at providing an alternative result set format using arrays instead of maps which will preserve column orders.&lt;/p&gt;

&lt;p&gt;Since maps are unordered by default in Clojure, I&apos;d be suspicious of code that relies on ordering of keys (so I&apos;m reducing this to &apos;minor&apos;).&lt;/p&gt;</comment>
                    <comment id="30319" author="kostafey" created="Mon, 24 Dec 2012 22:54:46 -0600"  >&lt;p&gt;You are right, I mean the order of columns, not the rows.&lt;/p&gt;

&lt;p&gt;I understand, that maps are unordered. There are few reasons when&lt;br/&gt;
the order is matters. The one of them is my task - simple&lt;br/&gt;
SQL database client.&lt;/p&gt;

&lt;p&gt;Probably it would be better to do this possibility optional,&lt;br/&gt;
since it is not used very often?&lt;/p&gt;</comment>
                    <comment id="30322" author="seancorfield" created="Tue, 25 Dec 2012 20:26:42 -0600"  >&lt;p&gt;An optional keyword argument sounds like a reasonable compromise. I&apos;m already looking at keyword arguments on resultset-seq for returning arrays instead of maps and returning an order-preserving map should be as simple as replacing (zipmap keys (row-values)) with (apply array-map (interleave keys (row-values)))&lt;/p&gt;</comment>
                    <comment id="30898" author="seancorfield" created="Sun, 7 Apr 2013 03:38:00 -0500"  >&lt;p&gt;Fixed in 0.3.0-SNAPSHOT by allowing :as-arrays argument to query and result-set-seq functions, which returns result as vector of column names, followed by vectors for each row.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-42] insert! always uses a transaction</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-42</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;execute! delete! and update! all accept an optional :transaction? argument that allows you to control whether the operation occurs in a transaction or not.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15923">JDBC-42</key>
            <summary>insert! always uses a transaction</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Dec 2012 15:42:36 -0600</created>
                <updated>Sat, 6 Apr 2013 18:53:54 -0500</updated>
                    <resolved>Sat, 6 Apr 2013 18:53:54 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30892" author="seancorfield" created="Sat, 6 Apr 2013 18:53:54 -0500"  >&lt;p&gt;Fixed in 0.3.0-SNAPSHOT - :transaction? argument is now supported on insert!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-45] insert! (and insert) need to support insert of full rows with no column names</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-45</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;In order to fully deprecate insert-values (and to deprecate insert-rows at all), the new insert logic needs to support lack of column names.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15927">JDBC-45</key>
            <summary>insert! (and insert) need to support insert of full rows with no column names</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Thu, 27 Dec 2012 14:58:59 -0600</created>
                <updated>Sat, 6 Apr 2013 16:38:43 -0500</updated>
                    <resolved>Sat, 6 Apr 2013 16:38:43 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30889" author="seancorfield" created="Sat, 6 Apr 2013 16:38:43 -0500"  >&lt;p&gt;Fixed in 0.3.0-SNAPSHOT and insert-values / insert-rows are fully deprecated.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-49] jdbc insert-records can not handle spaces in columnames</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-49</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>
&lt;p&gt;If a database contains column-names that include spaces an sql/insert-record will fail. However, inserting via sql/do-commands or sql/insert-rows works as expected.&lt;/p&gt;

&lt;p&gt;Attached you find a file showing the error.&lt;/p&gt;</description>
                <environment>Postgres on Debian</environment>
            <key id="16099">JDBC-49</key>
            <summary>jdbc insert-records can not handle spaces in columnames</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="cvkemenade">Cees van Kemenade</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Thu, 21 Mar 2013 13:42:35 -0500</created>
                <updated>Sat, 6 Apr 2013 16:14:41 -0500</updated>
                    <resolved>Sat, 6 Apr 2013 16:14:41 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30802" author="cvkemenade" created="Fri, 22 Mar 2013 01:21:00 -0500"  >&lt;p&gt;Further analysis based on a suggestion of Sean leads to:&lt;/p&gt;

&lt;p&gt;It seems to be that there is an issue in the naming-strategy in this issue. Either in the way I define it of the way it is implemented&lt;br/&gt;
 (sql/with-connection db&lt;br/&gt;
       (sql/with-naming-strategy {:keyword identity :entity (fn &lt;span class=&quot;error&quot;&gt;&amp;#91;x&amp;#93;&lt;/span&gt; (str \&quot; x \&quot;))}&lt;br/&gt;
        ...&lt;br/&gt;
))&lt;/p&gt;

&lt;p&gt;When I remove the naming-strategy and replace the offending insert by a manual quoting strategy via&lt;br/&gt;
 (sql/insert-records  &quot;test_jdbc_naming3&quot; {((fn [x] (str \&quot; x \&quot;)) &quot;b- b&quot;) 7})&lt;br/&gt;
which corresponds to&lt;br/&gt;
(sql/insert-records  &quot;test_jdbc_naming3&quot; {&quot;\&quot;b- b\&quot;&quot; 7})&lt;br/&gt;
then the code runs fine.&lt;/p&gt;

&lt;p&gt;So the issue is located in the handling of the naming-strategy, or in the way I defined the naming-strategy (for postgres).&lt;/p&gt;</comment>
                    <comment id="30888" author="seancorfield" created="Sat, 6 Apr 2013 16:14:41 -0500"  >&lt;p&gt;Fixed in 0.3.0-SNAPSHOT by wiring &lt;b&gt;as-str&lt;/b&gt; variable into compatibility layer as :entities argument.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11924" name="jdbcIssue2.clj" size="2615" author="cvkemenade" created="Thu, 21 Mar 2013 14:35:07 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-50] insert-rows (incorrectly) patches incomplete records</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-50</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;When using sql/insert-rows with a dataset that contains incomplete rows the rows will be patched with values from the preceding rows. The behaviour to be expected is not documented.&lt;/p&gt;

&lt;p&gt;I would expect insert-rows either only accepts complete rows. When accepting incomplete rows I would expect patching with nil-values instead of values from other rows.&lt;/p&gt;

&lt;p&gt;Attached you find an example and the output when running in comments.&lt;/p&gt;
</description>
                <environment>Postgres database on Debian machine</environment>
            <key id="16098">JDBC-50</key>
            <summary>insert-rows (incorrectly) patches incomplete records</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="cvkemenade">Cees van Kemenade</reporter>
                        <labels>
                        <label>bug</label>
                        <label>docs</label>
                    </labels>
                <created>Thu, 21 Mar 2013 13:38:32 -0500</created>
                <updated>Sat, 6 Apr 2013 15:38:46 -0500</updated>
                    <resolved>Sat, 6 Apr 2013 15:38:46 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30886" author="seancorfield" created="Sat, 6 Apr 2013 15:10:42 -0500"  >&lt;p&gt;This looks like an old / long-standing bug that no one has run into before.&lt;/p&gt;

&lt;p&gt;In the new (soon-to-be 0.3.0) release, (clojure.java.jdbc.sql/insert :table &lt;span class=&quot;error&quot;&gt;&amp;#91;1 1&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt; []) would throw an exception:&lt;/p&gt;

&lt;p&gt;IllegalArgumentException insert called with inconsistent number of columns / values  clojure.java.jdbc.sql/insert-multi-row (sql.clj:116)&lt;/p&gt;

&lt;p&gt;I will update clojure.java.jdbc/insert-rows to throw a similar exception.&lt;/p&gt;</comment>
                    <comment id="30887" author="seancorfield" created="Sat, 6 Apr 2013 15:38:46 -0500"  >&lt;p&gt;Fixed in 0.3.0-SNAPSHOT by throwing an exception if the value-groups are not all the same length.&lt;/p&gt;

&lt;p&gt;Currently relies on the DB to trap column names not matching value groups (which is known not to work on SQLite but does work on other DBs as far as I know).&lt;/p&gt;

&lt;p&gt;insert-rows is deprecated in 0.3.0 - use insert! instead going  forward (which does more validation).&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11922" name="jdbcIssue.clj" size="855" author="cvkemenade" created="Thu, 21 Mar 2013 13:38:32 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-48] Support stored procedures with CallableStatement</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-48</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;JDBC&apos;s &lt;tt&gt;CallableStatement&lt;/tt&gt; provides support for calling stored procedures. More specifically, it allows you to register OUT parameters which will become the statements (possibly many) &lt;tt&gt;ResultSet&lt;/tt&gt; objects. A &lt;tt&gt;CallableStatement&lt;/tt&gt; &lt;em&gt;is a&lt;/em&gt; &lt;tt&gt;PreparedStatement&lt;/tt&gt;, so I am hoping there wont be too much involved with regard to executing them. The main difference is being able to register and consume OUT parameters.&lt;/p&gt;

&lt;p&gt;I&apos;ll be hacking on this, so patches are forthcoming. Any input is appreciated.&lt;/p&gt;</description>
                <environment></environment>
            <key id="16090">JDBC-48</key>
            <summary>Support stored procedures with CallableStatement</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="jeremyheiler">Jeremy Heiler</reporter>
                        <labels>
                    </labels>
                <created>Fri, 15 Mar 2013 13:50:23 -0500</created>
                <updated>Fri, 15 Mar 2013 22:51:30 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="30767" author="seancorfield" created="Fri, 15 Mar 2013 22:51:30 -0500"  >&lt;p&gt;I&apos;ve never used stored procs (I don&apos;t like the complexity that I&apos;ve seen them add to version control, change management and deployment) so I&apos;m afraid I can&apos;t offer any input - but I really appreciate you taking this on! Thank you!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-47] Transactions do not rollback on non-Exception Throwables</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-47</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;&lt;tt&gt;transaction*&lt;/tt&gt; currently catches Exceptions for its rollback logic. This means Throwables subclassing &lt;tt&gt;java.lang.Error&lt;/tt&gt; are not caught, and indeed the transaction seems to be immediately committed in this case (at least if the connection has autocommit set to true).&lt;/p&gt;

&lt;p&gt;This happened to me in the case of an &lt;tt&gt;OutOfMemoryError&lt;/tt&gt;. Another example is that the following code commits:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(transaction
  (insert-records &quot;table&quot; {:foo 12})
  (assert false))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Presumably this can be fixed by catching &lt;tt&gt;Throwable&lt;/tt&gt; instead of &lt;tt&gt;Exception&lt;/tt&gt;. I&apos;ll prepare a patch to that effect.&lt;/p&gt;</description>
                <environment>0.2.3</environment>
            <key id="16029">JDBC-47</key>
            <summary>Transactions do not rollback on non-Exception Throwables</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="gfredericks">Gary Fredericks</reporter>
                        <labels>
                    </labels>
                <created>Tue, 26 Feb 2013 16:31:31 -0600</created>
                <updated>Tue, 26 Feb 2013 20:08:45 -0600</updated>
                    <resolved>Tue, 26 Feb 2013 20:08:45 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30664" author="seancorfield" created="Tue, 26 Feb 2013 16:48:46 -0600"  >&lt;p&gt;Thanx Gary. In the latest source there may be two pieces of transaction logic so please check for anywhere else that Exception is mentioned!&lt;/p&gt;</comment>
                    <comment id="30665" author="gfredericks" created="Tue, 26 Feb 2013 17:17:26 -0600"  >&lt;p&gt;This patch changes &lt;tt&gt;Exception&lt;/tt&gt; to &lt;tt&gt;Throwable&lt;/tt&gt; in two places &amp;#8211; &lt;tt&gt;transaction*&lt;/tt&gt; and &lt;tt&gt;db-transaction*&lt;/tt&gt;. The tests pass.&lt;/p&gt;</comment>
                    <comment id="30666" author="seancorfield" created="Tue, 26 Feb 2013 20:08:45 -0600"  >&lt;p&gt;Patch applied.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11876" name="JDBC-47-p1.patch" size="1488" author="gfredericks" created="Tue, 26 Feb 2013 17:17:26 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-38] There is no way to execute a raw statement outside a transaction</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-38</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;To be able to enforce foreign key constraints in SQLite you need to execute the following statement:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;PRAGMA foreign_keys = ON;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However, this statement can&apos;t be used from within a transaction. From the SQLite docs:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It is not possible to enable or disable foreign key constraints in the middle of a multi-statement transaction (when SQLite is not in autocommit mode). Attempting to do so does not return an error; it simply has no effect. &lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;In &lt;tt&gt;clojure.java.jdbc&lt;/tt&gt; both &lt;tt&gt;do-commands&lt;/tt&gt; and &lt;tt&gt;do-prepared&lt;/tt&gt; unconditionally run the supplied statements in a transaction. To me it seems like these two functions are the only ones that provide a way to execute an arbitrary SQL statement.&lt;/p&gt;

&lt;p&gt;Example using &lt;tt&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;org.clojure/java.jdbc &amp;quot;0.2.3&amp;quot;&amp;#93;&lt;/span&gt;&lt;/tt&gt; and &lt;tt&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;org.xerial/sqlite-jdbc &amp;quot;3.7.2&amp;quot;&amp;#93;&lt;/span&gt;&lt;/tt&gt;:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(sql/with-connection {:classname   &lt;span class=&quot;code-quote&quot;&gt;&quot;org.sqlite.JDBC&quot;&lt;/span&gt;
                      :subprotocol &lt;span class=&quot;code-quote&quot;&gt;&quot;sqlite&quot;&lt;/span&gt;
                      :subname     &lt;span class=&quot;code-quote&quot;&gt;&quot;foo.db&quot;&lt;/span&gt;}
  (sql/&lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt;-commands &lt;span class=&quot;code-quote&quot;&gt;&quot;PRAGMA foreign_keys = ON;&quot;&lt;/span&gt;)
  (sql/with-query-results res [&lt;span class=&quot;code-quote&quot;&gt;&quot;PRAGMA foreign_keys;&quot;&lt;/span&gt;]
    (doall res)))
; =&amp;gt; ({:foreign_keys 0})&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When using this function instead of &lt;tt&gt;do-commands&lt;/tt&gt; foreign keys work as expected:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(defn &lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt;-raw  [&amp;amp; commands]
  (with-open [^java.sql.Statement stmt (let [^java.sql.Connection con (sql/connection)] (.createStatement con))]
    (doseq [^&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; cmd commands]
      (.addBatch stmt cmd))
    (let [result (.executeBatch stmt)]
      (&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (and (= 1 (count result)) (= -2 (first result)))
        (list (.getUpdateCount stmt))
        (seq result)))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This function is simply &lt;tt&gt;do-commands&lt;/tt&gt; with &lt;tt&gt;execute-batch&lt;/tt&gt; inlined and the wrapping &lt;tt&gt;transaction&lt;/tt&gt; form removed.&lt;/p&gt;</description>
                <environment>Dependencies used:&lt;br/&gt;
&lt;br/&gt;
[org.clojure/clojure &amp;quot;1.4.0&amp;quot;]&lt;br/&gt;
[org.clojure/java.jdbc &amp;quot;0.2.3&amp;quot;]&lt;br/&gt;
[org.xerial/sqlite-jdbc &amp;quot;3.7.2&amp;quot;]</environment>
            <key id="15627">JDBC-38</key>
            <summary>There is no way to execute a raw statement outside a transaction</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="raek">Rasmus Svensson</reporter>
                        <labels>
                    </labels>
                <created>Sun, 12 Aug 2012 16:27:56 -0500</created>
                <updated>Thu, 27 Dec 2012 07:03:44 -0600</updated>
                    <resolved>Wed, 26 Dec 2012 16:11:35 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="29121" author="seancorfield" created="Sun, 12 Aug 2012 21:33:41 -0500"  >&lt;p&gt;It seems like the more flexible thing to do would be to allow users to specify that a transaction not be used on the existing operations. I&apos;m reworking the API substantially soon so I&apos;ll bear that in mind. I might not make it possible with the existing API but I&apos;ll make sure that&apos;s an option in the new API that I&apos;m adding.&lt;/p&gt;</comment>
                    <comment id="30327" author="seancorfield" created="Wed, 26 Dec 2012 16:11:35 -0600"  >&lt;p&gt;0.2.4-SNAPSHOT contains db-do-commands which allows bare execution of commands against a specific database connection with or without a transaction wrapping the commands.&lt;/p&gt;</comment>
                    <comment id="30331" author="raek" created="Thu, 27 Dec 2012 07:03:44 -0600"  >&lt;p&gt;Neat! &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-44] Add db-do-commands to match new API</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-44</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;New version of do-commands but with db explicitly passed in and transaction? argument - this will satisfy &lt;a href=&quot;http://dev.clojure.org/jira/browse/JDBC-38&quot; title=&quot;There is no way to execute a raw statement outside a transaction&quot;&gt;&lt;del&gt;JDBC-38&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15925">JDBC-44</key>
            <summary>Add db-do-commands to match new API</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Dec 2012 15:59:26 -0600</created>
                <updated>Wed, 26 Dec 2012 16:10:17 -0600</updated>
                    <resolved>Wed, 26 Dec 2012 16:10:17 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30326" author="seancorfield" created="Wed, 26 Dec 2012 16:10:17 -0600"  >&lt;p&gt;db-do-commands added&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-20] Create new clean API that accepts connection etc (post 0.1.0)</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-20</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Create streamlined API that relies on no bindings but instead accepts everything as an argument. Refactor existing API methods to operate in terms of this new API as appropriate.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14697">JDBC-20</key>
            <summary>Create new clean API that accepts connection etc (post 0.1.0)</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Wed, 12 Oct 2011 16:26:05 -0500</created>
                <updated>Wed, 26 Dec 2012 15:41:14 -0600</updated>
                    <resolved>Wed, 26 Dec 2012 15:41:14 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="26946" author="seancorfield" created="Wed, 12 Oct 2011 16:28:22 -0500"  >&lt;p&gt;See &lt;a href=&quot;http://dev.clojure.org/jira/browse/JDBC-3&quot; title=&quot;Inconsistency between tuples and regular maps&quot;&gt;&lt;del&gt;JDBC-3&lt;/del&gt;&lt;/a&gt; for some more background.&lt;/p&gt;</comment>
                    <comment id="30325" author="seancorfield" created="Wed, 26 Dec 2012 15:41:14 -0600"  >&lt;p&gt;The new API has been added. There is also an optional DSL to make it slightly easier to generate SQL that can be used with both the original and the new API.&lt;/p&gt;

&lt;p&gt;I will open tickets for follow-up issues.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-35] Wrong timezone for java.sql.Date, java.sql.Time and java.sql.Timestamp objects returned by with-query-results</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-35</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Our database stores date and time related information in UTC. But, the results from &lt;tt&gt;with-query-results&lt;/tt&gt; creates objects in the local timezone. This is causing a lot of unexpected behavior when constructing Joda &lt;tt&gt;DateTime&lt;/tt&gt; objects in &lt;tt&gt;clj-time&lt;/tt&gt;.  Currently, the &lt;tt&gt;with-query-results&lt;/tt&gt; function is using the single argument getter functions in the &lt;tt&gt;ResultSet&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;	&lt;tt&gt;getDate(int columnIndex)&lt;/tt&gt;&lt;br/&gt;
	&lt;tt&gt;getTime(int columnIndex)&lt;/tt&gt;&lt;br/&gt;
	&lt;tt&gt;getTimestamp(int columnIndex)&lt;/tt&gt; &lt;/p&gt;

&lt;p&gt;We can solve this problem if we can optionally pass the timezone information and call the two argument getter functions.&lt;/p&gt;

&lt;p&gt;	&lt;tt&gt;getDate(int columnIndex, Calendar cal)&lt;/tt&gt; &lt;br/&gt;
	&lt;tt&gt;getTime(int columnIndex, Calendar cal)&lt;/tt&gt; &lt;br/&gt;
	&lt;tt&gt;getTimestamp(int columnIndex, Calendar cal)&lt;/tt&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15583">JDBC-35</key>
            <summary>Wrong timezone for java.sql.Date, java.sql.Time and java.sql.Timestamp objects returned by with-query-results</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="jestinepaul">Jestine Paul</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Fri, 20 Jul 2012 10:31:09 -0500</created>
                <updated>Wed, 12 Sep 2012 20:01:37 -0500</updated>
                    <resolved>Wed, 12 Sep 2012 20:01:37 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29016" author="seancorfield" created="Sat, 21 Jul 2012 01:30:19 -0500"  >&lt;p&gt;Can you provide a self-contained test case? Lots of people are using java.jdbc in production without running into this problem, and at World Singles we&apos;ve had this in production for a long time in a high traffic environment without seeing any problems with timezones. Dates go in and out of the database unchanged, which is exactly as expected - and we have databases running in three different timezones.&lt;/p&gt;</comment>
                    <comment id="29017" author="jestinepaul" created="Sat, 21 Jul 2012 05:29:05 -0500"  >&lt;p&gt;I have added a new test and it is failing with my Postgresql.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/jestinepaul/java.jdbc/commit/195397b1b2a0245d2439ab9963fe2138450a27f3&quot;&gt;https://github.com/jestinepaul/java.jdbc/commit/195397b1b2a0245d2439ab9963fe2138450a27f3&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="29020" author="seancorfield" created="Sat, 21 Jul 2012 13:03:48 -0500"  >&lt;p&gt;Looking at recommended practices out there, such as listed here: &lt;a href=&quot;http://stackoverflow.com/questions/2532729/daylight-saving-time-and-timezone-best-practices&quot;&gt;http://stackoverflow.com/questions/2532729/daylight-saving-time-and-timezone-best-practices&lt;/a&gt; one important thing is: &quot;On Servers, set hardware clocks and OS clocks to UTC. Use NTP services on all servers.&quot; The same advice is repeated here: &lt;a href=&quot;http://www.dbspecialists.com/blog/database-theory/intelligent-date-handling/&quot;&gt;http://www.dbspecialists.com/blog/database-theory/intelligent-date-handling/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking further into PostgreSQL (a database I generally don&apos;t use), I see this: &lt;a href=&quot;http://stackoverflow.com/questions/6151084/which-timestamp-type-to-choose-in-a-postgresql-database&quot;&gt;http://stackoverflow.com/questions/6151084/which-timestamp-type-to-choose-in-a-postgresql-database&lt;/a&gt; which seems to contain a lot of PostgreSQL-specific stuff. However, that article makes it clear that you need to set the database timezone to UTC in order to SELECT timestamp columns correctly.&lt;/p&gt;

&lt;p&gt;In my opinion, the behavior you&apos;re seeing is not a bug (in java.jdbc) but an artifact of your environment being set up incorrectly. I&apos;ll leave this ticket open for a little while for more discussion but without a concrete patch that is shown to not affect other use cases, I will close this ticket by the end of August.&lt;/p&gt;</comment>
                    <comment id="29033" author="jestinepaul" created="Mon, 23 Jul 2012 13:26:04 -0500"  >&lt;p&gt;As mentioned earlier, the database server timezone is in UTC and the JDBC library runs on a client machine set to local time. If the database has a date value of 2012-7-23, it changes to 2012-7-22 on the client side (if the client is running at timezone greater than UTC) when coerced using &lt;tt&gt;to-date-time&lt;/tt&gt; in &lt;tt&gt;clj-time&lt;/tt&gt;. This is extremely dangerous and is not specific to any database. I noticed it first on Sybase Enterprise Server and I have now also replicated it in the test case with Postgresql.&lt;/p&gt;

&lt;p&gt;I have attached a patch which fixes this problem by passing in an optional parameter. The test case is also modified to use &lt;tt&gt;clj-time&lt;/tt&gt;, as it expresses the problem more clearly. Please let me know if you need any more clarification.&lt;/p&gt;

&lt;p&gt;p.s. I have already mailed the CA and should reach Durham in a few days.&lt;/p&gt;</comment>
                    <comment id="29431" author="seancorfield" created="Wed, 12 Sep 2012 20:01:26 -0500"  >&lt;p&gt;Since the proposed patch requires the user to pass in a list of columns to treat specially - and reorders columns in results and adds some performance overhead for all users, not just those wanting to adjust column values - I believe users who choose to run JDBC clients in timezones different to the database, against the widely-listed best practice recommendations, should bear the burden of adjusting the columns themselves in their own client code. Since they already know which columns to adjust and they know the difference between UTC and local time, they should be able to make the adjustments easily enough as part of post-processing the resultset-seq.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11394" name="resultset-timezone.diff" size="7215" author="jestinepaul" created="Mon, 23 Jul 2012 13:24:52 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-39] Boolean - BIT(1) - columns are returned as byte[] via some DB connections</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-39</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;The root cause appears to be that rs.getObject( i ) seems to take the field flags into effect over the basic java.sql.Types values.&lt;/p&gt;

&lt;p&gt;In this case a BIT(1) column comes back from MySQL as type 16 (BOOLEAN), flags UNSIGNED. From Tungsten it comes back as type 16, flags BINARY BLOB UNSIGNED.&lt;/p&gt;

&lt;p&gt;The resultset-seq construction code is pretty cavalier about using just getObject() instead of more specific types so this might be the start of a smarter approach to that.&lt;/p&gt;</description>
                <environment>Specifically using the MySQL connector 5.0.x or 5.1.x against a Tungsten Connector proxy</environment>
            <key id="15689">JDBC-39</key>
            <summary>Boolean - BIT(1) - columns are returned as byte[] via some DB connections</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Sep 2012 16:26:28 -0500</created>
                <updated>Wed, 12 Sep 2012 19:52:05 -0500</updated>
                    <resolved>Wed, 12 Sep 2012 19:52:05 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29420" author="seancorfield" created="Mon, 10 Sep 2012 17:51:22 -0500"  >&lt;p&gt;Further update: this looks to be a configuration or version issue with the Tungsten Connector setup as we&apos;ve been able to repro the problem in one environment but it works as expected in a newer environment.&lt;/p&gt;

&lt;p&gt;May still go ahead with this change anyway since I believe it&apos;s a good change for robustness, but it looks lower priority right now.&lt;/p&gt;</comment>
                    <comment id="29421" author="seancorfield" created="Mon, 10 Sep 2012 18:51:28 -0500"  >&lt;p&gt;Pushed a fix for this but would like more hands on this in SNAPSHOT form before declaring it resolved.&lt;/p&gt;</comment>
                    <comment id="29422" author="seancorfield" created="Mon, 10 Sep 2012 19:46:33 -0500"  >&lt;p&gt;Tungsten&apos;s Connector defeats this fix. Even tho&apos; the fields have an underlying mysqlType value of 16 (BOOLEAN), (.getColumnType) returns -3 (byte[] presumably) so Boolean is not forced as I had hoped.&lt;/p&gt;</comment>
                    <comment id="29429" author="seancorfield" created="Wed, 12 Sep 2012 19:51:48 -0500"  >&lt;p&gt;The underlying behavior is a quirk of the Tungsten Connector configuration which we believe we&apos;ve successfully corrected. Given the result of (.getColumnType) is -3, I&apos;m not sure anything could be done in code to address this, so I&apos;m going to resolve this as invalid.&lt;/p&gt;</comment>
                    <comment id="29430" author="seancorfield" created="Wed, 12 Sep 2012 19:52:05 -0500"  >&lt;p&gt;Not a code issue.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-18] Consider [&quot;name = ? and age = ?&quot; nil 42]</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-18</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;The query is &quot;name = nil and age = 42&quot; where the intent is probably &quot;name is null and age = 42&quot;.&lt;/p&gt;

&lt;p&gt;It&apos;s not clear whether this is really the library&apos;s responsibility (to rewrite the SQL) or whether this should be handled by another layer above so this ticket is a placeholder for discussion.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14691">JDBC-18</key>
            <summary>Consider [&quot;name = ? and age = ?&quot; nil 42]</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Oct 2011 13:32:24 -0500</created>
                <updated>Sun, 12 Aug 2012 21:39:36 -0500</updated>
                    <resolved>Sun, 12 Aug 2012 21:39:36 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="26960" author="julian" created="Thu, 13 Oct 2011 13:43:00 -0500"  >&lt;p&gt;I&apos;ve been thinking about this a bit more, and I&apos;m thinking that a function &quot;match-clause&quot; might deal with this in a fairly composable way.  So&lt;/p&gt;

&lt;p&gt;(match-clause { :name nil :age 42 })&lt;/p&gt;

&lt;p&gt;would return&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;Name is null and Age = ?&amp;quot; 42&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;It&apos;s not exactly ClojureQL, but it&apos;s non-invasive and makes query-by-example easy to achieve.&lt;/p&gt;</comment>
                    <comment id="26961" author="seancorfield" created="Thu, 13 Oct 2011 14:28:15 -0500"  >&lt;p&gt;That&apos;s nice idea. I actually do something similar in the CRUD wrapper I built around java.jdbc at World Singles so that might be a nice addition to the library.&lt;/p&gt;</comment>
                    <comment id="29124" author="seancorfield" created="Sun, 12 Aug 2012 21:39:04 -0500"  >&lt;p&gt;This will be incorporated into the new API I&apos;m adding in &lt;a href=&quot;http://dev.clojure.org/jira/browse/JDBC-20&quot; title=&quot;Create new clean API that accepts connection etc (post 0.1.0)&quot;&gt;&lt;del&gt;JDBC-20&lt;/del&gt;&lt;/a&gt; so you can say (where {:name nil :age 42}) and it will return the correct SQL where clause. Accordingly, I&apos;m closing this as a duplicate.&lt;/p&gt;</comment>
                    <comment id="29125" author="seancorfield" created="Sun, 12 Aug 2012 21:39:36 -0500"  >&lt;p&gt;A subset of what will be implemented as part of &lt;a href=&quot;http://dev.clojure.org/jira/browse/JDBC-20&quot; title=&quot;Create new clean API that accepts connection etc (post 0.1.0)&quot;&gt;&lt;del&gt;JDBC-20&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-36] using exisiting java based connection pool in clojure</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-36</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;We have a connection pool in Java and would like to use the same for our complete project where code is mixture of Clojure/Java. &lt;/p&gt;

&lt;p&gt;(def db (ConnectionManager/getConnection)) ; #&amp;lt;ConnectionHandle com.jolbox.bonecp.ConnectionHandle@53371566&amp;gt; connection type we get after excuting this line&lt;br/&gt;
sql/with-connection db&lt;br/&gt;
    (sql/with-query-results res &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;select * from DummyTable where rownum &amp;lt;=100&amp;quot;&amp;#93;&lt;/span&gt; (vec res)&lt;br/&gt;
      (map #(println  (class (val %)) &quot;  &quot; (key %)) (first res))&lt;br/&gt;
      )&lt;br/&gt;
    )&lt;/p&gt;
</description>
                <environment></environment>
            <key id="15589">JDBC-36</key>
            <summary>using exisiting java based connection pool in clojure</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="4m1r">Amir</reporter>
                        <labels>
                    </labels>
                <created>Tue, 24 Jul 2012 02:57:50 -0500</created>
                <updated>Sun, 12 Aug 2012 21:36:24 -0500</updated>
                    <resolved>Sun, 12 Aug 2012 21:36:24 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="29034" author="4m1r" created="Tue, 24 Jul 2012 03:00:23 -0500"  >&lt;p&gt;If we execute the above (with connection - with-query results) i get the following exception&lt;/p&gt;

&lt;p&gt;IllegalArgumentException db-spec com.jolbox.bonecp.ConnectionHandle@53371566 is missing a required parameter  clojure.java.jdbc/get-connection (jdbc.clj:192)&lt;/p&gt;</comment>
                    <comment id="29037" author="seancorfield" created="Tue, 24 Jul 2012 12:34:24 -0500"  >&lt;p&gt;Use the :datasource option to define your db-spec:&lt;/p&gt;

&lt;p&gt;(def db {:datasource bonecpDataSourceObject})&lt;/p&gt;

&lt;p&gt;I looked at the BoneCP docs and I don&apos;t see a ConnectionManager class but if you define the db-spec based on the BoneCPDataSource object, java.jdbc will call getConnection on that object to get a working connection for operations.&lt;/p&gt;</comment>
                    <comment id="29068" author="seancorfield" created="Tue, 31 Jul 2012 19:49:17 -0500"  >&lt;p&gt;Amir, have you had a chance to try my suggestion?&lt;/p&gt;</comment>
                    <comment id="29070" author="4m1r" created="Wed, 1 Aug 2012 02:20:22 -0500"  >&lt;p&gt;Hi Sean,&lt;/p&gt;

&lt;p&gt;No, we moved to clojure based pooling in a while. We thought its better to have all stuff in clojure rather than having java+clojure. But i can give it a try today.&lt;/p&gt;

&lt;p&gt;Thanks for your suggestion. will keep you posted.&lt;/p&gt;

</comment>
                    <comment id="29122" author="seancorfield" created="Sun, 12 Aug 2012 21:35:03 -0500"  >&lt;p&gt;I&apos;ll close this out then Amir, thanx.&lt;/p&gt;</comment>
                    <comment id="29123" author="seancorfield" created="Sun, 12 Aug 2012 21:36:24 -0500"  >&lt;p&gt;I believe there is a way to access the the BoneCP connection pool directly and use it with java.jdbc as-is, however it is no longer an issue for the creator of this ticket.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-34] get-connection&apos;s URI conventions incompatible with PostgreSQL</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-34</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;&lt;tt&gt;get-connection&lt;/tt&gt; requires that provided URIs be structured like so:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;dbtype:&lt;span class=&quot;code-comment&quot;&gt;//user:password@host:port/database&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is often sufficient, but many PostgreSQL URIs require the use of URI parameters to further configure connections.  For example, &lt;a href=&quot;http://postgres.heroku.com&quot;&gt;postgresql.heroku.com&lt;/a&gt; provides JDBC URIs like this:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;jdbc:postgresql:&lt;span class=&quot;code-comment&quot;&gt;//ec2-22-11-231-117.compute-1.amazonaws.com:5432/d1kuttup5cbafl6?user=pcgoxvmssqabye&amp;amp;password=PFZXtxaLFhIX-nCA0Vi4UbJ6lH&amp;amp;ssl=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;...which, when used outside of Heroku&apos;s network, require a further &lt;tt&gt;sslfactory=org.postgresql.ssl.NonValidatingFactory&lt;/tt&gt; parameter.&lt;/p&gt;

&lt;p&gt;The PostgreSQL JDBC driver &lt;a href=&quot;http://jdbc.postgresql.org/documentation/80/connect.html&quot;&gt;supports a number of different URI parameters&lt;/a&gt;, and recommends putting credentials into parameters rather than using the &lt;tt&gt;user:password@&lt;/tt&gt; convention.  Peeking over at the &lt;a href=&quot;http://docs.oracle.com/cd/E14072_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html&quot;&gt;Oracle thin JDBC driver&apos;s docs&lt;/a&gt;, it appears that it expects credentials using its own idiosyncratic convention, &lt;tt&gt;user/password@&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;&amp;lt;opinion&amp;gt;&lt;br/&gt;
This all leads me to think that &lt;tt&gt;get-connection&lt;/tt&gt; should pass URIs along to &lt;tt&gt;DriverManager&lt;/tt&gt; without modification, and leave URI format conventions up to the drivers involved.  For now, my workaround is to do essentially that, using a map like this as input to &lt;tt&gt;with-connection&lt;/tt&gt; et al.:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;{:factory #(DriverManager/getConnection (:url %))
 :url &lt;span class=&quot;code-quote&quot;&gt;&quot;jdbc:postgresql:&lt;span class=&quot;code-comment&quot;&gt;//ec2-22-11-231-117.compute-1.amazonaws.com:5432/d1kuttup5cbafl6?user=pcgoxvmssqabye&amp;amp;password=PFZXtxaLFhIX-nCA0Vi4UbJ6lH&amp;amp;ssl=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&quot;&lt;/span&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That certainly works, but I presume that such a workaround won&apos;t occur to many users, despite the docs/source.&lt;br/&gt;
&amp;lt;/opinion&amp;gt;&lt;/p&gt;

&lt;p&gt;I don&apos;t think I&apos;ve used java.jdbc enough (or RDMBS&apos; enough of late) to comfortably provide a patch (or feel particularly confident in the suggestion above).  Hopefully the report is helpful in any case.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15528">JDBC-34</key>
            <summary>get-connection&apos;s URI conventions incompatible with PostgreSQL</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="cemerick">Chas Emerick</reporter>
                        <labels>
                    </labels>
                <created>Tue, 12 Jun 2012 06:58:39 -0500</created>
                <updated>Tue, 31 Jul 2012 19:46:20 -0500</updated>
                    <resolved>Mon, 18 Jun 2012 15:52:48 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28801" author="seancorfield" created="Thu, 14 Jun 2012 01:36:37 -0500"  >&lt;p&gt;How about an option that takes a map like:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;{:connection-uri &lt;span class=&quot;code-quote&quot;&gt;&quot;jdbc:postgresql:&lt;span class=&quot;code-comment&quot;&gt;//ec2-22-11-231-117.compute-1.amazonaws.com:5432/d1kuttup5cbafl6?user=pcgoxvmssqabye&amp;amp;password=PFZXtxaLFhIX-nCA0Vi4UbJ6lH&amp;amp;ssl=&lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;&quot;&lt;/span&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Essentially as a shorthand for the workaround you&apos;ve come up with?&lt;/p&gt;</comment>
                    <comment id="28824" author="seancorfield" created="Fri, 15 Jun 2012 22:20:00 -0500"  >&lt;p&gt;Try 0.2.3-SNAPSHOT which has support for :connection-uri and let me know if that is a reasonable solution for you?&lt;/p&gt;</comment>
                    <comment id="28865" author="cemerick" created="Mon, 18 Jun 2012 15:35:39 -0500"  >&lt;p&gt;Yup, &lt;tt&gt;0.2.3-SNAPSHOT&lt;/tt&gt;&apos;s &lt;tt&gt;:connection-uri&lt;/tt&gt; works fine.  I&apos;ve since moved on to using a pooled datasource, but this will hopefully be a more obvious path to newcomers than having to learn about &lt;tt&gt;:factory&lt;/tt&gt; and &lt;tt&gt;DriverManager&lt;/tt&gt;.&lt;/p&gt;</comment>
                    <comment id="28866" author="seancorfield" created="Mon, 18 Jun 2012 15:52:48 -0500"  >&lt;p&gt;Resolved by adding :connection-uri option.&lt;/p&gt;</comment>
                    <comment id="29057" author="holo" created="Sat, 28 Jul 2012 20:09:04 -0500"  >&lt;p&gt;accessing an heroku database outside heroku, &quot;sslfactory=org.postgresql.ssl.NonValidatingFactory&quot; doesn&apos;t work. i get &quot;ERROR: syntax error at or near &quot;user&quot; Position: 13 - (class org.postgresql.util.PSQLException&quot;. this happens whether adding it to :subname or :connection-uri Strings&lt;/p&gt;

&lt;p&gt;another minor issue - why the documentation of &quot;with-connection&quot; (0.2.3) refers the following format for the connection string URI:&lt;br/&gt;
&quot;subprotocol://user:password@host:post/subname&lt;br/&gt;
   An optional prefix of jdbc: is allowed.&quot;&lt;br/&gt;
but the URI which can actually be parsed successfully is like the one above: jdbc:postgresql://ec2-22-11-231-117.compute-1.amazonaws.com:5432/d1kuttup5cbafl6?user=pcgoxvmssqabye&amp;amp;password=PFZXtxaLFhIX-nCA0Vi4UbJ6lH&amp;amp;ssl=true&lt;br/&gt;
&quot;subprotocol://user:password@host:post/subname&quot; (format like the DATABASE environment variables on heroku) will not be parsed correctly. why the format for the URI that is used on heroku is not supported by the parser?&lt;/p&gt;

&lt;p&gt;maybe i&apos;m doing something wrong here&lt;/p&gt;

&lt;p&gt;thanks in advance&lt;/p&gt;</comment>
                    <comment id="29058" author="seancorfield" created="Sun, 29 Jul 2012 16:57:53 -0500"  >&lt;p&gt;Carlos, the :connection-uri passes the string directly to the driver with no parsing. The exception you&apos;re seeing is coming from inside the PostgreSQL driver so you&apos;ll have to consult the documentation for the driver.&lt;/p&gt;

&lt;p&gt;The three &quot;URI&quot; styles accepted by java.jdbc are:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;:connection-uri - passed directly to the driver with no parsing or other logic in java.jdbc,&lt;/li&gt;
	&lt;li&gt;:uri - a pre-parsed Java URI object,&lt;/li&gt;
	&lt;li&gt;a string literal - any optional &quot;jdbc:&quot; prefix is ignored, then the string is parsed by logic in java.jdbc, based on the pattern shown (subprotocol://user:password@host:port/subname).&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;If you&apos;re using :connection-uri (which is used on its own), you&apos;re dealing with the JDBC driver directly.&lt;/p&gt;

&lt;p&gt;If you&apos;re using :uri or a bare string literal, you&apos;re dealing with java.jdbc&apos;s parsing (implemented by Phil Hagelberg - of Heroku).&lt;/p&gt;

&lt;p&gt;Hope that clarifies?&lt;/p&gt;</comment>
                    <comment id="29060" author="holo" created="Sun, 29 Jul 2012 20:36:15 -0500"  >&lt;p&gt;Sean, thank you for such comprehensive explanation.&lt;/p&gt;

&lt;p&gt;Still, it didn&apos;t work with any of the options. I used before a postgres JDBC driver to export to the same database (in an SQL modeller - SQLEditor for the MAC) and it worked (though it would connect some times, but others not). The connection String used was like &quot;jdbc:postgresql://host:port/database?user=xxx&amp;amp;password=yyy&amp;amp;ssl=true&amp;amp;sslfactory=org.postgresql.ssl.NonValidatingFactory&quot;. The driver name was &quot;org.postgresql.Driver&quot; (JDBC4). Anyway, time to give up. I will just use a local database.&lt;/p&gt;

&lt;p&gt;Thank you!&lt;/p&gt;</comment>
                    <comment id="29066" author="holo" created="Tue, 31 Jul 2012 19:20:25 -0500"  >&lt;p&gt;Sean, JDBC combinations were working after. i was neglecting an insert operation in a table with a reserved sql keyword &quot;user&quot;, so i was getting a &quot;ERROR: syntax error at or near &quot;user&quot; Position: 13&quot;, and therefore the connection was already established at the time.&lt;/p&gt;

&lt;p&gt;i&apos;m sorry for all the trouble answering the question (&lt;sup&gt;_&lt;/sup&gt;&lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/wink.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;thank you&lt;/p&gt;</comment>
                    <comment id="29067" author="seancorfield" created="Tue, 31 Jul 2012 19:46:20 -0500"  >&lt;p&gt;Glad you got to the bottom of it and confirmed that it wasn&apos;t a problem in java.jdbc!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-33] update-or-insert does not work with oracle</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-33</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;According to the &lt;a href=&quot;http://docs.oracle.com/cd/B28359_01/java.111/b31224/oraperf.htm#autoId17&quot;&gt;oracle documentation&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;For a prepared statement batch, it is not possible to know the number of rows affected in the database by each individual statement in the batch. Therefore, all array elements have a value of -2. According to the JDBC 2.0 specification, a value of -2 indicates that the operation was successful but the number of rows affected is unknown.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;As documented update-values returns (-2) which means that the (if (zero?)) check in update-or-insert-values will never return true.&lt;/p&gt;

&lt;p&gt;Oracle does provide the number of rows updated via an the method &lt;a href=&quot;http://docs.oracle.com/javase/6/docs/api/java/sql/Statement.html#getUpdateCount()&quot;&gt;getUpdateCount&lt;/a&gt; on instances of Statement.&lt;/p&gt;

&lt;p&gt;The following change fixes this problem for oracle users, but I am not sure how it will affect other drivers.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-none&quot;&gt;(defn oracle-do-prepared
  &quot;Executes an (optionally parameterized) SQL prepared statement on the                                           
  open database connection. Each param-group is a seq of values for all of                                        
  the parameters.                                                                                                 
  Return a seq of update counts (one count for each param-group).&quot;
  [sql &amp;amp; param-groups]
  (with-open [^PreparedStatement stmt (prepare-statement (connection) sql)]
    (if (empty? param-groups)
      (transaction* (&#402; [] (vector (.executeUpdate stmt))))
      (do
        (doseq [param-group param-groups]
          (set-parameters stmt param-group)
          (.addBatch stmt))
        (transaction* (&#402; [] (let [result (.executeBatch stmt)
                                  count  (.getUpdateCount stmt)]
                              (vector count))))))))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>clojure 1.3.0&lt;br/&gt;
clojure.java.jdbc 0.2.1&lt;br/&gt;
oracle 10.2.0.4.0</environment>
            <key id="15461">JDBC-33</key>
            <summary>update-or-insert does not work with oracle</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="btatnall">Brian Tatnall</reporter>
                        <labels>
                        <label>bug</label>
                    </labels>
                <created>Mon, 21 May 2012 10:16:40 -0500</created>
                <updated>Sun, 10 Jun 2012 18:13:59 -0500</updated>
                    <resolved>Sun, 10 Jun 2012 18:13:59 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28560" author="seancorfield" created="Tue, 22 May 2012 00:17:49 -0500"  >&lt;p&gt;Interesting. (.getUpdateCount stmt) is a standard part of the JDBC API so it looks reasonable to see if the result of the (.executeBatch stmt) is a single sequence with a -2 value, the code could call (.getUpdateCount stmt) and return that (single) value as a sequence. It looks like that should be completely portable but it will be hard to test since none of the other DBs return -2 as far as I know and I don&apos;t have an Oracle install to test against &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-32] with-connection does not accept standard jdbc URIs.  </title>
                <link>http://dev.clojure.org/jira/browse/JDBC-32</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;with-connect and other functions accepting a db-spec do not support standard jdbc uris, like this one: &lt;/p&gt;

&lt;p&gt;jdbc:mysql://localhost:3306/&amp;lt;database&amp;gt;&lt;/p&gt;

&lt;p&gt;In my environment passing that uri to yields an exception: &lt;/p&gt;

&lt;p&gt;Exception in thread &quot;main&quot; java.lang.NullPointerException&lt;br/&gt;
	at java.lang.Class.forName0(Native Method)&lt;br/&gt;
	at java.lang.Class.forName(Class.java:247)&lt;br/&gt;
	at clojure.lang.RT.loadClassForName(RT.java:2050)&lt;br/&gt;
	at clojure.java.jdbc$get_connection.invoke(jdbc.clj:175)&lt;br/&gt;
	at clojure.java.jdbc$get_connection.invoke(jdbc.clj:166)&lt;br/&gt;
	at clojure.java.jdbc$get_connection.invoke(jdbc.clj:168)&lt;br/&gt;
	at clojure.java.jdbc$with_connection_STAR_.invoke(jdbc.clj:299)&lt;br/&gt;
	at bungle_o.migration$create_exceptions.invoke(migration.clj:17)&lt;br/&gt;
	at bungle_o.migration$_main.invoke(migration.clj:21)&lt;br/&gt;
	at clojure.lang.Var.invoke(Var.java:411)&lt;br/&gt;
	at user$eval191.invoke(NO_SOURCE_FILE:1)&lt;br/&gt;
	at clojure.lang.Compiler.eval(Compiler.java:6511)&lt;br/&gt;
	at clojure.lang.Compiler.eval(Compiler.java:6501)&lt;br/&gt;
	at clojure.lang.Compiler.eval(Compiler.java:6477)&lt;br/&gt;
	at clojure.core$eval.invoke(core.clj:2797)&lt;br/&gt;
	at clojure.main$eval_opt.invoke(main.clj:297)&lt;br/&gt;
	at clojure.main$initialize.invoke(main.clj:316)&lt;br/&gt;
	at clojure.main$null_opt.invoke(main.clj:349)&lt;br/&gt;
	at clojure.main$main.doInvoke(main.clj:427)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:421)&lt;br/&gt;
	at clojure.lang.Var.invoke(Var.java:419)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:163)&lt;br/&gt;
	at clojure.lang.Var.applyTo(Var.java:532)&lt;br/&gt;
	at clojure.main.main(main.java:37)&lt;/p&gt;

&lt;p&gt;This URI works fine, however: &lt;/p&gt;

&lt;p&gt;mysql://localhost:3306/&amp;lt;database&amp;gt;&lt;/p&gt;

&lt;p&gt;Is this intentional or a bug? &lt;/p&gt;

&lt;p&gt;Here&apos;s the mysql documentation for reference: &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html&quot;&gt;http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html&lt;/a&gt;&lt;/p&gt;</description>
                <environment>clojure 1.4.0&lt;br/&gt;
clojure.java.jdbc 0.2.1</environment>
            <key id="15454">JDBC-32</key>
            <summary>with-connection does not accept standard jdbc URIs.  </summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="tyler_jennings">Tyler Jennings</reporter>
                        <labels>
                    </labels>
                <created>Fri, 18 May 2012 07:41:28 -0500</created>
                <updated>Sun, 10 Jun 2012 17:48:51 -0500</updated>
                    <resolved>Sun, 10 Jun 2012 17:48:51 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28771" author="seancorfield" created="Sun, 10 Jun 2012 17:48:51 -0500"  >&lt;p&gt;It was a bug. Thanks for spotting that.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-31] distinct? throws clojure.lang.ArityException, when  applied with no arguments</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-31</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;HSQLDB returns an empty ResultSet when using (.getGeneratedKeys stmt)&lt;br/&gt;
and no keys are generated. So this Exception is thrown for each record&lt;br/&gt;
without generated keys.&lt;/p&gt;

&lt;p&gt;While this Exception is caught in do-prepared-return-keys, this can lead to a huge overhead caused by the JVM exception handling. I did a performance test. &lt;/p&gt;

&lt;p&gt;Before Patch:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;clojure.java.test-jdbc&amp;gt; (time (sql/with-connection hsqldb-db (count (apply sql/insert-records :dummy  (map #(hash-map :name (str %) :id %) (range 10000))))))
&quot;Elapsed time: 3429.346743 msecs&quot;
10000
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After Patch:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; clojure.java.test-jdbc&amp;gt; (time (sql/with-connection hsqldb-db (count (apply sql/insert-records :dummy  (map #(hash-map :name (str %) :id %) (range 10000))))))
&quot;Elapsed time: 1397.444753 msecs&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="15438">JDBC-31</key>
            <summary>distinct? throws clojure.lang.ArityException, when  applied with no arguments</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="juergenhoetzel">J&#252;rgen H&#246;tzel</reporter>
                        <labels>
                        <label>patch,</label>
                        <label>performance</label>
                    </labels>
                <created>Sat, 12 May 2012 11:51:01 -0500</created>
                <updated>Sun, 10 Jun 2012 17:24:42 -0500</updated>
                    <resolved>Sun, 10 Jun 2012 17:24:42 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28770" author="seancorfield" created="Sun, 10 Jun 2012 17:24:42 -0500"  >&lt;p&gt;Thanx for the patch!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11208" name="0001-add-make-cols-unique-test-case-empty-cols.patch" size="906" author="juergenhoetzel" created="Sat, 12 May 2012 11:51:01 -0500" />
                    <attachment id="11209" name="0002-distinct-throws-clojure.lang.ArityException-when-app.patch" size="1576" author="juergenhoetzel" created="Sat, 12 May 2012 11:51:01 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[JDBC-30] Consider to make do-prepared-return-keys public</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-30</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Libraries like Korma, that build upon clojure.java.jdbc depend&lt;br/&gt;
on, or have use cases for do-prepared-return-keys. It&apos;s a useful&lt;br/&gt;
function and we would like to use it. As discussed over here:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/ibdknox/Korma/pull/60#issuecomment-5630604&quot;&gt;https://github.com/ibdknox/Korma/pull/60#issuecomment-5630604&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="15427">JDBC-30</key>
            <summary>Consider to make do-prepared-return-keys public</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="r0man">Roman Scherer</reporter>
                        <labels>
                    </labels>
                <created>Thu, 10 May 2012 13:50:04 -0500</created>
                <updated>Thu, 10 May 2012 14:12:16 -0500</updated>
                    <resolved>Thu, 10 May 2012 14:12:16 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28427" author="seancorfield" created="Thu, 10 May 2012 14:12:16 -0500"  >&lt;p&gt;Made do-prepared-return-keys public. Will cut a new build.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-29] Performance improvement (Remove intermediate lazy sequence in resultset-seq)</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-29</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;This improves performance on large result sets by up to 30%.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15424">JDBC-29</key>
            <summary>Performance improvement (Remove intermediate lazy sequence in resultset-seq)</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="juergenhoetzel">J&#252;rgen H&#246;tzel</reporter>
                        <labels>
                        <label>patch,</label>
                        <label>performance</label>
                    </labels>
                <created>Thu, 10 May 2012 11:21:14 -0500</created>
                <updated>Thu, 10 May 2012 12:09:00 -0500</updated>
                    <resolved>Thu, 10 May 2012 12:09:00 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28422" author="seancorfield" created="Thu, 10 May 2012 12:09:00 -0500"  >&lt;p&gt;Nice catch!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11183" name="0001-Don-t-create-intermediate-lazy-sequences-of-vectors.patch" size="970" author="juergenhoetzel" created="Thu, 10 May 2012 11:21:14 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-26] Add sqlite3 support</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-26</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;sqlite3 has some problems:&lt;/p&gt;

&lt;p&gt;1) PreparedStatements.addBatch does not do anything without some parameters, so executeBatch doesn&apos;t do anything.&lt;br/&gt;
2) Transaction support appears to require closing the ResultSet object from generatedKeys.&lt;/p&gt;

&lt;p&gt;I&apos;ve only tested the included patch with the default test dbs and sqlite3.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15222">JDBC-26</key>
            <summary>Add sqlite3 support</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="xeqi">Nelson Morris</reporter>
                        <labels>
                    </labels>
                <created>Mon, 13 Feb 2012 23:46:14 -0600</created>
                <updated>Mon, 23 Apr 2012 03:35:50 -0500</updated>
                    <resolved>Mon, 23 Apr 2012 03:35:02 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27716" author="seancorfield" created="Tue, 14 Feb 2012 01:01:20 -0600"  >&lt;p&gt;This will break things - see &lt;a href=&quot;http://dev.clojure.org/jira/browse/JDBC-16&quot; title=&quot;do-prepared doesn&amp;#39;t throw on invalid SQL&quot;&gt;&lt;del&gt;JDBC-16&lt;/del&gt;&lt;/a&gt; which required that .addBatch be called when there are no param-groups. I&apos;m not going to reject this out of hand but patches for new database support need testing against MySQL, PostgreSQL and MS SQL Server.&lt;/p&gt;</comment>
                    <comment id="27719" author="xeqi" created="Tue, 14 Feb 2012 13:48:15 -0600"  >&lt;p&gt;Test suite runs correctly for TEST_DBS=mysql,postgres,derby,hsqldb,sqlite3 and TEST_DBS=mysql-str,postgres-str.  This just leaves MS SQL server, which I do not have the ability to run.&lt;/p&gt;

&lt;p&gt;Regarding &lt;a href=&quot;http://dev.clojure.org/jira/browse/JDBC-16&quot; title=&quot;do-prepared doesn&amp;#39;t throw on invalid SQL&quot;&gt;&lt;del&gt;JDBC-16&lt;/del&gt;&lt;/a&gt;, when I revert to just using .executeBatch for the no param-groups case I can see the errors produced in the test-suite.  Using .executeUpdate for the no params-group case continues to fix these errors (note MS SQL server untested).  I do not see any other information in the ticket that would explain why using .executeUpdate instead of .addBatch/.executeBatch for the no params-group case would break &lt;a href=&quot;http://dev.clojure.org/jira/browse/JDBC-16&quot; title=&quot;do-prepared doesn&amp;#39;t throw on invalid SQL&quot;&gt;&lt;del&gt;JDBC-16&lt;/del&gt;&lt;/a&gt;. Is there a reason I am missing?&lt;/p&gt;</comment>
                    <comment id="27762" author="xeqi" created="Fri, 17 Feb 2012 22:05:36 -0600"  >&lt;p&gt;I ran the test suite against an ec2 instance with MS SQL server 2008 R2.  Current test suite on master fails with attached mssql-error.log.  Using patch produces the same output.&lt;/p&gt;

&lt;p&gt;Please let me know if there is anything that you would like changed.&lt;/p&gt;</comment>
                    <comment id="27763" author="seancorfield" created="Fri, 17 Feb 2012 22:14:28 -0600"  >&lt;p&gt;Thanx Nelson. I&apos;ve been a bit busy with work this week but I&apos;ll try to look at this at the weekend. I appreciate your thoroughness on testing this!&lt;/p&gt;</comment>
                    <comment id="27895" author="seancorfield" created="Wed, 29 Feb 2012 23:33:01 -0600"  >&lt;p&gt;Integrated parts of the patch. SQLite 3 is now supported. Thanx!&lt;/p&gt;</comment>
                    <comment id="27896" author="xeqi" created="Thu, 1 Mar 2012 00:57:49 -0600"  >&lt;p&gt;I still get the transaction issue (part 2 from original description) when clojure.java.jdbc tries to return the generated keys, in a transaction, using sqlite. &lt;a href=&quot;https://gist.github.com/1947746&quot;&gt;https://gist.github.com/1947746&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I believe this is because the ResultSet from .getGeneratedKeys never gets .close called, so sqlite keeps the db locked and can&apos;t rollback.  Would you like me to make a new issue?&lt;/p&gt;</comment>
                    <comment id="27897" author="seancorfield" created="Thu, 1 Mar 2012 01:03:49 -0600"  >&lt;p&gt;The tests pass locally (Mac OS X) and on the Clojure build server (Linux) but you&apos;re right that I didn&apos;t include the close call on the record set.&lt;/p&gt;

&lt;p&gt;I didn&apos;t include your additional test which I&apos;m guessing is the key to highlighting the errant behavior for SQLite?&lt;/p&gt;

&lt;p&gt;(I couldn&apos;t actually apply your patch because I&apos;d spent some time getting all the tests passing for MS SQL Server with both the Microsoft and jTDS drivers)&lt;/p&gt;</comment>
                    <comment id="27898" author="xeqi" created="Thu, 1 Mar 2012 01:19:54 -0600"  >&lt;p&gt;Attached patch that fails with `mvn test`. &lt;/p&gt;</comment>
                    <comment id="28243" author="seancorfield" created="Mon, 23 Apr 2012 03:35:02 -0500"  >&lt;p&gt;I believe this was fixed in 0.1.3 (at the end of February). As far as I can tell, all of the patch components are applied. Specifically, your transaction test is included in the test suite and passes.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10923" name="mssql-error.log" size="42819" author="xeqi" created="Fri, 17 Feb 2012 22:06:08 -0600" />
                    <attachment id="10908" name="sqlite3-support.patch" size="6304" author="xeqi" created="Mon, 13 Feb 2012 23:46:14 -0600" />
                    <attachment id="10975" name="sqlite_transaction_test.patch" size="1390" author="xeqi" created="Thu, 1 Mar 2012 01:15:45 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[JDBC-19] Consolidate jdbc / jdbc.internal namespaces (post 0.1.0)</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-19</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Since clojure.java.jdbc.internal is not intended to be called externally, merge it into clojure.java.jdbc and make its members private. Then merge simplify functions where appropriate.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14696">JDBC-19</key>
            <summary>Consolidate jdbc / jdbc.internal namespaces (post 0.1.0)</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Wed, 12 Oct 2011 16:24:06 -0500</created>
                <updated>Mon, 23 Apr 2012 03:22:42 -0500</updated>
                    <resolved>Mon, 23 Apr 2012 03:22:42 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28242" author="seancorfield" created="Mon, 23 Apr 2012 03:22:42 -0500"  >&lt;p&gt;Fixed in 0.2.0 release.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-28] prepared-statement* behaves different on OpenJDK 1.6 and OS X Java 1.6.</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-28</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;I&apos;m using the Clojure library Korma to generate SQL for Postgres, which depends on clojure.java.jdbc. Recently I added a custom &apos;upsert&apos; query. Using it on normal java 1.6 is fine, but on openJDK it breaks due to the use of &apos;java.sql.Statement/RETURN_GENERATED_KEYS&apos;. This makes the Postgres driver add a seemingly random &quot;RETURNING *&quot; at the end of the query.&lt;/p&gt;

&lt;p&gt;On normal Java 1.6 java.sql.Statement/RETURN_GENERATED_KEYS doesn&apos;t exist and then a exception is caught and everything works as expected. Sounds like the world up side down, but I&apos;m probably missing the rational behind this.&lt;/p&gt;

&lt;p&gt;The line that causes the weird behavior is here: &lt;a href=&quot;https://github.com/clojure/java.jdbc/blob/master/src/main/clojure/clojure/java/jdbc/internal.clj#L315&quot;&gt;https://github.com/clojure/java.jdbc/blob/master/src/main/clojure/clojure/java/jdbc/internal.clj#L315&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The code that showcases the &apos;bug&apos; is here:&lt;br/&gt;
&lt;a href=&quot;https://gist.github.com/2e8a3d55d80707ce79e0&quot;&gt;https://gist.github.com/2e8a3d55d80707ce79e0&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(Sorry for the monkey patching in the gist, if there is a better way I would love to hear it)&lt;/p&gt;

&lt;p&gt;I guess a naive patch would be to remove the java.sql.Statement/RETURN_GENERATED_KEYS line, but there must be a reason for its existence I assume.&lt;/p&gt;</description>
                <environment>Ubuntu &lt;br/&gt;
OpenJDK:&lt;br/&gt;
java version &amp;quot;1.6.0_22&amp;quot;&lt;br/&gt;
OpenJDK Runtime Environment (IcedTea6 1.10.6) (6b22-1.10.6-0ubuntu1)&lt;br/&gt;
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)&lt;br/&gt;
&lt;br/&gt;
OS X Java&lt;br/&gt;
java version &amp;quot;1.6.0_29&amp;quot;&lt;br/&gt;
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527)&lt;br/&gt;
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)&lt;br/&gt;
&lt;br/&gt;
Relevant clojure libraries&lt;br/&gt;
&amp;nbsp;&amp;nbsp;[org.clojure/clojure &amp;quot;1.3.0&amp;quot;]&lt;br/&gt;
&amp;nbsp;&amp;nbsp;[korma &amp;quot;0.3.0-beta9&amp;quot;]&lt;br/&gt;
&amp;nbsp;&amp;nbsp;[org.clojure/java.jdbc &amp;quot;0.1.3&amp;quot;]&lt;br/&gt;
&amp;nbsp;&amp;nbsp;[postgresql/postgresql &amp;quot;9.1-901.jdbc3&amp;quot;]&lt;br/&gt;
</environment>
            <key id="15308">JDBC-28</key>
            <summary>prepared-statement* behaves different on OpenJDK 1.6 and OS X Java 1.6.</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="jeroen">Jeroen van Dijk</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Mar 2012 03:20:02 -0500</created>
                <updated>Sat, 31 Mar 2012 01:30:25 -0500</updated>
                    <resolved>Sat, 31 Mar 2012 01:30:25 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="28065" author="seancorfield" created="Sat, 31 Mar 2012 01:30:25 -0500"  >&lt;p&gt;RETURN_GENERATED_KEYS is required for inserts to return the generated keys. Since this works on Sun&apos;s Java 6 and with all intended databases, and is per spec, it is not going away.&lt;/p&gt;

&lt;p&gt;Right now OpenJDK / PostgreSQL is not a supported combination, sorry.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-27] Use repeat instead of replicate</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-27</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;The replicate function is deprecated and the suggested alternative is to use repeat.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15252">JDBC-27</key>
            <summary>Use repeat instead of replicate</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="jonase">Jonas Enlund</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 Feb 2012 00:20:51 -0600</created>
                <updated>Wed, 29 Feb 2012 17:34:52 -0600</updated>
                    <resolved>Wed, 29 Feb 2012 17:34:52 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27894" author="seancorfield" created="Wed, 29 Feb 2012 17:34:52 -0600"  >&lt;p&gt;Thanx Jonas. This made me look thru all my other Clojure code but it was the only instance of replicate that I could find.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10973" name="repeat-patch.diff" size="1039" author="jonase" created="Wed, 29 Feb 2012 00:20:51 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10009">Fixed</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[JDBC-25] The classnames private var should be public</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-25</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;I&apos;ve got a bunch of integration/system tests in Lobos which are run over multiple target database. As I do not want to force all target drivers to be made as dev-dependencies, I check if the driver is available before running those tests. As long as the classname key is in the db-spec it&apos;s all fine, but now java.jdbc support db-spec with that key, it would be useful to have access to the classnames var for me, so it would be great to have it made public. This isn&apos;t a blocker as up till now I don&apos;t really need it, but I&apos;m planning to add some tests for string based db-spec.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15209">JDBC-25</key>
            <summary>The classnames private var should be public</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="5" iconUrl="http://dev.clojure.org/jira/images/icons/priority_trivial.gif">Trivial</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="budu">Nicolas Buduroi</reporter>
                        <labels>
                    </labels>
                <created>Tue, 7 Feb 2012 19:08:19 -0600</created>
                <updated>Sun, 12 Feb 2012 04:21:20 -0600</updated>
                    <resolved>Sun, 12 Feb 2012 04:17:22 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27707" author="seancorfield" created="Sun, 12 Feb 2012 04:21:20 -0600"  >&lt;p&gt;Right now, that&apos;s in the internal namespace which is going away so I can&apos;t make it part of the API. You can always pull private vars out with @#&apos;clojure.java.jdbc.internal/classnames but bear in mind that internal ns will merge with the parent ns soon!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-22] Infer :classname from :subprotocol</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-22</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Having to specify both :classname and :subprotocol seems like needless boilerplate. Only :subprotocol should be required.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14707">JDBC-22</key>
            <summary>Infer :classname from :subprotocol</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="technomancy">Phil Hagelberg</assignee>
                                <reporter username="technomancy">Phil Hagelberg</reporter>
                        <labels>
                    </labels>
                <created>Mon, 17 Oct 2011 13:30:02 -0500</created>
                <updated>Wed, 4 Jan 2012 23:53:10 -0600</updated>
                    <resolved>Wed, 4 Jan 2012 23:53:10 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27010" author="technomancy" created="Mon, 17 Oct 2011 13:48:19 -0500"  >&lt;p&gt;This should take care of it. Updated the tests to remove the inferred value.&lt;/p&gt;</comment>
                    <comment id="27507" author="seancorfield" created="Wed, 4 Jan 2012 23:53:10 -0600"  >&lt;p&gt;Sorry, I should have closed this out ages ago - when the patch was applied.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10405" name="0001-Infer-classname-from-subprotocol.patch" size="3888" author="technomancy" created="Mon, 17 Oct 2011 13:48:19 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10003" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                <customfieldname>Waiting On</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>seancorfield</customfieldvalue>
                </customfieldvalues>
            </customfield>
                            </customfields>
    </item>

<item>
            <title>[JDBC-24] Make where-params optional for update-values function</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-24</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;This prevents having to pass a wonky always-true clause (e.g. &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;1=1&amp;quot;&amp;#93;&lt;/span&gt;) as the where-params when updating all the rows in a table.&lt;/p&gt;</description>
                <environment></environment>
            <key id="15096">JDBC-24</key>
            <summary>Make where-params optional for update-values function</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="misfo">Trent Ogren</reporter>
                        <labels>
                    </labels>
                <created>Wed, 4 Jan 2012 23:03:06 -0600</created>
                <updated>Wed, 4 Jan 2012 23:43:46 -0600</updated>
                    <resolved>Wed, 4 Jan 2012 23:43:46 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27505" author="misfo" created="Wed, 4 Jan 2012 23:04:40 -0600"  >&lt;p&gt;I&apos;m aware that I might have to sign the Clojure CA.  I just thought I&apos;d see what you think first...&lt;/p&gt;</comment>
                    <comment id="27506" author="seancorfield" created="Wed, 4 Jan 2012 23:43:46 -0600"  >&lt;p&gt;See &lt;a href=&quot;http://dev.clojure.org/jira/browse/JDBC-14&quot; title=&quot;delete-rows does not work with null WHERE&quot;&gt;&lt;del&gt;JDBC-14&lt;/del&gt;&lt;/a&gt; since I&apos;m declining this for the same reason. Performing a global update is an unusual operation and I think the API should prevent you from accidentally updating all rows, just as it should prevent you from deleting all rows. Requiring a where clause does that.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10758" name="optional-where-params-update-values.patch" size="3488" author="misfo" created="Wed, 4 Jan 2012 23:03:06 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[JDBC-23] Prepared statements&apos; parameters don&apos;t get applied</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-23</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Basically a goof line in the code. &lt;br/&gt;
If you pass a PreparedStatement to with-query-results, it chops off too many items from the param list, whereas if you pass in straight SQL, it&apos;s ok.&lt;/p&gt;

&lt;p&gt;Deleted the offending line&lt;/p&gt;</description>
                <environment>Oracle JDBC, probably applies universally</environment>
            <key id="15025">JDBC-23</key>
            <summary>Prepared statements&apos; parameters don&apos;t get applied</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="gshayban@gmail.com">Ghadi Shayban</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 Nov 2011 16:09:16 -0600</created>
                <updated>Tue, 22 Nov 2011 01:01:05 -0600</updated>
                    <resolved>Tue, 22 Nov 2011 01:00:26 -0600</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27337" author="seancorfield" created="Tue, 22 Nov 2011 01:01:05 -0600"  >&lt;p&gt;Thanx Ghadi.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10713" name="param.patch" size="1175" author="gshayban@gmail.com" created="Mon, 21 Nov 2011 16:09:16 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10009">Fixed</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[JDBC-21] Accept string URL as connection parameters</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-21</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Should support connection parameters in this style:&lt;/p&gt;

&lt;p&gt;(with-connection &quot;postgres://user:password@host.com:port/db-name&quot; &lt;span class=&quot;error&quot;&gt;&amp;#91;...&amp;#93;&lt;/span&gt;)&lt;/p&gt;</description>
                <environment></environment>
            <key id="14706">JDBC-21</key>
            <summary>Accept string URL as connection parameters</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="technomancy">Phil Hagelberg</assignee>
                                <reporter username="technomancy">Phil Hagelberg</reporter>
                        <labels>
                    </labels>
                <created>Mon, 17 Oct 2011 12:30:54 -0500</created>
                <updated>Wed, 2 Nov 2011 14:52:38 -0500</updated>
                    <resolved>Wed, 2 Nov 2011 14:52:38 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="27009" author="technomancy" created="Mon, 17 Oct 2011 13:18:37 -0500"  >&lt;p&gt;Talked this over with Sean on IRC; I&apos;ll put together a patch.&lt;/p&gt;</comment>
                    <comment id="27012" author="technomancy" created="Mon, 17 Oct 2011 16:21:43 -0500"  >&lt;p&gt;Implements said functionality. Patch depends upon supplied patch for &lt;a href=&quot;http://dev.clojure.org/jira/browse/JDBC-22&quot; title=&quot;Infer :classname from :subprotocol&quot;&gt;&lt;del&gt;JDBC-22&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="27013" author="technomancy" created="Mon, 17 Oct 2011 16:54:55 -0500"  >&lt;p&gt;Hold off on this patch; apparently the scheme and subprotocol don&apos;t always match up. Will provide an updated patch.&lt;/p&gt;</comment>
                    <comment id="27014" author="technomancy" created="Mon, 17 Oct 2011 18:00:41 -0500"  >&lt;p&gt;This one should take care of the subprotocol issue; it also adds support for running the tests against postgres.&lt;/p&gt;</comment>
                    <comment id="27191" author="seancorfield" created="Wed, 2 Nov 2011 14:52:38 -0500"  >&lt;p&gt;Patches applied - thank you!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10408" name="0001-Accept-string-or-URI-in-with-connection.patch" size="3551" author="technomancy" created="Mon, 17 Oct 2011 16:21:43 -0500" />
                    <attachment id="10409" name="jdbc-21-take2.patch" size="12677" author="technomancy" created="Mon, 17 Oct 2011 18:00:40 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10002">Code and Test</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[JDBC-15] resultset-seq uses structmap which has been deprecated</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-15</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;structmap has been deprecated. The open question is whether to replace its use with record or regular map (I&apos;d expect the latter would be less surprising?).&lt;/p&gt;</description>
                <environment></environment>
            <key id="14574">JDBC-15</key>
            <summary>resultset-seq uses structmap which has been deprecated</summary>
                <type id="3" iconUrl="http://dev.clojure.org/jira/images/icons/task.gif">Task</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Sat, 13 Aug 2011 19:01:31 -0500</created>
                <updated>Sun, 16 Oct 2011 16:32:49 -0500</updated>
                    <resolved>Sun, 16 Oct 2011 16:32:48 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="26947" author="seancorfield" created="Wed, 12 Oct 2011 16:29:00 -0500"  >&lt;p&gt;See &lt;a href=&quot;http://dev.clojure.org/jira/browse/JDBC-3&quot; title=&quot;Inconsistency between tuples and regular maps&quot;&gt;&lt;del&gt;JDBC-3&lt;/del&gt;&lt;/a&gt; for some background on this.&lt;/p&gt;</comment>
                    <comment id="27004" author="seancorfield" created="Sun, 16 Oct 2011 15:41:36 -0500"  >&lt;p&gt;The way resultset-seq uses create-struct and struct doesn&apos;t seem to leverage any inherent functionality of structmaps except perhaps some vague guarantee of ordering of columns in rows. Replacing the create-struct / struct calls with&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(into {} (map vector keys (row-values)))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;maintains the order up to 16 columns (PersistentArrayMap) so that seems a reasonable compromise.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure that preserving order is something that should be documented or supported?&lt;/p&gt;</comment>
                    <comment id="27006" author="seancorfield" created="Sun, 16 Oct 2011 16:32:49 -0500"  >&lt;p&gt;No longer uses structmap. Attempts to provide column order (up to 16 columns) but don&apos;t rely on that... it was never documented as a guarantee!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[JDBC-3] Inconsistency between tuples and regular maps</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-3</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Stuart Sierra: In general, c.c.sql is inconsistent about using tuples of column values versus maps of column=&amp;gt;value pairs. Both are useful, and I&apos;d like to see versions of all the core functions that support both modes.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14418">JDBC-3</key>
            <summary>Inconsistency between tuples and regular maps</summary>
                <type id="3" iconUrl="http://dev.clojure.org/jira/images/icons/task.gif">Task</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Sun, 8 May 2011 21:15:04 -0500</created>
                <updated>Wed, 12 Oct 2011 16:29:40 -0500</updated>
                    <resolved>Wed, 12 Oct 2011 16:29:40 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="26722" author="seancorfield" created="Sat, 13 Aug 2011 18:59:49 -0500"  >&lt;p&gt;Having reviewed this after using the library for quite a while, I don&apos;t really see any inconsistencies except, perhaps in the naming of update-values (and update-or-insert-values).&lt;/p&gt;

&lt;p&gt;insert-values is the base function, taking a table name, a vector of column names and any number of vectors of column values. Generates one insert statement (containing multiple rows). If only one row is inserted, returns a map of generated keys if the database supports that.&lt;/p&gt;

&lt;p&gt;insert-rows takes a table name and any number of vectors of column values (for all columns); uses insert-values.&lt;/p&gt;

&lt;p&gt;insert-records takes a table name and any number of maps (containing column/value pairs); uses insert-values to insert one record at a time (and thus may return a sequence of maps of generated keys).&lt;/p&gt;

&lt;p&gt;insert-record takes a table name and a single map; uses insert-records and returns a map of generated key if the database supports that.&lt;/p&gt;

&lt;p&gt;delete-rows takes a table name and a where clause. Perhaps delete-where might be a better name?&lt;/p&gt;

&lt;p&gt;update-values takes a table name, a where clause and a map (of column/value pairs to update). Arguably this should be renamed since it doesn&apos;t take the same argument pattern as insert-values, but whilst update-records might sound more appropriate it only takes one &quot;record&quot; and update-record is clearly not right since it can update more than one row!&lt;/p&gt;

&lt;p&gt;update-or-insert-values (taking the same arguments as update-values) can however lead to inserting a single record but it can also update multiple records instead.&lt;/p&gt;

&lt;p&gt;On both of the latter functions, an analogy could be drawn with the findAndModify command in MongoDB which has an upsert option (to insert the document if no matches are found for the update), but most notably, findAndModify only updates a single record. I don&apos;t believe SQL has any portable equivalent but perhaps find-and-modify is a better name for update-values? Or perhaps, in the spirit of my suggestion for delete-where, we might call it update-where - and use an optional keyword argument to indicate that an insert-record should be performed when no rows match?&lt;/p&gt;

&lt;p&gt;The only other comment I could make on update-values is that it might be nice to have a variant that took: table where-params column-names value-group - somewhat inline with insert-values (although not allowing any number of vectors of column values).&lt;/p&gt;</comment>
                    <comment id="26948" author="seancorfield" created="Wed, 12 Oct 2011 16:29:12 -0500"  >&lt;p&gt;The API aspects of this ticket are covered in &lt;a href=&quot;http://dev.clojure.org/jira/browse/JDBC-20&quot; title=&quot;Create new clean API that accepts connection etc (post 0.1.0)&quot;&gt;&lt;del&gt;JDBC-20&lt;/del&gt;&lt;/a&gt; (post 0.1.0) and the struct-map issue is covered in &lt;a href=&quot;http://dev.clojure.org/jira/browse/JDBC-15&quot; title=&quot;resultset-seq uses structmap which has been deprecated&quot;&gt;&lt;del&gt;JDBC-15&lt;/del&gt;&lt;/a&gt; so I&apos;m closing this out as a duplicate for now.&lt;/p&gt;</comment>
                    <comment id="26949" author="seancorfield" created="Wed, 12 Oct 2011 16:29:40 -0500"  >&lt;p&gt;Essentially duplicated with more focus in &lt;a href=&quot;http://dev.clojure.org/jira/browse/JDBC-15&quot; title=&quot;resultset-seq uses structmap which has been deprecated&quot;&gt;&lt;del&gt;JDBC-15&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;http://dev.clojure.org/jira/browse/JDBC-20&quot; title=&quot;Create new clean API that accepts connection etc (post 0.1.0)&quot;&gt;&lt;del&gt;JDBC-20&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[JDBC-9] Solve duplicate column label issue</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-9</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Per Peter Siewart (and others):&lt;/p&gt;

&lt;p&gt;&amp;#8211; While working with clojure.java.jdbc, I kept running into the &quot;ResultSet must have unique column labels&quot; exception, so I rewrote it to automatically rename duplicate columns. Now, I can run &quot;SELECT * FROM tbl1 JOIN tbl2 ON tbl1.id = tbl2.id&quot; without causing any errors. &lt;/p&gt;

&lt;p&gt;This would definitely be a nice enhancement but so far no one with a signed CA has offered a patch &lt;img class=&quot;emoticon&quot; src=&quot;http://dev.clojure.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Figuring out the appropriate renaming strategy is key - a sensible default with an optional function to allow users to specify how to do this? Or perhaps only renaming if users specify such a function?&lt;/p&gt;</description>
                <environment></environment>
            <key id="14460">JDBC-9</key>
            <summary>Solve duplicate column label issue</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Jun 2011 12:29:29 -0500</created>
                <updated>Tue, 11 Oct 2011 16:12:09 -0500</updated>
                    <resolved>Tue, 11 Oct 2011 16:12:08 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="26941" author="seancorfield" created="Tue, 11 Oct 2011 16:12:08 -0500"  >&lt;p&gt;Applied a variant of Peter&apos;s patch and added unit tests.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-16] do-prepared doesn&apos;t throw on invalid SQL</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-16</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(jdbc/&lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt;-prepared &lt;span class=&quot;code-quote&quot;&gt;&quot;syntactically invalid SQL&quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;returns nil, while &lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(jdbc/&lt;span class=&quot;code-keyword&quot;&gt;do&lt;/span&gt;-commands &lt;span class=&quot;code-quote&quot;&gt;&quot;syntactically invalid SQL&quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; throws as expected.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14616">JDBC-16</key>
            <summary>do-prepared doesn&apos;t throw on invalid SQL</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="arohner">Allen Rohner</reporter>
                        <labels>
                    </labels>
                <created>Wed, 7 Sep 2011 15:58:29 -0500</created>
                <updated>Tue, 11 Oct 2011 14:12:42 -0500</updated>
                    <resolved>Tue, 11 Oct 2011 14:12:40 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="26776" author="arohner" created="Wed, 7 Sep 2011 16:00:28 -0500"  >&lt;p&gt;Actually, do-prepared doesn&apos;t seem to do anything at all. (jdbc/do-commands &quot;insert into foo (foo,bar) VALUES (1,2)&quot;) works as expected, same command with do-prepared doesn&apos;t do anything.&lt;/p&gt;</comment>
                    <comment id="26940" author="seancorfield" created="Tue, 11 Oct 2011 14:12:41 -0500"  >&lt;p&gt;Ensure .addBatch is called even when there are no param-groups.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-17] Type-hint public fns returning Connection</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-17</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;&lt;tt&gt;clojure.java.jdbc/connection&lt;/tt&gt; and &lt;tt&gt;find-connection&lt;/tt&gt; both return a &lt;tt&gt;java.sql.Connection&lt;/tt&gt; but are not type-hinted. &lt;/p&gt;

&lt;p&gt;There is a type hint on &lt;tt&gt;clojure.java.jdbc.internal/connection*&lt;/tt&gt;, but it does not carry through to the public Var.&lt;/p&gt;

&lt;p&gt;Tagging these functions eliminates 9 reflection warnings in a project I have.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14681">JDBC-17</key>
            <summary>Type-hint public fns returning Connection</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="stuart.sierra">Stuart Sierra</reporter>
                        <labels>
                    </labels>
                <created>Mon, 10 Oct 2011 15:18:16 -0500</created>
                <updated>Mon, 10 Oct 2011 23:21:26 -0500</updated>
                    <resolved>Mon, 10 Oct 2011 23:21:25 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="26929" author="seancorfield" created="Mon, 10 Oct 2011 23:21:25 -0500"  >&lt;p&gt;Patch applied. Thanx Stuart!&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10378" name="JDBC-17-a.patch" size="1025" author="stuart.sierra" created="Mon, 10 Oct 2011 15:20:39 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[JDBC-14] delete-rows does not work with null WHERE</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-14</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(delete-rows &lt;span class=&quot;code-quote&quot;&gt;&quot;foo&quot;&lt;/span&gt; [])&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; generates the SQL &lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;delete from foo where &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;, which deletes 0 rows. Instead, I expect it to generate &lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;delete from foo&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;. &lt;/p&gt;</description>
                <environment></environment>
            <key id="14564">JDBC-14</key>
            <summary>delete-rows does not work with null WHERE</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="2">Declined</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="arohner">Allen Rohner</reporter>
                        <labels>
                    </labels>
                <created>Sat, 6 Aug 2011 15:45:22 -0500</created>
                <updated>Sun, 4 Sep 2011 01:32:37 -0500</updated>
                    <resolved>Sun, 4 Sep 2011 01:32:37 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="26701" author="arohner" created="Sat, 6 Aug 2011 15:46:42 -0500"  >&lt;p&gt;I can&apos;t find the button to edit the issue, this happened on ver. 0.0.6&lt;/p&gt;</comment>
                    <comment id="26716" author="seancorfield" created="Wed, 10 Aug 2011 01:46:16 -0500"  >&lt;p&gt;I actually think that would be rather dangerous. Imagine constructing the where parameters dynamically and accidentally passing in an empty sequence - you&apos;d delete everything in the table.&lt;/p&gt;

&lt;p&gt;I believe you can safely and deliberately get the effect you are looking for by doing either of these:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;(delete-rows &quot;foo&quot; [true])
(delete-rows &quot;foo&quot; [1])
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    <comment id="26760" author="seancorfield" created="Sun, 4 Sep 2011 01:32:37 -0500"  >&lt;p&gt;Given the lack of response to my comment and the fact that there is a clear and explicit workaround, I&apos;m resolving this, declined.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-6] Add hook to allow operations on PreparedStatement prior to query execution</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-6</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;It would be very useful to be able to pass in a function argument to several c.j.j functions that would be called on the PreparedStatement before executing the query, for example, calling setFetchSize(). I&apos;m not sure what the syntax should look like for this...&lt;/p&gt;</description>
                <environment></environment>
            <key id="14443">JDBC-6</key>
            <summary>Add hook to allow operations on PreparedStatement prior to query execution</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Thu, 26 May 2011 20:06:23 -0500</created>
                <updated>Wed, 10 Aug 2011 02:23:49 -0500</updated>
                    <resolved>Wed, 10 Aug 2011 02:23:49 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="26580" author="seancorfield" created="Sun, 17 Jul 2011 03:36:38 -0500"  >&lt;p&gt;I&apos;ve started the work to reorganize the code to better expose the statement object for this sort of manipulation.&lt;/p&gt;</comment>
                    <comment id="26582" author="seancorfield" created="Sun, 17 Jul 2011 17:57:16 -0500"  >&lt;p&gt;Two options under consideration:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;allow raw PreparedStatement to be passed in by user where appropriate so they have complete control&lt;/li&gt;
	&lt;li&gt;allow map of settings that would be used to create the PreparedStatement and set its options&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I like the latter better but Alan Malloy made the point that the former may still be needed for total control anyway.&lt;/p&gt;

&lt;p&gt;I&apos;m leaning toward adding a function to ease creation of PreparedStatement objects to at least provide a clean API and then I&apos;ll consider how best to integrate that with the other functions.&lt;/p&gt;</comment>
                    <comment id="26583" author="seancorfield" created="Sun, 17 Jul 2011 22:02:17 -0500"  >&lt;p&gt;Added prepare-statement* to jdbc.internal which takes a connection, a SQL string and a map of options; returns a PreparedStatement. Will expose this in top-level.&lt;/p&gt;

&lt;p&gt;with-query-results now allows the first element in the sql-params vector to be either:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;PreparedStatement object created by the user&lt;/li&gt;
	&lt;li&gt;map of options passed to prepare-statement* in order to create the PreparedStatement&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Options supported are in the docstring. May add additional post-creation options (beyond fetch-size and max-rows).&lt;/p&gt;</comment>
                    <comment id="26719" author="seancorfield" created="Wed, 10 Aug 2011 02:23:49 -0500"  >&lt;p&gt;Users have verified that being able to specify :fetch-size in with-query-results handles the common use cases for performance.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-4] Global connection mechanism / connection pooling</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-4</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Nicolas Buduroi: What I would like to see added is a global connection mechanism like in ClojureQL and Lobos. We could even add a connection pool behind the scene.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14419">JDBC-4</key>
            <summary>Global connection mechanism / connection pooling</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Sun, 8 May 2011 21:15:51 -0500</created>
                <updated>Wed, 10 Aug 2011 02:22:46 -0500</updated>
                    <resolved>Wed, 10 Aug 2011 02:22:44 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="26558" author="seancorfield" created="Sat, 9 Jul 2011 12:23:11 -0500"  >&lt;p&gt;For production usage, I&apos;ve been relying on c3p0 for connection pooling which works very well with c.j.j so I&apos;m not sure that we need something specific within the library itself. What we do need, of course, is documentation on &lt;em&gt;how&lt;/em&gt; to use something like c3p0 for connection pooling with c.j.j!&lt;/p&gt;</comment>
                    <comment id="26579" author="seancorfield" created="Sun, 17 Jul 2011 03:31:57 -0500"  >&lt;p&gt;Given the ease of using 3rd-party connection pooling libraries like c3p0, I think this is low priority (and I may simply close out after documenting how to use c3p0 with c.j.j).&lt;/p&gt;</comment>
                    <comment id="26717" author="seancorfield" created="Wed, 10 Aug 2011 02:21:46 -0500"  >&lt;p&gt;I&apos;ve documented it here: &lt;a href=&quot;https://github.com/clojure/java.jdbc/blob/master/doc/clojure/java/jdbc/ConnectionPooling.md&quot;&gt;https://github.com/clojure/java.jdbc/blob/master/doc/clojure/java/jdbc/ConnectionPooling.md&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I don&apos;t believe this should be in c.j.j itself so I&apos;m going to close this.&lt;/p&gt;</comment>
                    <comment id="26718" author="seancorfield" created="Wed, 10 Aug 2011 02:22:46 -0500"  >&lt;p&gt;Documented how to use a 3rd party library for connection pooling which I think is sufficient since it&apos;s so easy.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-12] exceptions when trying to insert into apache derby</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-12</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>
&lt;p&gt;java.sql.SQLException: Only executeBatch and clearBatch allowed in the middle of a batch.&lt;br/&gt;
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)&lt;br/&gt;
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)&lt;br/&gt;
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)&lt;br/&gt;
	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)&lt;br/&gt;
	at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)&lt;br/&gt;
	at org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(Unknown Source)&lt;br/&gt;
	at org.apache.derby.impl.jdbc.EmbedStatement.checkIfInMiddleOfBatch(Unknown Source)&lt;br/&gt;
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)&lt;br/&gt;
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source)&lt;br/&gt;
	at clojure.java.jdbc.internal$do_prepared_return_keys_STAR_$fn__84.invoke(internal.clj:272)&lt;br/&gt;
	at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:185)&lt;br/&gt;
	at clojure.java.jdbc.internal$do_prepared_return_keys_STAR_.doInvoke(internal.clj:272)&lt;br/&gt;
	at clojure.lang.RestFn.applyTo(RestFn.java:140)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.java.jdbc$insert_values.doInvoke(jdbc.clj:259)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:443)&lt;br/&gt;
	at hiredman.triples$store_triple$fn_&lt;em&gt;471$fn&lt;/em&gt;_472.invoke(triples.clj:39)&lt;br/&gt;
	at clojure.java.jdbc.internal$transaction_STAR_.invoke(internal.clj:174)&lt;br/&gt;
	at hiredman.triples$store_triple$fn__471.invoke(triples.clj:39)&lt;br/&gt;
	at clojure.java.jdbc.internal$with_connection_STAR_.invoke(internal.clj:156)&lt;br/&gt;
	at hiredman.triples$store_triple.invoke(triples.clj:39)&lt;br/&gt;
	at hiredman.clojurebot.factoids$fn__2689.invoke(factoids.clj:139)&lt;br/&gt;
	at clojure.lang.MultiFn.invoke(MultiFn.java:167)&lt;br/&gt;
	at hiredman.clojurebot.factoids$factoid_command_run.invoke(factoids.clj:173)&lt;br/&gt;
	at conduit.core$fn_&lt;em&gt;284$a_arr&lt;/em&gt;&lt;em&gt;285$a_arr&lt;/em&gt;_286.invoke(core.clj:233)&lt;br/&gt;
	at conduit.core$select_fn.invoke(core.clj:148)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:42)&lt;br/&gt;
	at conduit.core$select_fn.invoke(core.clj:148)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:42)&lt;br/&gt;
	at conduit.core$select_fn.invoke(core.clj:148)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:42)&lt;br/&gt;
	at conduit.core$select_fn.invoke(core.clj:148)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:42)&lt;br/&gt;
	at conduit.core$select_fn.invoke(core.clj:148)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:42)&lt;br/&gt;
	at conduit.core$select_fn.invoke(core.clj:148)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:42)&lt;br/&gt;
	at conduit.core$select_fn.invoke(core.clj:148)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:42)&lt;br/&gt;
	at conduit.core$select_fn.invoke(core.clj:148)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:42)&lt;br/&gt;
	at conduit.core$select_fn.invoke(core.clj:148)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$select_fn.invoke(core.clj:148)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:42)&lt;br/&gt;
	at conduit.core$select_fn.invoke(core.clj:148)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:42)&lt;br/&gt;
	at conduit.core$select_fn.invoke(core.clj:148)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:42)&lt;br/&gt;
	at conduit.core$select_fn.invoke(core.clj:148)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:42)&lt;br/&gt;
	at conduit.core$select_fn.invoke(core.clj:148)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:42)&lt;br/&gt;
	at conduit.core$select_fn.invoke(core.clj:148)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:42)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$a_except$a_except__307.invoke(core.clj:350)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:42)&lt;br/&gt;
	at clojurebot.conduit$a_indirect$this_fn__500.invoke(conduit.clj:9)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.irc$reply_fn$irc_reply_fn__350.invoke(irc.clj:22)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$select_fn.invoke(core.clj:148)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.irc$irc_run$handle_msg__421.invoke(irc.clj:166)&lt;br/&gt;
	at clojure.lang.AFn.applyToHelper(AFn.java:165)&lt;br/&gt;
	at clojure.lang.AFn.applyTo(AFn.java:151)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojure.core$partial$fn__3678.doInvoke(core.clj:2009)&lt;br/&gt;
	at clojure.lang.RestFn.invoke(RestFn.java:409)&lt;br/&gt;
	at conduit.core$comp_fn$a_comp__193.invoke(core.clj:45)&lt;br/&gt;
	at conduit.core$a_run.invoke(core.clj:28)&lt;br/&gt;
	at conduit.irc$irc_run$run__424.invoke(irc.clj:175)&lt;br/&gt;
	at conduit.irc$irc_run.doInvoke(irc.clj:179)&lt;br/&gt;
	at clojure.lang.RestFn.applyTo(RestFn.java:140)&lt;br/&gt;
	at clojure.core$apply.invoke(core.clj:542)&lt;br/&gt;
	at clojurebot.core$&lt;em&gt;main$fn&lt;/em&gt;_4654.invoke(core.clj:214)&lt;br/&gt;
	at clojure.lang.AFn.call(AFn.java:18)&lt;br/&gt;
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)&lt;br/&gt;
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)&lt;br/&gt;
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)&lt;br/&gt;
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)&lt;br/&gt;
	at java.lang.Thread.run(Thread.java:680)&lt;br/&gt;
Caused by: java.sql.SQLException: Only executeBatch and clearBatch allowed in the middle of a batch.&lt;br/&gt;
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)&lt;br/&gt;
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)&lt;br/&gt;
	... 185 more&lt;/p&gt;

&lt;p&gt;replacing .executeUpdate with .executeBatch in do-prepared-return-keys* seems to fix the problem and be what was meant in the first place, the result is bound to &apos;counts&apos; and .executeUpdate returns a single count while .executeBatch returns multiple&lt;/p&gt;</description>
                <environment></environment>
            <key id="14530">JDBC-12</key>
            <summary>exceptions when trying to insert into apache derby</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="hiredman">Kevin Downey</reporter>
                        <labels>
                    </labels>
                <created>Sun, 24 Jul 2011 04:23:11 -0500</created>
                <updated>Mon, 25 Jul 2011 16:52:00 -0500</updated>
                    <resolved>Mon, 25 Jul 2011 16:52:00 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="26644" author="seancorfield" created="Sun, 24 Jul 2011 15:38:24 -0500"  >&lt;p&gt;Unfortunately .executeBatch had to be changed to .executeUpdate in order to solve &lt;a href=&quot;http://dev.clojure.org/jira/browse/JDBC-10&quot; title=&quot;Attempts to return generated keys on batch inserts fails on PostgreSQL and MS SQL Server&quot;&gt;&lt;del&gt;JDBC-10&lt;/del&gt;&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/clojure/java.jdbc/commit/9240d66c9124454187416861a0e2021952eb4f40&quot;&gt;https://github.com/clojure/java.jdbc/commit/9240d66c9124454187416861a0e2021952eb4f40&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MS SQL Server and PostgreSQL both fail on .executeUpdate in that call position.&lt;/p&gt;

&lt;p&gt;Clearly we need as many of these DBs up and running for automated testing as possible before I can attempt to fix this so that I don&apos;t accidentally break something else.&lt;/p&gt;</comment>
                    <comment id="26645" author="seancorfield" created="Sun, 24 Jul 2011 17:26:54 -0500"  >&lt;p&gt;I now have some unit tests for MySQL, HSQLDB and Derby. insert-records fails with the exception reported here, only for Derby. I&apos;ll complete the suite of tests, try to get PostgreSQL and MS SQL Server tests running as well and then I&apos;ll be in a good position to fix things...&lt;/p&gt;</comment>
                    <comment id="26649" author="seancorfield" created="Mon, 25 Jul 2011 16:52:00 -0500"  >&lt;p&gt;The culprit was .addBatch which has now been removed and do-prepared-return-keys now explicitly only has one param-group argument.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                        <customfield id="customfield_10003" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                <customfieldname>Waiting On</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>seancorfield</customfieldvalue>
                </customfieldvalues>
            </customfield>
                            </customfields>
    </item>

<item>
            <title>[JDBC-8] Review (and fix) reflection warnings</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-8</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;There are quite a few reflection warnings in the c.j.j code which should be reviewed and performance critical pieces type hinted.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14459">JDBC-8</key>
            <summary>Review (and fix) reflection warnings</summary>
                <type id="3" iconUrl="http://dev.clojure.org/jira/images/icons/task.gif">Task</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Wed, 8 Jun 2011 19:59:42 -0500</created>
                <updated>Sun, 17 Jul 2011 17:47:15 -0500</updated>
                    <resolved>Sun, 17 Jul 2011 17:47:14 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="26562" author="arohner" created="Sat, 9 Jul 2011 15:50:36 -0500"  >&lt;p&gt;Empirically, I can tell you the one in do-prepared*, (.prepareStatement (connection), and the one in transaction* (let [con (connection*) ...) are both performance critical for me.&lt;/p&gt;</comment>
                    <comment id="26564" author="seancorfield" created="Sat, 9 Jul 2011 16:00:00 -0500"  >&lt;p&gt;Thanx Allen. The impression I get from clojure-dev is new contrib libraries should have zero reflection warnings so I plan to find and fix all such cases in c.j.j.&lt;/p&gt;</comment>
                    <comment id="26581" author="seancorfield" created="Sun, 17 Jul 2011 17:47:14 -0500"  >&lt;p&gt;All reflection warnings have been removed.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>

<item>
            <title>[JDBC-11] Transaction not rolled back on Throwable exception</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-11</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;(transaction&lt;br/&gt;
  (insert-values .....)&lt;br/&gt;
  (throw (Throwable. &quot;baaaaad&quot;)))&lt;/p&gt;

&lt;p&gt;Reported by Sebasti&#225;n Galkin on github.&lt;/p&gt;

&lt;p&gt;Transactions rollback on Exception but not Throwable.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14479">JDBC-11</key>
            <summary>Transaction not rolled back on Throwable exception</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Sun, 3 Jul 2011 21:54:06 -0500</created>
                <updated>Sun, 17 Jul 2011 03:29:00 -0500</updated>
                    <resolved>Sun, 17 Jul 2011 03:28:58 -0500</resolved>
                                                                    <due></due>
                    <votes>1</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="26548" author="paraseba" created="Sun, 3 Jul 2011 23:07:55 -0500"  >&lt;p&gt;I think the correct behavior would be to call rollback on the transaction and not just not calling commit? The user will expect at the end of the transaction block one of commit or rollback to be called.&lt;/p&gt;

&lt;p&gt;I was thinking about how to test this. How do you feel about a mock Connection object, where we can check if commit and/or rollback have been called as part of the test?&lt;/p&gt;

&lt;p&gt;The same mechanism could be used to test other features.&lt;/p&gt;</comment>
                    <comment id="26549" author="paraseba" created="Mon, 4 Jul 2011 00:23:36 -0500"  >&lt;p&gt;I was thinking in something like the attached for testing the issue (and other functionality).&lt;br/&gt;
It needs several improvements, but it&apos;s enough to get the idea.&lt;br/&gt;
What do you think?&lt;/p&gt;</comment>
                    <comment id="26550" author="seancorfield" created="Mon, 4 Jul 2011 00:27:06 -0500"  >&lt;p&gt;FYI, here&apos;s the IRC discussion about this, for the record:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;5:11pm&amp;#93;&lt;/span&gt; &amp;lt;paraseba&amp;gt;&lt;br/&gt;
In clojure.java.jdbc there is a transaction function, which is supposed to rollback if the passed body throws an exception, but it only does that in case of an Exception, not any Throwable. What&apos;s the rationale behind this?&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:11pm&amp;#93;&lt;/span&gt; &amp;lt;paraseba&amp;gt;&lt;br/&gt;
I&apos;d want my transaction rolledback in case of any errors&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:12pm&amp;#93;&lt;/span&gt; &amp;lt;paraseba&amp;gt;&lt;br/&gt;
seancorfield: maybe you can explain me this?&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:53pm&amp;#93;&lt;/span&gt; &amp;lt;amalloy&amp;gt;&lt;br/&gt;
paraseba: catching Errors is generally a bad practice. i&apos;m not saying it&apos;s wrong all the time, but Errors are often unrecoverable anyway&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:53pm&amp;#93;&lt;/span&gt; &amp;lt;amalloy&amp;gt;&lt;br/&gt;
eg, &quot;You ran out of heap space! I can&apos;t even allocate memory to throw an exception!&quot;&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:54pm&amp;#93;&lt;/span&gt; &amp;lt;paraseba&amp;gt;&lt;br/&gt;
but, even in the worst conditions, shouldn&apos;t we try to rollback the transaction? is not better that commiting in this unexpected error condition?&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:55pm&amp;#93;&lt;/span&gt; &amp;lt;paraseba&amp;gt;&lt;br/&gt;
we can then rethrow the Throwable, after trying to rollback&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:55pm&amp;#93;&lt;/span&gt; &amp;lt;lucian&amp;gt;&lt;br/&gt;
paraseba: i don&apos;t think the db will commit if it gives you an error&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:55pm&amp;#93;&lt;/span&gt; &amp;lt;lucian&amp;gt;&lt;br/&gt;
and as amalloy, errors like OOM are best solved with exit()&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:55pm&amp;#93;&lt;/span&gt; &amp;lt;paraseba&amp;gt;&lt;br/&gt;
lucian: it will ... jdbc is catching Exception and rolling back in that case .... but it commits in a finally&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:56pm&amp;#93;&lt;/span&gt; &amp;lt;paraseba&amp;gt;&lt;br/&gt;
so, if you have an Error thrown, it will commit&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:56pm&amp;#93;&lt;/span&gt; &amp;lt;paraseba&amp;gt;&lt;br/&gt;
I guess that&apos;s more surprising than a rollback&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:57pm&amp;#93;&lt;/span&gt; &amp;lt;paraseba&amp;gt;&lt;br/&gt;
the logic is .... (try do-your-thing (catch Exception roll-back) (finally commit))&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:57pm&amp;#93;&lt;/span&gt; &amp;lt;lucian&amp;gt;&lt;br/&gt;
paraseba: well, then maybe you don&apos;t want to commit in finally?&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:57pm&amp;#93;&lt;/span&gt; &amp;lt;paraseba&amp;gt;&lt;br/&gt;
I don&apos;t, not if I got an Error&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:58pm&amp;#93;&lt;/span&gt; &amp;lt;amalloy&amp;gt;&lt;br/&gt;
lucian: i think he&apos;s upset that a library he&apos;s using is committing on error&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:59pm&amp;#93;&lt;/span&gt; &amp;lt;paraseba&amp;gt;&lt;br/&gt;
amalloy: I can solve it easily by wrapping my operations in a catch Throwable -&amp;gt; rollback -&amp;gt; rethrow, but I think it&apos;s not the right behavior for the library&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;5:59pm&amp;#93;&lt;/span&gt; &amp;lt;paraseba&amp;gt;&lt;br/&gt;
I would expect a commit only if the block ended without any kind of exceptions or errors. don&apos;t you agree ?&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;6:01pm&amp;#93;&lt;/span&gt; &amp;lt;amalloy&amp;gt;&lt;br/&gt;
paraseba: meh. all kinds of weird stuff can happen if an Error occurs; i wouldn&apos;t be entirely certain that an attempt to &quot;recover&quot; makes things worse due to some weird program state caused by the Error. i mean, my completely-unresearched opinion is that catching Throwable would be better, but you can&apos;t really rely for your program&apos;s correctness on anything that happens after an Error&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;6:02pm&amp;#93;&lt;/span&gt; &amp;lt;paraseba&amp;gt;&lt;br/&gt;
but, we are forcing a commit after an Error&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;6:04pm&amp;#93;&lt;/span&gt; &amp;lt;paraseba&amp;gt;&lt;br/&gt;
the usual logic should be .... (do do-your-thing  (commit))  if do-your-thing throws anything ... no commit is done. Puting a commit in a finally enforces the commit, even after Errors&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;6:06pm&amp;#93;&lt;/span&gt; &amp;lt;amalloy&amp;gt;&lt;br/&gt;
yeah, i think i agree&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;6:08pm&amp;#93;&lt;/span&gt; &amp;lt;paraseba&amp;gt;&lt;br/&gt;
amalloy: ok, I&apos;ll report an issue, thanks&lt;/p&gt;</comment>
                    <comment id="26561" author="paraseba" created="Sat, 9 Jul 2011 14:36:30 -0500"  >&lt;p&gt;It&apos;s important to realize that there are 2 problems here.&lt;/p&gt;

&lt;p&gt;a.- Transaction not rolled back on Throwable&lt;br/&gt;
b.- The original Exception is &quot;swallowed&quot; and a new, different one is thrown&lt;/p&gt;

&lt;p&gt;I think both are equally serious.&lt;/p&gt;</comment>
                    <comment id="26563" author="seancorfield" created="Sat, 9 Jul 2011 15:57:59 -0500"  >&lt;p&gt;I agree Sebastian. I&apos;ve raised this issue for input from clojure-dev (looking for stylistic guidelines for contrib libraries) because I think both problems need to be fixed.&lt;/p&gt;

&lt;p&gt;My current leaning is toward supporting three paths:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;success: rollback transaction if user code sets rollback true, else commit&lt;/li&gt;
	&lt;li&gt;Exception: rollback transaction and rethrow (without wrapping)&lt;/li&gt;
	&lt;li&gt;Throwable: allow it to escape, take no action&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    <comment id="26567" author="paraseba" created="Tue, 12 Jul 2011 11:05:15 -0500"  >&lt;p&gt;I&apos;m attaching a patch that fixes the problem without adding any tests.&lt;/p&gt;</comment>
                    <comment id="26578" author="seancorfield" created="Sun, 17 Jul 2011 03:28:59 -0500"  >&lt;p&gt;On success, commit unless rollback has been set (in which case rollback).&lt;br/&gt;
On Exception, rollback and rethrow as-is.&lt;br/&gt;
On Error (Throwable), allow it to escape.&lt;br/&gt;
In all cases, set rollback false and restore auto-commit setting.&lt;/p&gt;

&lt;p&gt;The only two changes here should be:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Exception is no longer wrapped when thrown (may break code that expected the wrapping?)&lt;/li&gt;
	&lt;li&gt;No commit attempted on Error (Throwable)&lt;/li&gt;
&lt;/ul&gt;
</comment>
                </comments>
                    <attachments>
                    <attachment id="10276" name="0001-Don-t-commit-transaction-in-case-of-exceptions.patch" size="1220" author="paraseba" created="Tue, 12 Jul 2011 11:05:15 -0500" />
                    <attachment id="10269" name="test-mechanism.patch" size="3767" author="paraseba" created="Mon, 4 Jul 2011 00:23:36 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-5] Adding stropping and qualified identifiers to java.jdbc</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-5</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Following the following discussion:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://groups.google.com/d/topic/clojure/j7fXdkFMrec/discussion&quot;&gt;https://groups.google.com/d/topic/clojure/j7fXdkFMrec/discussion&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;ve implemented a simple stropping feature that also provide a way to supply qualified identifiers and a function (as-identifier) that can be reused in user code. The implementation can be found there:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/budu/java.jdbc/commit/0822d323cd4d267533a88241be68cb184ff9bf28&quot;&gt;https://github.com/budu/java.jdbc/commit/0822d323cd4d267533a88241be68cb184ff9bf28&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It&apos;s also attached to this issue.&lt;/p&gt;

&lt;p&gt;Here&apos;s some example of how that feature could be used:&lt;/p&gt;

&lt;p&gt;    user&amp;gt; (create-table :foo &lt;span class=&quot;error&quot;&gt;&amp;#91;:bar :integer&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;:baz :text&amp;#93;&lt;/span&gt;)&lt;br/&gt;
    &quot;CREATE TABLE foo (bar integer, baz text)&quot;&lt;br/&gt;
    user&amp;gt; (create-table &lt;span class=&quot;error&quot;&gt;&amp;#91;:schema :foo&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;:bar :integer&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;:baz :text&amp;#93;&lt;/span&gt;)&lt;br/&gt;
    &quot;CREATE TABLE schema.foo (bar integer, baz text)&quot;&lt;br/&gt;
    user&amp;gt; (with-stropping \&quot; identity (create-table &lt;span class=&quot;error&quot;&gt;&amp;#91;:schema :foo&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;:bar :integer&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;:baz :text&amp;#93;&lt;/span&gt;))&lt;br/&gt;
    &quot;CREATE TABLE \&quot;schema\&quot;.\&quot;foo\&quot; (\&quot;bar\&quot; integer, \&quot;baz\&quot; text)&quot;&lt;br/&gt;
    user&amp;gt; (with-stropping [[ ]] identity (create-table &lt;span class=&quot;error&quot;&gt;&amp;#91;:schema :foo&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;:bar :integer&amp;#93;&lt;/span&gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;:baz :text&amp;#93;&lt;/span&gt;))&lt;br/&gt;
    &quot;CREATE TABLE &lt;span class=&quot;error&quot;&gt;&amp;#91;schema&amp;#93;&lt;/span&gt;.&lt;span class=&quot;error&quot;&gt;&amp;#91;foo&amp;#93;&lt;/span&gt; (&lt;span class=&quot;error&quot;&gt;&amp;#91;bar&amp;#93;&lt;/span&gt; integer, &lt;span class=&quot;error&quot;&gt;&amp;#91;baz&amp;#93;&lt;/span&gt; text)&quot;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14404">JDBC-5</key>
            <summary>Adding stropping and qualified identifiers to java.jdbc</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="budu">Nicolas Buduroi</assignee>
                                <reporter username="budu">Nicolas Buduroi</reporter>
                        <labels>
                    </labels>
                <created>Sun, 24 Apr 2011 16:48:04 -0500</created>
                <updated>Sat, 9 Jul 2011 14:28:25 -0500</updated>
                    <resolved>Sat, 9 Jul 2011 14:28:24 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="26390" author="seancorfield" created="Sun, 24 Apr 2011 20:21:22 -0500"  >&lt;p&gt;Duplicate of &lt;a href=&quot;https://github.com/clojure/java.jdbc/issues/7&quot;&gt;https://github.com/clojure/java.jdbc/issues/7&lt;/a&gt; - thanx for the patch!&lt;/p&gt;</comment>
                    <comment id="26560" author="seancorfield" created="Sat, 9 Jul 2011 14:28:24 -0500"  >&lt;p&gt;with-naming-strategy, with-quoted-identifiers, as-quoted-str address this.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10198" name="0001-Added-the-with-stropping-macro-and-the-as-identifier.patch" size="6346" author="budu" created="Sun, 24 Apr 2011 16:48:04 -0500" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10003" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                <customfieldname>Waiting On</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>seancorfield</customfieldvalue>
                </customfieldvalues>
            </customfield>
                            </customfields>
    </item>

<item>
            <title>[JDBC-2] create-table should allow table-spec</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-2</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;create-table takes a name and a seq of column-specs but does not allow any table-spec to follow that so you cannot, for example, the engine type / charset / etc.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14417">JDBC-2</key>
            <summary>create-table should allow table-spec</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Sun, 8 May 2011 21:14:11 -0500</created>
                <updated>Sat, 9 Jul 2011 14:19:18 -0500</updated>
                    <resolved>Sat, 9 Jul 2011 14:19:18 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="26559" author="seancorfield" created="Sat, 9 Jul 2011 14:18:49 -0500"  >&lt;p&gt;create-table now allows optional :table-spec &quot;table level attributes&quot; at the end of the specs.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-10] Attempts to return generated keys on batch inserts fails on PostgreSQL and MS SQL Server</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-10</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;From andreasmk2:&lt;/p&gt;

&lt;p&gt;&quot;JDBC driver for PostgreSQL and ms-sql does not support returning of generated keys from statements executed in batch. The SQL exception was thrown when &apos;do-prepared&amp;#42;&apos; was called with &apos;return-keys&apos; set to true. Currently only the function &apos;insert-values&apos; calls a new method &apos;do-single-prepared-get-keys&amp;#42;&apos; when single relation is inserted.&quot;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14472">JDBC-10</key>
            <summary>Attempts to return generated keys on batch inserts fails on PostgreSQL and MS SQL Server</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Sat, 18 Jun 2011 18:04:46 -0500</created>
                <updated>Mon, 27 Jun 2011 22:12:10 -0500</updated>
                    <resolved>Mon, 27 Jun 2011 22:12:10 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="26533" author="seancorfield" created="Mon, 27 Jun 2011 17:54:12 -0500"  >&lt;p&gt;I just committed a potential fix for this. It&apos;s available in the Sonatype snapshots repo.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-7] Clojure 1.2 compatibility</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-7</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Per Aaron Bedra: &quot;I just tried to use this on a 1.2 project that we have been working on for a while now and the dynamic defs are killing it.  Can I change it to use the older ^{:dynamic true} syntax and release a new version? Is that the only thing that is keeping this off of 1.2?  For now we need to make sure the new contrib libraries are 1.2 compatible, so people can start transitioning now.&quot;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14454">JDBC-7</key>
            <summary>Clojure 1.2 compatibility</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="1" iconUrl="http://dev.clojure.org/jira/images/icons/priority_blocker.gif">Blocker</priority>
                    <status id="5" iconUrl="http://dev.clojure.org/jira/images/icons/status_resolved.gif">Resolved</status>
                    <resolution id="1">Completed</resolution>
                                <assignee username="aaron">Aaron Bedra</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Mon, 6 Jun 2011 16:35:36 -0500</created>
                <updated>Wed, 8 Jun 2011 20:02:46 -0500</updated>
                    <resolved>Wed, 8 Jun 2011 20:02:46 -0500</resolved>
                                                                    <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>

<item>
            <title>[JDBC-1] Provide option to return SQL generated / execution stats</title>
                <link>http://dev.clojure.org/jira/browse/JDBC-1</link>
                <project id="10021" key="JDBC">java.jdbc</project>
                        <description>&lt;p&gt;Shantanu: Provide a mechanism to show the SQL being executed (configurable, so that it can be turned off)&lt;/p&gt;

&lt;p&gt;Sean: Good idea. Even better, a way to access statistics about the prepared statement after execution - timing etc?&lt;/p&gt;

&lt;p&gt;Shantanu: Yes, that would be an add-on value to show how are the queries performing.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14416">JDBC-1</key>
            <summary>Provide option to return SQL generated / execution stats</summary>
                <type id="4" iconUrl="http://dev.clojure.org/jira/images/icons/improvement.gif">Enhancement</type>
                                <priority id="4" iconUrl="http://dev.clojure.org/jira/images/icons/priority_minor.gif">Minor</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="seancorfield">Sean Corfield</assignee>
                                <reporter username="seancorfield">Sean Corfield</reporter>
                        <labels>
                    </labels>
                <created>Sun, 8 May 2011 21:12:52 -0500</created>
                <updated>Sun, 8 May 2011 21:12:52 -0500</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                                                                            </customfields>
    </item>
</channel>
</rss>