Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JdbcSQLException when calling exec w/update or delete query map #7

Merged
merged 1 commit into from
Dec 4, 2014
Merged

JdbcSQLException when calling exec w/update or delete query map #7

merged 1 commit into from
Dec 4, 2014

Conversation

laser
Copy link
Contributor

@laser laser commented Dec 4, 2014

It appears to be the case that a recent commit modified the behavior of the exec function, causing update and delete-queries to use j/query instead of j/execute!. This ultimately results in a JdbcSQLException.

The offending line of code can be found here. My patch modifies that line to read:

(or (:update query) (:delete query))

Using version 0.1.9 of oj, I was able to reproduce the failure with the following expressions:

(oj/exec {:update {:completed "true"}, :where {:id 2}, :table :todos} db-spec)
(oj/exec {:table :todos :delete true :where {:id 2}} db-spec)

Take care,

Erin

@taylorlapeyre
Copy link
Owner

😳 Not sure know how I didn't catch this. Must be one of those days.

Thank you for the fix.

taylorlapeyre added a commit that referenced this pull request Dec 4, 2014
…bc-query

JdbcSQLException when calling `exec` w/update or delete query map
@taylorlapeyre taylorlapeyre merged commit f0165b4 into taylorlapeyre:master Dec 4, 2014
@taylorlapeyre
Copy link
Owner

@laser You can find your fix in 0.2.1. Thanks again.

@laser
Copy link
Contributor Author

laser commented Dec 4, 2014

No worries! Thanks for rolling out such a useful library.

Erin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants