projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r9811: * sql/oodml.lisp: add DATABASE-OUTPUT-SQL-AS-TYPE method specialisation
[clsql.git]
/
sql
/
oodml.lisp
diff --git
a/sql/oodml.lisp
b/sql/oodml.lisp
index 624cadf059a1871fe4dc37c043a79aae6f75a71c..4562be8558eb43b0b79e2be50f58b2881052bfda 100644
(file)
--- a/
sql/oodml.lisp
+++ b/
sql/oodml.lisp
@@
-473,13
+473,17
@@
(declare (ignore database db-type))
val)
(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)))
(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))
(defmethod read-sql-value (val type database db-type)
(declare (ignore type database db-type))
(read-from-string val))