X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Foodml.lisp;h=4562be8558eb43b0b79e2be50f58b2881052bfda;hb=d9937e92697e07d701defd1fdcee7100d005fdf6;hp=624cadf059a1871fe4dc37c043a79aae6f75a71c;hpb=cbf3adcc7e49f244b047d2a821c11bde653f9649;p=clsql.git diff --git a/sql/oodml.lisp b/sql/oodml.lisp index 624cadf..4562be8 100644 --- a/sql/oodml.lisp +++ b/sql/oodml.lisp @@ -473,13 +473,17 @@ (declare (ignore database db-type)) val) -(defmethod database-output-sql-as-type ((type (eql 'char)) - val database db-type) +(defmethod database-output-sql-as-type ((type (eql 'char)) val database db-type) (declare (ignore database db-type)) (etypecase val (character (write-to-string val)) (string val))) +(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))) + (defmethod read-sql-value (val type database db-type) (declare (ignore type database db-type)) (read-from-string val))