Skip to content

Commit

Permalink
fix default values clause bug
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Corfield <sean@corfield.org>
  • Loading branch information
seancorfield committed Jan 16, 2025
1 parent 6c0c66e commit 4f5b0ed
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* More performance optimizations via PR [#560](https://github.com/seancorfield/honeysql/pull/560) [@alexander-yakushev](https://github.com/alexander-yakushev).
* Fix two broken links to the [HoneySQL web app](https://john.shaffe.rs/honeysql/) via PR [#559](https://github.com/seancorfield/honeysql/pull/559) [@whatacold](https://github.com/whatacold).
* Make SQL Server dialect auto-lift Boolean values to parameters since SQL Server has no `TRUE` / `FALSE` literals.
* Fix bug in `DEFAULT` values clause (that omitted some values).

* 2.6.1243 -- 2024-12-13
* Address [#558](https://github.com/seancorfield/honeysql/issues/558) by adding `:patch-into` (and `patch-into` helper) for XTDB (but in core).
Expand Down
2 changes: 1 addition & 1 deletion doc/clause-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ user=> (sql/format {:insert-into :table
:values [{:a 1 :b 2 :c 3}
:default
{:a 4 :b 5 :c 6}]})
["INSERT INTO table (a, b, c) VALUES (?, ?, ?), DEFAULT, (?, ?, ?)" 6 5 4]
["INSERT INTO table (a, b, c) VALUES (?, ?, ?), DEFAULT, (?, ?, ?)" 1 2 3 4 5 6]
user=> (sql/format {:insert-into :table
:values [[1 2 3] :default [4 5 6]]})
["INSERT INTO table VALUES (?, ?, ?), DEFAULT, (?, ?, ?)" 1 2 3 4 5 6]
Expand Down
2 changes: 1 addition & 1 deletion src/honey/sql.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@
(if (sequential? sqls')
(str "(" (join ", " sqls') ")")
sqls'))
(if params' (into params params') params')])
(if params' (into params params') params)])
[[] []]
(map (fn [m]
(if (map? m)
Expand Down

0 comments on commit 4f5b0ed

Please # to comment.