From 250ceb7959ea948ef7620605478a17b4f109b7af Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Thu, 13 Oct 2005 05:09:00 +0000 Subject: [PATCH] r10783: 11 Oct 2005 Kevin Rosenberg * 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 | 8 ++++++++ sql/expressions.lisp | 5 +++++ sql/generic-postgresql.lisp | 10 ++++++++++ sql/metaclasses.lisp | 3 +++ 4 files changed, 26 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3518c6e..e95d31a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +11 Oct 2005 Kevin Rosenberg + * 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 * Version 3.3.0 * sql/time.lisp: Apply patch from Alan Shields adding DATE type. diff --git a/sql/expressions.lisp b/sql/expressions.lisp index e62d593..23eae96 100644 --- a/sql/expressions.lisp +++ b/sql/expressions.lisp @@ -131,6 +131,11 @@ :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) diff --git a/sql/generic-postgresql.lisp b/sql/generic-postgresql.lisp index ac01e7b..c196a45 100644 --- a/sql/generic-postgresql.lisp +++ b/sql/generic-postgresql.lisp @@ -49,6 +49,16 @@ (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 diff --git a/sql/metaclasses.lisp b/sql/metaclasses.lisp index c76a210..332c5c0 100644 --- a/sql/metaclasses.lisp +++ b/sql/metaclasses.lisp @@ -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)))) -- 2.34.1