From ee713f155f8afd9a0bc6156388c472df119a97fd Mon Sep 17 00:00:00 2001 From: Russ Tyndall Date: Wed, 25 Apr 2012 12:24:30 -0400 Subject: [PATCH] added (*in-subselect* t) bindings around rendering out update/insert values --- ChangeLog | 5 +++++ sql/expressions.lisp | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 677611e..891b8e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,11 @@ about the current state of thread-safety in clsql. This should be incorporated into the main docs at some point. +2012-04-25 Russ Tyndall + * sql/expressions.lisp (output-sql): on rendering update/insert + expression values, ensure that *in-subselect* is bound to T + so that the values will be correctly paren delimited + 2012-04-24 Nathan Bird * sql/expressions.lisp (output-sql): on mysql CREATE TABLE diff --git a/sql/expressions.lisp b/sql/expressions.lisp index 1479e67..7071227 100644 --- a/sql/expressions.lisp +++ b/sql/expressions.lisp @@ -813,7 +813,8 @@ uninclusive, and the args from that keyword to the end." (output-sql attributes database)) (when values (write-string " VALUES " *sql-stream*) - (output-sql values database)) + (let ((clsql-sys::*in-subselect* t)) + (output-sql values database))) (when query (write-char #\Space *sql-stream*) (output-sql query database))) @@ -870,7 +871,8 @@ uninclusive, and the args from that keyword to the end." (write-string "UPDATE " *sql-stream*) (output-sql table database) (write-string " SET " *sql-stream*) - (output-sql (apply #'vector (update-assignments)) database) + (let ((clsql-sys::*in-subselect* t)) + (output-sql (apply #'vector (update-assignments)) database)) (output-sql-where-clause where database))) t) -- 2.34.1