r9212: Automated commit for Debian build of clsql upstream-version-2.10.8
[clsql.git] / tests / test-oodml.lisp
index 6ea820a615a97e3f92678cf5831955717ac37679..84046fcdd20167045e0c5d411cbde4ec8356f8ac 100644 (file)
                          :order-by [last-name]))
   ("Vladamir Lenin" "Vladamir Putin"))
 
-;; sqlite fails this because it is typeless 
 (deftest :oodml/select/5
     (length (clsql:select 'employee :where [married] :flatp t))
   3)
 
+(deftest :oodml/select/6
+    (slot-value (caar (clsql:select 'employee :where [= 1 [emplid]])) 'married)
+  t)
+
+(deftest :oodml/select/7
+    (slot-value (caar (clsql:select 'employee :where [= 4 [emplid]])) 'married)
+  nil)
+
+(deftest :oodml/select/8
+    (let ((a (caar (clsql:select 'address :where [= 1 [emplid]]))))
+      (values
+       (slot-value a 'street-number)
+       (slot-value a 'street-name)
+       (slot-value a 'city)
+       (slot-value a 'postal-code)))
+  10 "Park Place" "Leningrad" 123)
+
+(deftest :oodml/select/9
+    (let ((a (caar (clsql:select 'address :where [= 2 [emplid]]))))
+      (values
+       (slot-value a 'street-number)
+       (slot-value a 'street-name)
+       (slot-value a 'city)
+       (slot-value a 'postal-code)))
+  nil "" "no city" 0)
+
 ;; tests update-records-from-instance 
 (deftest :oodml/update-records/1
     (values