add test for #515
This commit is contained in:
parent
1e44f82eb5
commit
2e8157047d
1 changed files with 16 additions and 0 deletions
|
|
@ -1293,6 +1293,22 @@ ORDER BY id = ? DESC
|
|||
(is (= ["SELECT DISTINCT * FROM table"]
|
||||
(sut/format {:select ^:distinct [:*] :from [:table]})))))
|
||||
|
||||
(deftest issue-515
|
||||
(testing ":always-quoting option"
|
||||
(is (= ["SELECT foo FROM table"]
|
||||
(sut/format '{select foo from table})))
|
||||
(is (= ["SELECT \"foo\" FROM \"table\""]
|
||||
(sut/format '{select foo from table}
|
||||
{:quoted-always #"^(foo|table)$"})))
|
||||
(is (= ["SELECT \"foo\" FROM \"table\""]
|
||||
(sut/format '{select foo from table}
|
||||
{:quoted-always #"^(foo|table)$"
|
||||
:quoted false})))
|
||||
(is (= ["SELECT \"foo\" FROM table"]
|
||||
(sut/format '{select foo from table}
|
||||
{:quoted-always #"^(foo)$"
|
||||
:quoted false})))))
|
||||
|
||||
(comment
|
||||
;; partial workaround for #407:
|
||||
(sut/format {:select :f.* :from [[:foo [:f :for :system-time]]] :where [:= :f.id 1]})
|
||||
|
|
|
|||
Loading…
Reference in a new issue