it can handle NIL values from the ODBC driver
* tests/benchmarks.lisp: New file with initial
benchmark suite
+ * sql/relations.lisp: fix to add subclassing support,
+ minor optimizations [Edi Weitz]
3 May 2004 Kevin Rosenberg (kevin@rosenberg.net)
* Version 2.10.8
(defun synchronize-keys (src srckey dest destkey)
(let ((skeys (if (listp srckey) srckey (list srckey)))
(dkeys (if (listp destkey) destkey (list destkey))))
- (mapcar #'(lambda (sk dk)
+ (mapc #'(lambda (sk dk)
(setf (slot-value dest dk)
(typecase sk
(symbol
(defun desynchronize-keys (dest destkey)
(let ((dkeys (if (listp destkey) destkey (list destkey))))
- (mapcar #'(lambda (dk)
+ (mapc #'(lambda (dk)
(setf (slot-value dest dk) nil))
dkeys)))
(homekey (gethash :home-key dbinfo))
(foreignkey (gethash :foreign-key dbinfo))
(to-many (gethash :set dbinfo)))
- (unless (equal (type-of value) join-class)
+ (unless (subtypep (type-of value) join-class)
(error 'clsql-type-error :slotname slot-name :typespec join-class
:value value))
(when (gethash :target-slot dbinfo)
(c :initarg :c
:type float)))
-(defun run-benchmarks (&key (report-stream *standard-output*) (sexp-report-stream nil) (count 1000))
+(defun run-benchmarks (&key (report-stream *standard-output*) (sexp-report-stream nil) (count 10000))
(let ((specs (read-specs))
(*report-stream* report-stream)
(*sexp-report-stream* sexp-report-stream))
(drop-view-from-class 'bench))
(defun benchmark-init ()
- (dotimes (i 100)
+ (dotimes (i 10)
(execute-command "INSERT INTO BENCH (A,B,C) VALUES (123,'A Medium size string',3.14159)")))
(defun benchmark-selects (n)
(clsql:initialize-database-type :database-type db-type))))
(defun write-report-banner (report-type db-type stream)
- (format *report-stream*
+ (format stream
"~&
******************************************************************************
*** CLSQL ~A begun at ~A
(defun compute-tests-for-backend (db-type db-underlying-type)
+ (declare (ignorable db-type))
(let ((test-forms '())
(skip-tests '()))
(dolist (test-form (append (test-basic-forms)