From: Kevin M. Rosenberg Date: Thu, 20 May 2004 09:06:14 +0000 (+0000) Subject: r9410: fix case where reading a float which is already convert to a float by the... X-Git-Tag: v3.8.6~425 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=12ad0234eb45fd831c5c905b8428868731ba3c54 r9410: fix case where reading a float which is already convert to a float by the backend --- diff --git a/sql/objects.lisp b/sql/objects.lisp index 5e36e75..07652f2 100644 --- a/sql/objects.lisp +++ b/sql/objects.lisp @@ -690,7 +690,11 @@ superclass of the newly-defined View Class." (defmethod read-sql-value (val (type (eql 'float)) database) (declare (ignore database)) ;; writing 1.0 writes 1, so we we *really* want a float, must do (float ...) - (float (read-from-string val))) + (etypecase val + (string + (float (read-from-string val))) + (float + val))) (defmethod read-sql-value (val (type (eql 'boolean)) database) (case (database-underlying-type database) @@ -1124,6 +1128,9 @@ ENABLE-SQL-READER-SYNTAX." target-args)))) (multiple-value-bind (target-args qualifier-args) (query-get-selections select-all-args) + (unless (or *default-database* (getf qualifier-args :database)) + (signal-no-database-error nil)) + (cond ((select-objects target-args) (let ((caching (getf qualifier-args :caching t))