db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject cvs commit: db-torque/src/generator/src/java/org/apache/torque/engine/database/transform XmlToData.java
Date Fri, 04 Mar 2005 06:37:02 GMT
tfischer    2005/03/03 22:37:02

  Modified:    xdocs    changes.xml
               src/generator/src/java/org/apache/torque/engine/database/transform
                        XmlToData.java
  Log:
  TRQS267:  In the datasql task, single quotes in strings are escaped by doubling the single
quote, not by a backslash.
  I do not know any database where doubling the quotes do not work. If there is one, please
let me know.
  Thanks to Garth Fielding for the patch.
  
  Revision  Changes    Path
  1.146     +3 -0      db-torque/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/db-torque/xdocs/changes.xml,v
  retrieving revision 1.145
  retrieving revision 1.146
  diff -u -r1.145 -r1.146
  --- changes.xml	23 Feb 2005 17:32:09 -0000	1.145
  +++ changes.xml	4 Mar 2005 06:37:02 -0000	1.146
  @@ -28,6 +28,9 @@
     <body>
   
     <release version="3.2-dev" date="in CVS">
  +    <action type="fix" dev="tfischer">
  +      TRQS267: Fix escpaing of single quotes in datasql task 
  +    </action>
       <action type="add" dev="tfischer">
         Added support for schema support at generate time. 
         See <a href="schema-howto.html">Schema Support Howto</a>.
  
  
  
  1.13      +2 -2      db-torque/src/generator/src/java/org/apache/torque/engine/database/transform/XmlToData.java
  
  Index: XmlToData.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/database/transform/XmlToData.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XmlToData.java	22 Feb 2004 06:27:19 -0000	1.12
  +++ XmlToData.java	4 Mar 2005 06:37:02 -0000	1.13
  @@ -244,7 +244,7 @@
           {
               StringBuffer sb = new StringBuffer();
               sb.append("'");
  -            sb.append(StringUtils.replace(val, "'", "\\'"));
  +            sb.append(StringUtils.replace(val, "'", "''"));
               sb.append("'");
               return sb.toString();
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message