All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
lein
, cljfmt
, eastwood
, codox
and h2database
dependencies bump(.getSQLstate e)
returns nil
in explain-sql-error
. That can happen when using a closed database connection. This was only reproducible during development but when it happens, sql-utils
would throw an exception.:processed-values
key when inserting the row (instead of updating it). It was returning :inserted-values
instead. Now it always returns :processed-values
or :error-details
, as the spec documents.sql-update-or-insert!
to update an existing row or inserting a new one if there wasn't one with the specified conditions on the where clause. If the update modifies more than one row, it rolls back all the changes and returns failure. Implementation inspired by http://clojure-doc.org/articles/ecosystem/java_jdbc/using_sql.html#updating-or-inserting-rows-conditionally:success?
is false. The main methods of the library return a :success?
key specifying if the operation succeeded or not. But they don't give any details about why the operation was unsuccessful. That information is only sent to the logs. This additional information is especially useful when a query violates an integrity constratint (duplicate primary key, duplicate unique column, NULL value for a non-NULL column, etc). Returning this information to the caller allows it to handle the situation withou easier, without needing additional queries to find out the issue.nil
(which is converted into the null
JSON value).Can you improve this documentation? These fine people already did:
Iñaki Arenaza, spietras, lucassousaf & Lucas SousaEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close