Update of /project/elephant/cvsroot/elephant/src/elephant In directory common-lisp:/tmp/cvs-serv13327/src/elephant
Modified Files: classes.lisp classindex.lisp Log Message: New Configuration mechanism. Minor test changes. At least to SQL-side fixes.
--- /project/elephant/cvsroot/elephant/src/elephant/classes.lisp 2006/02/21 19:40:03 1.2 +++ /project/elephant/cvsroot/elephant/src/elephant/classes.lisp 2006/02/22 20:18:51 1.3 @@ -18,6 +18,9 @@ ;;; (in-package "ELEPHANT")
+(defvar *debug-si* nil) + + (defmethod initialize-instance :before ((instance persistent) &rest initargs &key from-oid @@ -128,7 +131,7 @@ aren't used. We also handle writing any indices after the class is fully initialized. Calls the next method for the transient slots." - (let* ((class (class-of instance)) + (let* ((class (find-class (class-name (class-of instance)))) (oid (oid instance)) (persistent-slot-names (persistent-slot-names class))) (flet ((persistent-slot-p (item) @@ -172,7 +175,7 @@ ;; via a cursor without going through the cursor abstraction. There has to be a ;; better way to do this. (when (and (indexed class) (not from-oid)) - (let ((class-index (find-class-index (class-of instance)))) + (let ((class-index (find-class-index class))) (when class-index (with-transaction (:store-controller (get-con class-index)) (setf (get-value oid class-index) instance))))) --- /project/elephant/cvsroot/elephant/src/elephant/classindex.lisp 2006/02/22 17:15:49 1.3 +++ /project/elephant/cvsroot/elephant/src/elephant/classindex.lisp 2006/02/22 20:18:51 1.4 @@ -354,8 +354,9 @@ (get-instances-by-value (find-class class) slot-name value))
(defmethod get-instances-by-value ((class persistent-metaclass) slot-name value) - (declare (optimize (speed 3) (safety 1) (space 1)) - (type (or string symbol) slot-name)) + (declare + (optimize (speed 3) (safety 1) (space 1)) + (type (or string symbol) slot-name)) (let ((instances nil)) (with-btree-cursor (cur (find-inverted-index class slot-name)) (multiple-value-bind (exists? skey val pkey) (cursor-pset cur value)