Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:seancorfield/honeysql into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
seancorfield committed Sep 22, 2024
2 parents 4efa9a3 + de6fe93 commit 53a6ea0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/clause-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 53a6ea0

Please sign in to comment.