Made identifiers specified as strings be treated as the canonical name
[clsql.git] / sql / utils.lisp
index e6176cbb0a18f110620931938172e74b91472d3b..4ecf757e0bcf2a93c096d0e9ed78f15144a9a7bb 100644 (file)
 
 (defun sql-escape (identifier)
   "Change hyphens to underscores, ensure string"
-  (let ((unescaped (etypecase identifier
-                     (symbol (symbol-name identifier))
-                     (string identifier))))
-    (substitute #\_ #\- unescaped)))
+  (etypecase identifier
+    (symbol (substitute #\_ #\- (symbol-name identifier)))
+    (string identifier)))
 
 (defmacro without-interrupts (&body body)
   #+allegro `(mp:without-scheduling ,@body)