X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=sql%2Fexpressions.lisp;h=2098cf3e1d33e4cc287f4e8f91db01cebce191b9;hp=88293b30d360e24207e187e85c54e12bac7d99dd;hb=67a677df17f4af2cbf6e57294605f2454c392e00;hpb=aa707c93f55554dc5447c58f24e1b3ad4c01f0b9 diff --git a/sql/expressions.lisp b/sql/expressions.lisp index 88293b3..2098cf3 100644 --- a/sql/expressions.lisp +++ b/sql/expressions.lisp @@ -694,7 +694,7 @@ uninclusive, and the args from that keyword to the end." stmt (write-string "DELETE FROM " *sql-stream*) (typecase from - (symbol (write-string (sql-escape from) *sql-stream*)) + ((or symbol string) (write-string (sql-escape from) *sql-stream*)) (t (output-sql from database))) (when where (write-string " WHERE " *sql-stream*) @@ -831,8 +831,7 @@ uninclusive, and the args from that keyword to the end." (defmethod database-output-sql ((str string) database) (declare (optimize (speed 3) (safety 1) - #+cmu (extensions:inhibit-warnings 3)) - (simple-string str)) + #+cmu (extensions:inhibit-warnings 3))) (let ((len (length str))) (declare (type fixnum len)) (cond ((zerop len) @@ -842,7 +841,8 @@ uninclusive, and the args from that keyword to the end." (concatenate 'string "'" str "'")) (t (let ((buf (make-string (+ (* len 2) 2) :initial-element #\'))) - (do* ((i 0 (incf i)) + (declare (simple-string buf)) + (do* ((i 0 (incf i)) (j 1 (incf j))) ((= i len) (subseq buf 0 (1+ j))) (declare (type fixnum i j))