X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Ftest-oodml.lisp;h=29b80592a9f75948a8cfe8478ca85dc0513ea077;hb=818295fa37036acb348ff24ea926b9d7c9f33cba;hp=dadbfcbe6d542d753d7b20c80c21f562b5d22a30;hpb=a288098897afcc735a99d11999dbb30ce825d892;p=clsql.git diff --git a/tests/test-oodml.lisp b/tests/test-oodml.lisp index dadbfcb..29b8059 100644 --- a/tests/test-oodml.lisp +++ b/tests/test-oodml.lisp @@ -211,6 +211,13 @@ (slot-value a 'loc)))) 10 10 "subloc-1" "a subloc") +(deftest :oodml/select/23 + (with-dataset *ds-artists* + (length (clsql:select 'artist :flatp t :caching nil))) + 0) + + + ;; test retrieval is deferred (deftest :oodm/retrieval/1 (with-dataset *ds-employees* @@ -299,15 +306,16 @@ ;; tests update-record-from-slot (deftest :oodml/update-records/2 (with-dataset *ds-employees* + ;(start-sql-recording :type :both) (values (employee-email (car (clsql:select 'employee :where [= 1 [slot-value 'employee 'emplid]] :flatp t :caching nil))) - (progn - (setf (slot-value employee1 'email) "lenin-nospam@soviet.org") - (clsql:update-record-from-slot employee1 'email) + (progn + (setf (slot-value employee1 'email) "lenin-nospam@soviet.org") + (clsql:update-record-from-slot employee1 'email) (employee-email (car (clsql:select 'employee :where [= 1 [slot-value 'employee 'emplid]] @@ -614,6 +622,17 @@ ((42.0d0)) ((24.13d0))) +(deftest :oodml/update-records/11 + (with-dataset *ds-artists* + (clsql:update-records-from-instance artist1) + (list (name artist1) (artist_id artist1))) + ("Mogwai" 1)) + +(deftest :oodml/update-records/12 + (with-dataset *ds-artists* + (clsql:update-records-from-instance artist1) + (list (name artist1) (genre artist1))) + ("Mogwai" "Unknown")) ;; tests update-instance-from-records (deftest :oodml/update-instance/1