Adds basic tests for PR #34, common table expressions

This commit is contained in:
Dave Della Costa 2015-03-09 13:21:41 +09:00
parent c6b621583e
commit 6d0ff344b9

View file

@ -17,3 +17,11 @@
'foo "foo"
:foo-bar "foo_bar")
(is (= (quote-identifier "*" :style :ansi) "*")))
(deftest test-cte
(is (= (format-clause
(first {:with [[:query {:select [:foo] :from [:bar]}]]}) nil)
"WITH query AS SELECT foo FROM bar"))
(is (= (format-clause
(first {:with-recursive [[:query {:select [:foo] :from [:bar]}]]}) nil)
"WITH RECURSIVE query AS SELECT foo FROM bar")))