Release 0.9.9 fixes #253

This commit is contained in:
Sean Corfield 2020-03-02 16:01:14 -08:00
parent ed20b39056
commit 9fb3d42660
5 changed files with 14 additions and 3 deletions

View file

@ -1,3 +1,7 @@
## 0.9.9
* Fix #253 by supporting non-sequential join expressions.
## 0.9.8
* Fix #249 by adding `honeysql.format/*namespace-as-table?*` and `:namespace-as-table?` option to `format`. (@seancorfield)

View file

@ -1,6 +1,6 @@
{
"name": "@honeysql/honeysql",
"version": "0.9.8",
"version": "0.9.9",
"license": "EPL-1.0",
"homepage": "https://github.com/jkk/honeysql",
"repository": {

View file

@ -1,4 +1,4 @@
(defproject honeysql "0.9.8"
(defproject honeysql "0.9.9"
:description "SQL as Clojure data structures"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}

View file

@ -545,7 +545,7 @@
(str (upper-case (name type)) " "))
"JOIN " (to-sql table)
(when pred
(if (= :using (first pred))
(if (and (sequential? pred) (= :using (first pred)))
(str " USING (" (->> pred rest (map quote-identifier) comma-join) ")")
(str " ON " (format-predicate* pred))))))

View file

@ -285,3 +285,10 @@
(java.util.Locale/setDefault original-locale)))))]
(is (= (format-with-locale "en")
(format-with-locale "tr"))))))
(deftest join-on-true-253
;; used to work on honeysql 0.9.2; broke in 0.9.3
(is (= ["SELECT foo FROM bar INNER JOIN table t ON TRUE"]
(format {:select [:foo]
:from [:bar]
:join [[:table :t] true]}))))