X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=sql%2Futils.lisp;h=ef4f990e456afe391266e97f42ebbc14cccc19fe;hp=362d16c178529ae67659996c181bbe5f2e4aac73;hb=706c29aa55b25e5b7c7f90460589a4702b1390e7;hpb=d9f41af62750c622945bb17b622a39689ee5b840 diff --git a/sql/utils.lisp b/sql/utils.lisp index 362d16c..ef4f990 100644 --- a/sql/utils.lisp +++ b/sql/utils.lisp @@ -52,21 +52,11 @@ (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))) -(dotimes (i (length unescaped)) - (setf (char escaped i) - (cond ((equal (char unescaped i) #\-) - #\_) - ;; ... - (t - (char unescaped i))))) - escaped)) - (defmacro without-interrupts (&body body) #+allegro `(mp:without-scheduling ,@body) #+clisp `(progn ,@body)