X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Fclasses.lisp;h=bd87f785648f2cebcac80f7e1d9084a90fd97300;hb=d0b59237966d6fbc27adcbbae11fa85087ea122d;hp=bf74b6ecc3e4c8e6f01fee30820eaa91517421bf;hpb=b2ff4969e20cce173d403de7542d5bf0e46938d7;p=clsql.git diff --git a/sql/classes.lisp b/sql/classes.lisp index bf74b6e..bd87f78 100644 --- a/sql/classes.lisp +++ b/sql/classes.lisp @@ -141,11 +141,16 @@ :type ',type))) (defmethod output-sql ((expr sql-ident-attribute) database) - (with-slots (qualifier name type) - expr + (with-slots (qualifier name type) expr (if (and (not qualifier) (not type)) - (write-string (sql-escape (convert-to-db-default-case - (symbol-name name) database)) *sql-stream*) + (etypecase name + ;; Honor care of name + (string + (write-string name *sql-stream*)) + (symbol + (write-string (sql-escape (convert-to-db-default-case + (symbol-name name) database)) *sql-stream*))) + ;;; KMR: The TYPE field is used by CommonSQL for type conversion -- it ;;; should not be output in SQL statements #+ignore @@ -581,9 +586,7 @@ uninclusive, and the args from that keyword to the end." (write-string " FROM " *sql-stream*) (typecase from (list (output-sql (apply #'vector from) database)) - (string (write-string - (sql-escape - (convert-to-db-default-case from database)) *sql-stream*)) + (string (write-string from *sql-stream*)) (t (output-sql from database)))) (when inner-join (write-string " INNER JOIN " *sql-stream*)