X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Foodml.lisp;h=2a5b0510b849d5e92c84b626b110630588fc1c35;hb=b28024cab233e1816706f4017d74899ac8ce5e0a;hp=8eec40e98fed5840c6aa487108d81904324c2a43;hpb=95c3d1b5fb4b3479c4d36f5560c55ba6f77654b7;p=clsql.git diff --git a/sql/oodml.lisp b/sql/oodml.lisp index 8eec40e..2a5b051 100644 --- a/sql/oodml.lisp +++ b/sql/oodml.lisp @@ -473,8 +473,12 @@ (format nil "~F" val))) (defmethod read-sql-value (val type database db-type) - (declare (ignore type database db-type)) - (read-from-string val)) + (declare (ignore database db-type)) + (cond + ((null type) val) ;;we have no desired type, just give the value + ((typep val type) val) ;;check that it hasn't already been converted. + ((typep val 'string) (read-from-string val)) ;;maybe read will just take care of it? + (T (error "Unable to read-sql-value ~a as type ~a" val type)))) (defmethod read-sql-value (val (type (eql 'string)) database db-type) (declare (ignore database db-type))