X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Ftest-fdml.lisp;h=a91cf9c62d6da49995799a309710cedaea27b08c;hb=49db0a8a6a6cde1581d5de0dd3c6822fd505472b;hp=53bc3faff6301b8f27b837fd1f204ae9118d83b8;hpb=1dda729b250779079efbdc1d3f6bbb3ae4a20ba4;p=clsql.git diff --git a/tests/test-fdml.lisp b/tests/test-fdml.lisp index 53bc3fa..a91cf9c 100644 --- a/tests/test-fdml.lisp +++ b/tests/test-fdml.lisp @@ -287,6 +287,22 @@ :flatp t))) t) +(deftest :fdml/select/15 + (multiple-value-bind (rows field-names) + (clsql:select [emplid] [street-number] [street-name] [city_field] [zip] + :from [address] + :where [= 1 [emplid]]) + (values + rows + (mapcar #'string-downcase field-names))) + ((1 10 "Park Place" "Leningrad" 123)) + ("emplid" "street_number" "street_name" "city_field" "zip")) + +(deftest :fdml/select/16 + (clsql:select [emplid] :from [employee] :where [= 1 [emplid]] + :field-names nil) + ((1))) + ;(deftest :fdml/select/11 ; (clsql:select [emplid] :from [employee] ; :where [= [emplid] [any [select [companyid] :from [company]]]] @@ -323,7 +339,21 @@ collect (concatenate 'string forename " " surname)) ("Yuri Andropov" "Leonid Brezhnev" "Konstantin Chernenko" "Mikhail Gorbachev" "Nikita Kruschev" "Vladamir Lenin" "Vladamir Putin" - "Josef Stalin" "Leon Trotsky" "Boris Yeltsin")) + "Josef Stalin" "Leon Trotsky" "Boris Yeltsin")) + +(deftest :fdml/loop/2 + (loop for (emplid) + being each tuple in + [select [emplid] :from [address] :order-by [emplid]] + collect emplid) + (1 2)) + +(deftest :fdml/loop/3 + (loop for emplid + being each tuple in + [select [emplid] :from [address] :order-by [emplid]] + collect emplid) + (1 2)) ;; starts a transaction deletes a record and then rolls back the deletion (deftest :fdml/transaction/1