X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-fdml.lisp;h=f764e73ae28db0c446fde6e42f9afdf57f2349c6;hb=7cf55152a361b4cc7666ccc4514afd00eae43007;hp=ca491ac957ca9560887809fdbfe28315e4acd1eb;hpb=aad71482a312cf287e2f6e3e926cf671cd382ec7;p=clsql.git diff --git a/tests/test-fdml.lisp b/tests/test-fdml.lisp index ca491ac..f764e73 100644 --- a/tests/test-fdml.lisp +++ b/tests/test-fdml.lisp @@ -374,6 +374,30 @@ ("Boris" "Josef" "Konstantin" "Leon" "Leonid" "Mikhail" "Nikita" "Vladamir" "Yuri")) +(deftest :fdml/select/25 + (clsql:select [first-name] :from "employee" :flatp t :distinct t + :field-names nil + :result-types nil + :order-by [first-name]) + ("Boris" "Josef" "Konstantin" "Leon" "Leonid" "Mikhail" "Nikita" "Vladamir" + "Yuri")) + +(deftest :fdml/select/26 + (clsql:select ["table" first-name] ["table" last-name] + :from '([employee "table"] [employee "join"]) + :where [and [= ["table" first-name] + ["join" first-name]] + [not [= ["table" emplid] + ["join" emplid]]]] + :order-by '(["table" last-name]) + :result-types nil :field-names nil) + (("Vladamir" "Lenin") ("Vladamir" "Putin"))) + +(deftest :fdml/select/27 + (clsql:select [coalesce [managerid] 10] :from [employee] :order-by [emplid] + :field-names nil :result-types nil :flatp t) + ("10" "1" "1" "1" "1" "1" "1" "1" "1" "1")) + ;(deftest :fdml/select/11 ; (clsql:select [emplid] :from [employee] ; :where [= [emplid] [any [select [companyid] :from [company]]]]