From: Arthur Axel 'fREW' Schmidt Date: Mon, 21 May 2012 19:49:37 +0000 (-0500) Subject: Add missing quote function to SQLServer producer X-Git-Tag: v0.11012~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bd0a45e0ec1e79c09849e6ebc3d84b8cee5d223d;p=dbsrgits%2FSQL-Translator.git Add missing quote function to SQLServer producer --- diff --git a/Changes b/Changes index 5e020c3..2b8502d 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,4 @@ +* Add missing quote function to SQLServer producer * Fix incorrect Parser::DBI documentation (RT#60878) # ---------------------------------------------------------- diff --git a/lib/SQL/Translator/Generator/DDL/SQLServer.pm b/lib/SQL/Translator/Generator/DDL/SQLServer.pm index 4b3383e..2141999 100644 --- a/lib/SQL/Translator/Generator/DDL/SQLServer.pm +++ b/lib/SQL/Translator/Generator/DDL/SQLServer.pm @@ -89,7 +89,7 @@ sub unique_constraint_multiple { 'CREATE UNIQUE NONCLUSTERED INDEX ' . $self->unique_constraint_name($constraint) . ' ON ' . $self->quote($constraint->table->name) . ' (' . - join( ', ', $constraint->fields ) . ')' . + join( ', ', map $self->quote($_), $constraint->fields ) . ')' . ' WHERE ' . join( ' AND ', map $self->quote($_->name) . ' IS NOT NULL', grep { $_->is_nullable } $constraint->fields ) . ';'