Show :lift example in :raw
This commit is contained in:
parent
429761f106
commit
1f4c4ff7ba
1 changed files with 8 additions and 0 deletions
|
|
@ -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'"]
|
=> ["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
|
```clojure
|
||||||
(-> (select :*)
|
(-> (select :*)
|
||||||
(from :foo)
|
(from :foo)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue