Show :lift example in :raw

This commit is contained in:
Sean Corfield 2021-01-30 12:42:08 -08:00
parent 429761f106
commit 1f4c4ff7ba

View file

@ -391,6 +391,14 @@ parameters. If you need a string parameter lifted, you must use `:param`.
=> ["SELECT * FROM foo WHERE expired_at < now() - '5 seconds'"]
```
```clojure
(-> (select :*)
(from :foo)
(where [:< :expired_at [:raw ["now() - '" [:lift 5] " seconds'"]]])
(sql/format))
=> ["SELECT * FROM foo WHERE expired_at < now() - '? seconds'" 5]
```
```clojure
(-> (select :*)
(from :foo)