r10783: 11 Oct 2005 Kevin Rosenberg <kevin@rosenberg.net>
authorKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 13 Oct 2005 05:09:00 +0000 (05:09 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 13 Oct 2005 05:09:00 +0000 (05:09 +0000)
        * sql/metaclasses.lisp: Commit patch from Will to
        properly set db-reader slot in effective-slot-definition
        * sql/expressions.lisp: Commit patch from Alan Shields
        adding make-load-form for sql-relational-exp
        * sql/generic-postgresql.lisp: Commit patch from Aleksandar Bakic
        adding support for new NUMBER type

ChangeLog
sql/expressions.lisp
sql/generic-postgresql.lisp
sql/metaclasses.lisp

index 3518c6ec6bc47a4f84261f19a17177701b9d4e38..e95d31a4b8b1acaf3ec315633d7e7302886c64bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+11 Oct 2005  Kevin Rosenberg <kevin@rosenberg.net>
+       * sql/metaclasses.lisp: Commit patch from Will to
+       properly set db-reader slot in effective-slot-definition
+       * sql/expressions.lisp: Commit patch from Alan Shields
+       adding make-load-form for sql-relational-exp
+       * sql/generic-postgresql.lisp: Commit patch from Aleksandar Bakic
+       adding support for new NUMBER type
+       
 17 Sep 2005  Kevin Rosenberg <kevin@rosenberg.net>
        * Version 3.3.0
        * sql/time.lisp: Apply patch from Alan Shields adding DATE type.
index e62d593ff7a5166b880978099bf0faabe9afbfff..23eae963cd33b6b8472fc792a8fdcbf1a2739691 100644 (file)
     :initform +null-string+))
   (:documentation "An SQL Attribute identifier."))
 
+(defmethod make-load-form ((self sql-relational-exp) &optional environment)
+  (make-load-form-saving-slots self
+                               :slot-names '(operator sub-expressions)
+                               :environment environment))
+
 (defmethod collect-table-refs (sql)
   (declare (ignore sql))
   nil)
index ac01e7ba073ecdfe4d2dcb91039c12796f8d3706..c196a4568d46106e58d75dbf4a61429c1181759b 100644 (file)
   (declare (ignore args database))
   "TIMESTAMP WITHOUT TIME ZONE")
 
+(defmethod database-get-type-specifier ((type (eql 'number)) args database
+                                        (db-type (eql :postgresql)))
+  (declare (ignore database db-type))
+  (cond
+   ((and (consp args) (= (length args) 2))
+    (format nil "NUMERIC(~D,~D)" (first args) (second args)))
+   ((and (consp args) (= (length args) 1))
+    (format nil "NUMERIC(~D)" (first args)))
+   (t
+    "NUMERIC")))
 
 ;;; Backend functions
 
index c76a210f6e8c6aedc3337ca93ba48027f6717fb1..332c5c058a7712ad5fd980e98c749bdf952c54f6 100644 (file)
@@ -479,6 +479,9 @@ which does type checking before storing a value in a slot."
               (delistify-dsd (view-class-slot-db-kind dsd))
             :base))
         
+        (setf (slot-value esd 'db-reader)
+          (when (slot-boundp dsd 'db-reader)
+            (delistify-dsd (view-class-slot-db-reader dsd))))
         (setf (slot-value esd 'db-writer)
           (when (slot-boundp dsd 'db-writer)
             (delistify-dsd (view-class-slot-db-writer dsd))))