X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Futils.lisp;h=d0402e8954a7fb7b85a96f77887a5f0ad62cdd08;hb=c1950032014682ed3b41a3bdf2934bff91c53740;hp=0e40b1de6a6312cf7cca7183c5164aee402f0716;hpb=f5e09161c9bbee507927de839b9691523ab53fc2;p=clsql.git diff --git a/sql/utils.lisp b/sql/utils.lisp index 0e40b1d..d0402e8 100644 --- a/sql/utils.lisp +++ b/sql/utils.lisp @@ -21,7 +21,7 @@ (defun number-to-sql-string (num) (etypecase num (integer - num) + (princ-to-string num)) (rational (float-to-sql-string (coerce num 'double-float))) (number @@ -52,10 +52,9 @@ (defun sql-escape (identifier) "Change hyphens to underscores, ensure string" - (let* ((unescaped (etypecase identifier - (symbol (symbol-name identifier)) - (string identifier))) - (escaped (make-string (length unescaped)))) + (let ((unescaped (etypecase identifier + (symbol (symbol-name identifier)) + (string identifier)))) (substitute #\_ #\- unescaped))) (defmacro without-interrupts (&body body)