r9241: add type-modified database identifier support to SELECT
[clsql.git] / tests / test-fdml.lisp
index b74e53275479e41205f7b8d904ce3338e454c4d8..1134c913193a35001b362ae711ad12d6c791186c 100644 (file)
   ((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/17
+    (clsql:select [emplid] [last-name] :from [employee] :where [= 1 [emplid]]
+     :field-names nil)
+  ((1 "Lenin")))
+
+(deftest :fdml/select/18
+    (clsql:select [emplid :string] [last-name] :from [employee] :where [= 1 [emplid]]
+     :field-names nil)
+  (("1" "Lenin")))
+
 ;(deftest :fdml/select/11
 ;    (clsql:select [emplid] :from [employee]
 ;                :where [= [emplid] [any [select [companyid] :from [company]]]]
       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