X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Fexpressions.lisp;h=7a8c11a6b226d1202ad6158830a4f0a8fd701676;hb=b475f491ffc24cacd2d7250e356a3d3a15532e94;hp=7071227a4b0964c1be2a6ec971fd30cdbec59c67;hpb=ee713f155f8afd9a0bc6156388c472df119a97fd;p=clsql.git diff --git a/sql/expressions.lisp b/sql/expressions.lisp index 7071227..7a8c11a 100644 --- a/sql/expressions.lisp +++ b/sql/expressions.lisp @@ -128,10 +128,8 @@ "Top-level call for generating SQL strings. Returns an SQL string appropriate for DATABASE which corresponds to the supplied lisp expression SQL-EXPR." - (progv '(*sql-stream*) - `(,(make-string-output-stream)) - (output-sql sql-expr database) - (get-output-stream-string *sql-stream*))) + (with-output-to-string (*sql-stream*) + (output-sql sql-expr database))) (defmethod output-sql (expr database) (write-string (database-output-sql expr database) *sql-stream*) @@ -1118,7 +1116,7 @@ uninclusive, and the args from that keyword to the end." (defmethod database-identifier ( name &optional database find-class-p &aux cls) - "A function that takes whatever you give it, recurively coerces it, + "A function that takes whatever you give it, recursively coerces it, and returns a database-identifier. (escaped-database-identifiers *any-reasonable-object*) should be called to @@ -1141,6 +1139,7 @@ uninclusive, and the args from that keyword to the end." a new db-id with that string as escaped" (let ((s (sql-output id database))) (make-instance '%database-identifier :escaped s :unescaped s)))) + (setf name (dequote name)) (etypecase name (null nil) (string (%make-database-identifier name database))