add a test (from the #407 ticket)

This commit is contained in:
Sean Corfield 2023-08-26 14:54:46 -07:00
parent bf1517a60e
commit aa4ebf5f47

View file

@ -1054,6 +1054,12 @@ ORDER BY id = ? DESC
(is (= ["SELECT `A``B`"] (sut/format {:select (keyword "A`B")} {:dialect :mysql}))) (is (= ["SELECT `A``B`"] (sut/format {:select (keyword "A`B")} {:dialect :mysql})))
(is (= ["SELECT \"A\"\"B\""] (sut/format {:select (keyword "A\"B")} {:dialect :oracle})))) (is (= ["SELECT \"A\"\"B\""] (sut/format {:select (keyword "A\"B")} {:dialect :oracle}))))
(deftest issue-407-temporal
(is (= ["SELECT f.* FROM foo AS f FOR SYSTEM_TIME ALL WHERE f.id = ?" 1]
(sut/format {:select :f.* :from [[:foo :f :for :system-time :all]] :where [:= :f.id 1]})))
(is (= ["SELECT * FROM foo FOR SYSTEM_TIME ALL WHERE id = ?" 1]
(sut/format {:select :* :from [[:foo :for :system-time :all]] :where [:= :id 1]}))))
(deftest issue-421-mysql-replace-into (deftest issue-421-mysql-replace-into
(is (= ["INSERT INTO table VALUES (?, ?, ?)" 1 2 3] (is (= ["INSERT INTO table VALUES (?, ?, ?)" 1 2 3]
(sut/format {:insert-into :table :values [[1 2 3]]}))) (sut/format {:insert-into :table :values [[1 2 3]]})))