fixes #526 by using format-var in ddl destructuring instead of format-entity
Signed-off-by: Sean Corfield <sean@corfield.org>
This commit is contained in:
parent
b07ac78d68
commit
a3ef215485
2 changed files with 10 additions and 2 deletions
|
|
@ -1,7 +1,8 @@
|
||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
* 2.6.next in progress
|
* 2.6.next in progress
|
||||||
* Address [#533](https://github.com/seancorfield/honeysql/issues/533) by adding `honey.sql/*escape-?*` which can be bound to `false` to prevent `?` being escaped to `??` when used as an operator, function, or
|
* Address [#533](https://github.com/seancorfield/honeysql/issues/533) by adding `honey.sql/*escape-?*` which can be bound to `false` to prevent `?` being escaped to `??` when used as an operator or function.
|
||||||
|
* Address [#526](https://github.com/seancorfield/honeysql/issues/526) by using `format-var` in DDL, instead of `format-entity`.
|
||||||
* Update JDK test matrix (adopt -> temurin, 19 -> 21).
|
* Update JDK test matrix (adopt -> temurin, 19 -> 21).
|
||||||
|
|
||||||
* 2.6.1147 -- 2024-06-12
|
* 2.6.1147 -- 2024-06-12
|
||||||
|
|
|
||||||
|
|
@ -1233,7 +1233,14 @@
|
||||||
:else
|
:else
|
||||||
[(butlast coll) (last coll) nil]))]
|
[(butlast coll) (last coll) nil]))]
|
||||||
(into [(str/join " " (map sql-kw prequel))
|
(into [(str/join " " (map sql-kw prequel))
|
||||||
(when table (format-entity table))
|
(when table
|
||||||
|
(let [[v & more] (format-var table)]
|
||||||
|
(when (seq more)
|
||||||
|
(throw (ex-info (str "DDL syntax error at: "
|
||||||
|
(pr-str table)
|
||||||
|
" - expected table name")
|
||||||
|
{:unexpected more})))
|
||||||
|
v))
|
||||||
(when ine (sql-kw ine))]
|
(when ine (sql-kw ine))]
|
||||||
(when opts
|
(when opts
|
||||||
(format-ddl-options opts context)))))
|
(format-ddl-options opts context)))))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue