[elephant-cvs] CVS elephant/src/db-clsql
ieslick
ieslick at common-lisp.net
Fri Feb 2 23:51:58 UTC 2007
Update of /project/elephant/cvsroot/elephant/src/db-clsql
In directory clnet:/tmp/cvs-serv3271/src/db-clsql
Modified Files:
sql-collections.lisp sql-controller.lisp sql-transaction.lisp
Log Message:
Large changeset to enable thread safety; more *auto-commit* removal; sql class-root fix; new transaction model; cleaned up defaults for *store-controller*
--- /project/elephant/cvsroot/elephant/src/db-clsql/sql-collections.lisp 2007/01/26 14:41:08 1.8
+++ /project/elephant/cvsroot/elephant/src/db-clsql/sql-collections.lisp 2007/02/02 23:51:58 1.9
@@ -133,7 +133,7 @@
(do ((i 0 (1+ i))
(tup tuples (cdr tup)))
((= i len) nil)
- (setf (aref (:sql-crsr-ks cursor) i)
+ (setf (aref (:sql-crsr-ks cursor) i)
(deserialize-from-base64-string (caar tup) sc)))
(sort (:sql-crsr-ks cursor) #'my-generic-less-than)
(setf (:sql-crsr-ck cursor) 0)
--- /project/elephant/cvsroot/elephant/src/db-clsql/sql-controller.lisp 2007/01/26 14:41:08 1.13
+++ /project/elephant/cvsroot/elephant/src/db-clsql/sql-controller.lisp 2007/02/02 23:51:58 1.14
@@ -356,7 +356,7 @@
(elephant::initialize-serializer sc)
;; These should get oid 0 and 1 respectively
(setf (slot-value sc 'root) (make-instance 'sql-btree :sc sc :from-oid 0))
- (setf (slot-value sc 'class-root) (make-instance 'sql-indexed-btree :sc sc :from-oid 1))
+ (setf (slot-value sc 'class-root) (make-instance 'sql-btree :sc sc :from-oid 1))
sc)
)
)
@@ -371,6 +371,7 @@
;; (actually clsql has pooling and other complications, I am not sure
;; that this is complete.)
(clsql:disconnect :database (controller-db sc))
+ (setf (slot-value sc 'class-root) nil)
(setf (slot-value sc 'root) nil)
))
--- /project/elephant/cvsroot/elephant/src/db-clsql/sql-transaction.lisp 2006/11/11 18:41:11 1.3
+++ /project/elephant/cvsroot/elephant/src/db-clsql/sql-transaction.lisp 2007/02/02 23:51:58 1.4
@@ -37,11 +37,14 @@
(clsql::set-autocommit t)))))
(defmethod controller-start-transaction ((sc sql-store-controller) &key &allow-other-keys)
- (clsql:start-transaction :database (controller-db sc)))
+ (clsql:start-transaction :database (controller-db sc))
+ 'active-clsql-transaction)
-(defmethod controller-commit-transaction ((sc sql-store-controller) &key &allow-other-keys)
+(defmethod controller-commit-transaction ((sc sql-store-controller) transaction &key &allow-other-keys)
+ (declare (ignore transaction))
(clsql:commit :database (controller-db sc)))
-(defmethod controller-abort-transaction ((sc sql-store-controller) &key &allow-other-keys)
+(defmethod controller-abort-transaction ((sc sql-store-controller) transaction &key &allow-other-keys)
+ (declare (ignore transaction))
(clsql:rollback :database (controller-db sc)))
More information about the Elephant-cvs
mailing list