db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r289997 - in /db/ddlutils/trunk/src/java/org/apache/ddlutils/builder: MSSqlBuilder.java SybaseBuilder.java
Date Sun, 18 Sep 2005 23:04:43 GMT
Author: tomdz
Date: Sun Sep 18 16:04:38 2005
New Revision: 289997

URL: http://svn.apache.org/viewcvs?rev=289997&view=rev
Log:
Add suppression of the "SET QUOTED_IDENTIFIER ON" statement for Sybase/Microsoft SQL Server
when no delimited identifiers shall be used

Modified:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/builder/MSSqlBuilder.java
    db/ddlutils/trunk/src/java/org/apache/ddlutils/builder/SybaseBuilder.java

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/builder/MSSqlBuilder.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/builder/MSSqlBuilder.java?rev=289997&r1=289996&r2=289997&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/builder/MSSqlBuilder.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/builder/MSSqlBuilder.java Sun Sep 18 16:04:38
2005
@@ -177,8 +177,11 @@
      */
     private void writeQuotationOnStatement() throws IOException
     {
-        print("SET quoted_identifier on");
-        printEndOfStatement();
+        if (getPlatformInfo().isUseDelimitedIdentifiers())
+        {
+            print("SET quoted_identifier on");
+            printEndOfStatement();
+        }
     }
 
     /* (non-Javadoc)
@@ -210,6 +213,13 @@
      */
     private String getQuotationOnStatement()
     {
-        return "SET quoted_identifier on" + getPlatformInfo().getSqlCommandDelimiter() +
"\n";
+        if (getPlatformInfo().isUseDelimitedIdentifiers())
+        {
+            return "SET quoted_identifier on" + getPlatformInfo().getSqlCommandDelimiter()
+ "\n";
+        }
+        else
+        {
+            return "";
+        }
     }
 }

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/builder/SybaseBuilder.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/builder/SybaseBuilder.java?rev=289997&r1=289996&r2=289997&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/builder/SybaseBuilder.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/builder/SybaseBuilder.java Sun Sep 18 16:04:38
2005
@@ -110,8 +110,11 @@
      */
     private void writeQuotationOnStatement() throws IOException
     {
-        print("SET quoted_identifier on");
-        printEndOfStatement();
+        if (getPlatformInfo().isUseDelimitedIdentifiers())
+        {
+            print("SET quoted_identifier on");
+            printEndOfStatement();
+        }
     }
 
     /* (non-Javadoc)
@@ -143,6 +146,13 @@
      */
     private String getQuotationOnStatement()
     {
-        return "SET quoted_identifier on" + getPlatformInfo().getSqlCommandDelimiter() +
"\n";
+        if (getPlatformInfo().isUseDelimitedIdentifiers())
+        {
+            return "SET quoted_identifier on" + getPlatformInfo().getSqlCommandDelimiter()
+ "\n";
+        }
+        else
+        {
+            return "";
+        }
     }
 }



Mime
View raw message