All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
- Return additional error details when
: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.
- Add method to convert PostgreSQL JSON objects to Clojure collections.
0.4.7 - 2020-01-27
- Some functions (sql-update!,sql-delete! and sql-execute!) had their return value keys different from the spec definition. As spec doesn't validate return values we didn't notice it before.
0.4.6 - 2019-11-27
- Added a function to convert clojure collections into JDBC array objects.
0.4.5 - 2019-10-29
- sql-delete! wasn't working with tables that had underscores in their names, if we were referring to them using keywords having hyphens.
0.4.4 - 2019-10-24
- Bumped minimum Leiningen version to 2.9.0
- Reorganize dev profile definition. The goal is to let profiles.clj file inside the project directory override some settings on demand (e.g., inject CIDER dependencies for different versions)
0.4.3 - 2019-10-21
0.4.2 - 2019-07-30
- Relaxed spec & preconditions on pg-enum->keyword to also accept strings, in addition to PGobjects. Some versions of Postgresl or Postgresql client drivers return enums as plain strings, instead of wrapped in a PGObject value.
0.4.1 - 2019-07-29
- pg-enum->keyword, which is the complementary function of pg-enum->keyword.
0.4.0 - 2019-07-19
- Moved Clojars artifact to magnet/sql-utils, to use the same naming pattern as other Manget artifacts.
- Added a more general version of map->pg-jsonb, called coll->pg-jsonb. It accepts not only maps, but any Clojure collection.
- A couple of typos in README.md (thanks to @lucassousaf and @bgalartza for spotting them!)
0.3.0 - 2019-07-18
- Several operations where creating their log entries with the wrong keywords, which would mislead anyone reading the logs. It has now been fixed.
0.2.0 - 2019-07-18
- Relaxed the spec on map->pg-jsonb. Previously we only accepted maps, now we also accept
nil
(which is converted into the null
JSON value). - Added unit tests to check for that new supported case.
0.1.0 - 2019-07-16