parent
ee53c54255
commit
129239a742
2 changed files with 8 additions and 1 deletions
|
|
@ -60,7 +60,7 @@
|
||||||
:select :select-distinct :select-distinct-on :select-top :select-distinct-top
|
:select :select-distinct :select-distinct-on :select-top :select-distinct-top
|
||||||
:distinct :expr :exclude :rename
|
:distinct :expr :exclude :rename
|
||||||
:into :bulk-collect-into
|
:into :bulk-collect-into
|
||||||
:insert-into :replace-into :update :delete :delete-from :truncate
|
:insert-into :replace-into :update :delete :delete-from :erase-from :truncate
|
||||||
:columns :set :from :using
|
:columns :set :from :using
|
||||||
:join-by
|
:join-by
|
||||||
:join :left-join :right-join :inner-join :outer-join :full-join
|
:join :left-join :right-join :inner-join :outer-join :full-join
|
||||||
|
|
@ -1638,6 +1638,7 @@
|
||||||
:update (check-where #'format-selector)
|
:update (check-where #'format-selector)
|
||||||
:delete (check-where #'format-selects)
|
:delete (check-where #'format-selects)
|
||||||
:delete-from (check-where #'format-selector)
|
:delete-from (check-where #'format-selector)
|
||||||
|
:erase-from (check-where #'format-selector)
|
||||||
:truncate #'format-truncate
|
:truncate #'format-truncate
|
||||||
:columns #'format-columns
|
:columns #'format-columns
|
||||||
:set #'format-set-exprs
|
:set #'format-set-exprs
|
||||||
|
|
|
||||||
|
|
@ -62,3 +62,9 @@
|
||||||
(deftest dotted-array-access-tests
|
(deftest dotted-array-access-tests
|
||||||
(is (= ["SELECT (a.b).c"]
|
(is (= ["SELECT (a.b).c"]
|
||||||
(sql/format '{select (((. (nest :a.b) :c)))}))))
|
(sql/format '{select (((. (nest :a.b) :c)))}))))
|
||||||
|
|
||||||
|
(deftest erase-from-test
|
||||||
|
(is (= ["ERASE FROM foo WHERE foo.id = ?" 42]
|
||||||
|
(-> {:erase-from :foo
|
||||||
|
:where [:= :foo.id 42]}
|
||||||
|
(sql/format)))))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue