parent
b5e55cf95a
commit
6e5e1b100d
2 changed files with 6 additions and 4 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
* Fix `:cast` formatting when quoting is enabled, via PR [#443](https://github.com/seancorfield/honeysql/pull/443) [duddlf23](https://github.com/duddlf23).
|
* Fix `:cast` formatting when quoting is enabled, via PR [#443](https://github.com/seancorfield/honeysql/pull/443) [duddlf23](https://github.com/duddlf23).
|
||||||
* Fix [#441](https://github.com/seancorfield/honeysql/issues/441) by adding `:replace-into` to in-flight clause order (as well as registering it for the `:mysql` dialect).
|
* Fix [#441](https://github.com/seancorfield/honeysql/issues/441) by adding `:replace-into` to in-flight clause order (as well as registering it for the `:mysql` dialect).
|
||||||
* Fix [#434](https://github.com/seancorfield/honeysql/issues/434) by special-casing `:'ARRAY`.
|
* Fix [#434](https://github.com/seancorfield/honeysql/issues/434) by special-casing `:'ARRAY`.
|
||||||
|
* Fix [#433](https://github.com/seancorfield/honeysql/issues/433) by supporting additional `WITH` syntax, via PR [#432](https://github.com/seancorfield/honeysql/issues/432), [@MawiraIke](https://github.com/MawiraIke). _[Technically, this was in 2.4.947, but I kept the issue open while I wordsmithed the documentation]_
|
||||||
|
|
||||||
* 2.4.947 -- 2022-11-05
|
* 2.4.947 -- 2022-11-05
|
||||||
* Fix [#439](https://github.com/seancorfield/honeysql/issues/439) by rewriting how DDL options are processed; also fixes [#386](https://github.com/seancorfield/honeysql/issues/386) and [#437](https://github.com/seancorfield/honeysql/issues/437); **Whilst this is intended to be purely a bug fix, it has the potential to be a breaking change -- hence the version jump to 2.4!**
|
* Fix [#439](https://github.com/seancorfield/honeysql/issues/439) by rewriting how DDL options are processed; also fixes [#386](https://github.com/seancorfield/honeysql/issues/386) and [#437](https://github.com/seancorfield/honeysql/issues/437); **Whilst this is intended to be purely a bug fix, it has the potential to be a breaking change -- hence the version jump to 2.4!**
|
||||||
|
|
|
||||||
|
|
@ -319,7 +319,8 @@ order they would appear in a valid SQL statement).
|
||||||
|
|
||||||
## with, with-recursive
|
## with, with-recursive
|
||||||
|
|
||||||
These provide CTE support for SQL Server. The argument to
|
These provide CTE support for several databases.
|
||||||
|
In the most common form, the argument to
|
||||||
`:with` (or `:with-recursive`) is a sequences of pairs, each of
|
`:with` (or `:with-recursive`) is a sequences of pairs, each of
|
||||||
a result set name (or description) and either of; a basic SQL
|
a result set name (or description) and either of; a basic SQL
|
||||||
statement, a string, a keyword or a symbol.
|
statement, a string, a keyword or a symbol.
|
||||||
|
|
@ -336,9 +337,9 @@ user=> (sql/format '{with ((stuff {select (:*) from (foo)}),
|
||||||
```
|
```
|
||||||
|
|
||||||
When the expression is a basic SQL statement in any of the pairs,
|
When the expression is a basic SQL statement in any of the pairs,
|
||||||
the resulting syntax of the pair is `with ident AS expr` as shown above.
|
the resulting syntax of the pair is `WITH ident AS expr` as shown above.
|
||||||
However, when the expression is a string, a keyword or a symbol, the resulting
|
However, when the expression is a string, a keyword or a symbol, the resulting
|
||||||
syntax of the pair is of the form `with expr AS ident` like this:
|
syntax of the pair is of the form `WITH expr AS ident` like this:
|
||||||
|
|
||||||
```clojure
|
```clojure
|
||||||
user=> (sql/format '{with ((ts_upper_bound "2019-08-01 15:23:00"))
|
user=> (sql/format '{with ((ts_upper_bound "2019-08-01 15:23:00"))
|
||||||
|
|
@ -349,7 +350,7 @@ user=> (sql/format '{with ((ts_upper_bound "2019-08-01 15:23:00"))
|
||||||
```
|
```
|
||||||
|
|
||||||
The syntax only varies for each pair and so you can use both SQL statements
|
The syntax only varies for each pair and so you can use both SQL statements
|
||||||
and keywords/strings/symbols in the same WITH clause like this:
|
and keywords/strings/symbols in the same `WITH` clause like this:
|
||||||
|
|
||||||
```clojure
|
```clojure
|
||||||
user=> (sql/format '{with ((ts_upper_bound "2019-08-01 15:23:00")
|
user=> (sql/format '{with ((ts_upper_bound "2019-08-01 15:23:00")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue