Allow optional connect parameters for postgresql databases
[clsql.git] / sql / oodml.lisp
index 9bd2ab66dea8f5db6b74f2665ea31092b2ebe899..f797be0b02b36d611021bdffa4e9d3afc9477fea 100644 (file)
 
 (defmethod database-output-sql-as-type ((type (eql 'float)) val database db-type)
   (declare (ignore database db-type))
-  (let ((*read-default-float-format* (type-of val)))
-    (format nil "~F" val)))
+  (if (eq (type-of val) 'null)
+      nil
+      (let ((*read-default-float-format* (type-of val)))
+       (format nil "~F" val))))
 
 (defmethod read-sql-value (val type database db-type)
   (declare (ignore type database db-type))
@@ -949,7 +951,6 @@ maximum of MAX-LEN instances updated in each query."
                                    (listify order-by)))
            (join-where nil))
 
-
       ;;(format t "sclasses: ~W~%ijc: ~W~%tables: ~W~%" sclasses immediate-join-classes tables)
 
       (dolist (ob order-by-slots)
@@ -1094,7 +1095,7 @@ as elements of a list."
             ;; one selected table. This is required so FIND-ALL won't duplicate
             ;; the field
             (when (and order-by (= 1 (length target-args)))
-              (let ((table-name  (view-table (find-class (car target-args))))
+              (let ((table-name (view-table (find-class (car target-args))))
                     (order-by-list (copy-seq (listify order-by))))
 
                 (loop for i from 0 below (length order-by-list)