r9797: * sql/oodml.lisp: on Lispworks, use weak valued hash tables for
authorMarcus Pearce <m.t.pearce@city.ac.uk>
Fri, 16 Jul 2004 14:51:39 +0000 (14:51 +0000)
committerMarcus Pearce <m.t.pearce@city.ac.uk>
Fri, 16 Jul 2004 14:51:39 +0000 (14:51 +0000)
        object caching.
        * sql/expressions.lisp: Fix SQL generation for the symbol NIL.

ChangeLog
sql/expressions.lisp
sql/oodml.lisp

index fe3f1d2bf1a99a6e1d21770b5ee9e8ffea2a4513..933a542c463b2574726f5dca95d7e215e1a65319 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+16 Jul 2004 Marcus Pearce <m.t.pearce@city.ac.uk> 
+       * sql/oodml.lisp: on Lispworks, use weak valued hash tables for 
+       object caching. 
+       * sql/expressions.lisp: Fix SQL generation for the symbol NIL. 
+
 16 Jul 2004 Marcus Pearce <m.t.pearce@city.ac.uk> 
        * sql/expressions.lisp: reactivate caching of generated SQL strings. 
        Move methods for DATABASE-OUTPUT-SQL, OUTPUT-SQL and SQL-HASH-KEY 
index 2f40e33a6e67f640b107a0a2dc9d444941c9287d..7f0ad1f82ff601a6556a8d45080fcb481494ba27 100644 (file)
@@ -859,11 +859,13 @@ uninclusive, and the args from that keyword to the end."
 
 (let ((keyword-package (symbol-package :foo)))
   (defmethod database-output-sql ((sym symbol) database)
-    (convert-to-db-default-case
-     (if (equal (symbol-package sym) keyword-package)
-        (concatenate 'string "'" (string sym) "'")
-        (symbol-name sym))
-     database)))
+  (if (null sym) 
+      +null-string+ 
+      (convert-to-db-default-case
+       (if (equal (symbol-package sym) keyword-package)
+           (concatenate 'string "'" (string sym) "'")
+           (symbol-name sym))
+       database))))
 
 (defmethod database-output-sql ((tee (eql t)) database)
   (declare (ignore database))
index 78fd88648db8ca12cd081605d7d7bcf84d3c5e6c..174b35a95f375d43465f20082c57c6ae1d87ba92 100644 (file)
@@ -1097,7 +1097,8 @@ as elements of a list."
   (unless (record-caches database)
     (setf (record-caches database)
          (make-hash-table :test 'equal
-                          #+allegro :values #+allegro :weak)))
+                          #+allegro :values #+allegro :weak
+                           #+lispworks :weak-kind #+lispworks :value)))
   (setf (gethash (compute-records-cache-key targets qualifiers)
                 (record-caches database)) results)
   results)