Merge branch 'develop' of github.com:seancorfield/honeysql into develop

This commit is contained in:
Sean Corfield 2024-09-21 18:12:14 -07:00
commit 53a6ea0f8a

View file

@ -476,6 +476,16 @@ user=> (sql/format {:with [[[:stuff {:columns [:id :name]}]
> 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.
You can specify `MATERIALIZED`, `NOT MATERIALIZED` for the CTE:
```clojure
user=> (sql/format {:with [[:stuff {:select :*
:from :table} :not-materialized]]
:select :*
:from :stuff})
["WITH stuff AS NOT MATERIALIZED (SELECT * FROM table) SELECT * FROM stuff"]
```
`:with-recursive` follows the same rules as `:with` and produces `WITH RECURSIVE` instead of just `WITH`.
## intersect, union, union-all, except, except-all