diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f79ee1..bb960db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changes -* 2.4.next in progress +* 2.4.1066 -- 2023-08-27 * Add `:select` with function call and alias example to README (PR [#502](https://github.com/seancorfield/honeysql/pull/502) [@markbastian](https://github.com/markbastian)). * Address [#501](https://github.com/seancorfield/honeysql/issues/501) by making `INSERT INTO` (and `REPLACE INTO`) use the `:columns` or `:values` clauses to produce column names (which are then omitted from those other clauses). * Address [#497](https://github.com/seancorfield/honeysql/issues/497) by adding `:alias` special syntax. diff --git a/README.md b/README.md index 1b75569..19c459d 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ SQL as Clojure data structures. Build queries programmatically -- even at runtim ## Build -[![Clojars](https://img.shields.io/badge/clojars-com.github.seancorfield/honeysql_2.4.1045-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABjFBMVEUAAAAdCh0qDikdChwAAAAnDSY0EjM2FjUnDiYnDSYnDSYpDigyEDEEAQRGNUb///////8mDSYAAAAAAAAAAAAFAgUqEyoAAAAAAAAAAAAFAgUAAABXU1c2FjVMx+dQx+f///////9Nx+b////4/f6y4vRPt+RQtOT///9Qt+P///8oDSey4vRQr9/////3/P5hzelNx+dNx+dNx+f///8AAAAuDy0zETIAAAAoDScAAAAAAAARBREAAAAvDy40ETMwEC9gSF+Ne42ilKKuoK6Rg5B5ZXlaP1o4Gzf///9nTWZ4YncyEDF/bn/8/Pz9/P339/c1FTUlDCRRM1AbCRtlS2QyEDEuDy1gRWAxEDAzETIwEC/g4OAvDy40EjOaiZorDiq9sbzNyM3UzdQyEDE0ETMzETKflZ/UzdQ5Fzmu4fNYyuhNx+dPt+RLu9xQyOhBbo81GTuW2vCo4PJNx+c4MFE5N1lHiLFEhKQyEDGDboMzETI5Fjh5bXje2d57aHrIw8jc2NyWhJUrDioxe9o4AAAAPnRSTlMAkf+IAQj9+e7n6e31RtqAD/QAAAED+A0ZEQ8DwvkLBsmcR4aG8+cdAD6C8/MC94eP+qoTrgH+/wj1HA8eEvpXOCUAAAABYktHRA8YugDZAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wcHFjou4Z/shwAAAUpJREFUOMul0/VTwzAUB/AAwyW4y3B3h8EDNuTh7u6UDHcd8I+TbHSjWdrjju/1h77kc+3Lu5aQvyakF/r6B5wu1+DQMEBomLRtG0EpozYDCEccA4iIjIqOiY0bB5iYxHgZ4FQCpYneKmmal0aQPMOXZnUAvJhLkbpInf8NFtKCTrGImK6DJcTlDGl/BXGV6oCsrSNIYAM3aQDwl2xJYBtBB5lZAuyYgWzY3YMcNcjN2wc4EGMEFTg8+hlyfgEenygAj71Q9FBExH0wKC4p1bRTJlJWXqEAVNM05ovbXfkPAHBmAUQPAGaAsXMBLiwA8z3h0gRcsWsObuAWLJu8Awb3ZoB5T8EvS/CgBo9Y5Z8TPwXBJwlUI9Ia/yRrEZ8lID71Olrf0MiamkkL4kurDEjba+C/e2sninR0wrsH8eMTvrqIWbodjh7jyjdtCY3Aniz4jwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNS0wNy0wN1QyMjo1ODo0NiswMjowMCgWtSoAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTUtMDctMDdUMjI6NTg6NDYrMDI6MDBZSw2WAAAAAElFTkSuQmCC)](https://clojars.org/com.github.seancorfield/honeysql) -[![cljdoc](https://cljdoc.org/badge/com.github.seancorfield/honeysql?2.4.1045)](https://cljdoc.org/d/com.github.seancorfield/honeysql/CURRENT) +[![Clojars](https://img.shields.io/badge/clojars-com.github.seancorfield/honeysql_2.4.1066-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTU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mAUQPAGaAsXMBLiwA8z3h0gRcsWsObuAWLJu8Awb3ZoB5T8EvS/CgBo9Y5Z8TPwXBJwlUI9Ia/yRrEZ8lID71Olrf0MiamkkL4kurDEjba+C/e2sninR0wrsH8eMTvrqIWbodjh7jyjdtCY3Aniz4jwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNS0wNy0wN1QyMjo1ODo0NiswMjowMCgWtSoAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTUtMDctMDdUMjI6NTg6NDYrMDI6MDBZSw2WAAAAAElFTkSuQmCC)](https://clojars.org/com.github.seancorfield/honeysql) +[![cljdoc](https://cljdoc.org/badge/com.github.seancorfield/honeysql?2.4.1066)](https://cljdoc.org/d/com.github.seancorfield/honeysql/CURRENT) [![Slack](https://img.shields.io/badge/slack-HoneySQL-orange.svg?logo=slack)](https://clojurians.slack.com/app_redirect?channel=honeysql) [![Join Slack](https://img.shields.io/badge/slack-join_clojurians-orange.svg?logo=slack)](http://clojurians.net) diff --git a/doc/clause-reference.md b/doc/clause-reference.md index 4e04cb0..6fbf53e 100644 --- a/doc/clause-reference.md +++ b/doc/clause-reference.md @@ -319,8 +319,8 @@ user=> (sql/format {:refresh-materialized-view [:concurrently :products] ``` PostgreSQL does not support `IF NOT EXISTS` on `CREATE VIEW` (it supports it on -`CREATE MATERIALIZED VIEW`!) so HoneySQL also has `:create-or-replace-view` -for this case: +`CREATE MATERIALIZED VIEW`!) so, as of 2.4.1066, HoneySQL also has +`:create-or-replace-view` for this case: ```clojure user=> (sql/format {:create-or-replace-view [:products] @@ -644,7 +644,7 @@ user=> (sql/format '{insert-into (((transport t) (id, name)) {select (*) from (c Some databases do not let you override (insert) values that would override generated column values, unless your SQL specifies `OVERRIDING SYSTEM VALUE` -or `OVERRIDING USER VALUE`. In HoneySQL, you can use `:overriding-value` as +or `OVERRIDING USER VALUE`. As of 2.4.1066, you can use `:overriding-value` as an option to `:insert-into` to specify this, with either `:system` or `:user` as the option's value. The options can be specified as a hash map in the first position of the `:insert-into` clause, prior to the table specifier. @@ -668,7 +668,7 @@ VALUES (?, ?), (?, ?), (?, ?) " 1 "Car" 2 "Boat" 3 "Bike"] ``` -> Note: if you specify `:columns` for an `:insert-into` that also includes column names, or with a `:values` clause based on hash maps (which imply column names), then an order of precedence is applied: the columns specified directly in `:insert-into` take precedence, then the `:columns` clause, then the implied column names from the `:values` clause. +> Note: as of 2.4.1066, if you specify `:columns` for an `:insert-into` that also includes column names, or with a `:values` clause based on hash maps (which imply column names), then an order of precedence is applied: the columns specified directly in `:insert-into` take precedence, then the `:columns` clause, then the implied column names from the `:values` clause. Prior to 2.4.1066, you would get invalid SQL generated. ## update @@ -763,7 +763,8 @@ user=> (sql/format {:select [:u.username :s.name] ["SELECT u.username, s.name FROM user AS u, status AS s WHERE (u.statusid = s.id) AND (u.id = ?)" 9] ``` -A temporal clause starts with `:for`, followed by the time reference +As of 2.4.1066, HoneySQL supports a temporal clause that starts with `:for`, +followed by the time reference (e.g., `:system-time` or `:business-time`), followed by a temporal qualifier, one of: * `:all` diff --git a/doc/differences-from-1-x.md b/doc/differences-from-1-x.md index 0cee40a..f72a478 100644 --- a/doc/differences-from-1-x.md +++ b/doc/differences-from-1-x.md @@ -63,7 +63,7 @@ Supported Clojure versions: 1.7 and later. In `deps.edn`: ```clojure -com.github.seancorfield/honeysql {:mvn/version "2.4.1045"} +com.github.seancorfield/honeysql {:mvn/version "2.4.1066"} ``` Required as: diff --git a/doc/getting-started.md b/doc/getting-started.md index 448712e..af1befb 100644 --- a/doc/getting-started.md +++ b/doc/getting-started.md @@ -10,14 +10,14 @@ For the Clojure CLI, add the following dependency to your `deps.edn` file: ```clojure - com.github.seancorfield/honeysql {:mvn/version "2.4.1045"} + com.github.seancorfield/honeysql {:mvn/version "2.4.1066"} ``` For Leiningen, add the following dependency to your `project.clj` file: ```clojure - [com.github.seancorfield/honeysql "2.4.1045"] + [com.github.seancorfield/honeysql "2.4.1066"] ``` HoneySQL produces SQL statements but does not execute them.