fix #493 by clarifying with values
This commit is contained in:
parent
23c9597870
commit
19e73a3ebd
2 changed files with 3 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
* 2.4.next in progress
|
* 2.4.next in progress
|
||||||
|
* Address [#493](https://github.com/seancorfield/honeysql/issues/493) by clarifying use of `:values` in CTEs (using `:with`).
|
||||||
* Address [#489](https://github.com/seancorfield/honeysql/issues/489) by adding more examples around `:update`.
|
* Address [#489](https://github.com/seancorfield/honeysql/issues/489) by adding more examples around `:update`.
|
||||||
|
|
||||||
* 2.4.1033 -- 2023-05-22
|
* 2.4.1033 -- 2023-05-22
|
||||||
|
|
|
||||||
|
|
@ -431,6 +431,8 @@ user=> (sql/format {:with [[[:stuff {:columns [:id :name]}]
|
||||||
["WITH stuff (id, name) AS (VALUES (?, ?), (?, ?)) SELECT id, name FROM stuff" 1 "Sean" 2 "Jay"]
|
["WITH stuff (id, name) AS (VALUES (?, ?), (?, ?)) SELECT id, name FROM stuff" 1 "Sean" 2 "Jay"]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> Note: you must use the vector-of-vectors format for `:values` here -- if you try to use the vector-of-maps format, `VALUES` will be preceded by the column names (keys from the maps) and the resultant SQL will be invalid.
|
||||||
|
|
||||||
`:with-recursive` follows the same rules as `:with` and produces `WITH RECURSIVE` instead of just `WITH`.
|
`:with-recursive` follows the same rules as `:with` and produces `WITH RECURSIVE` instead of just `WITH`.
|
||||||
|
|
||||||
## intersect, union, union-all, except, except-all
|
## intersect, union, union-all, except, except-all
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue