projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for :default in db constraints. make-constraint-description: use next...
[clsql.git]
/
tests
/
test-oodml.lisp
diff --git
a/tests/test-oodml.lisp
b/tests/test-oodml.lisp
index 07d9017a5d471a14e32a6cbf7fa46be9332e008d..8aab53799e5da8ed482439adb5c7af76b53ecdb7 100644
(file)
--- a/
tests/test-oodml.lisp
+++ b/
tests/test-oodml.lisp
@@
-216,6
+216,8
@@
(length (clsql:select 'artist :flatp t :caching nil)))
0)
(length (clsql:select 'artist :flatp t :caching nil)))
0)
+
+
;; test retrieval is deferred
(deftest :oodm/retrieval/1
(with-dataset *ds-employees*
;; test retrieval is deferred
(deftest :oodm/retrieval/1
(with-dataset *ds-employees*
@@
-304,15
+306,16
@@
;; tests update-record-from-slot
(deftest :oodml/update-records/2
(with-dataset *ds-employees*
;; 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)))
(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]]
(employee-email
(car (clsql:select 'employee
:where [= 1 [slot-value 'employee 'emplid]]
@@
-625,6
+628,12
@@
(list (name artist1) (artist_id artist1)))
("Mogwai" 1))
(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
(with-dataset *ds-employees*
;; tests update-instance-from-records
(deftest :oodml/update-instance/1
(with-dataset *ds-employees*