ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs SQLExec.java
Date Thu, 10 May 2001 15:25:46 GMT
conor       01/05/10 08:25:46

  Modified:    src/main/org/apache/tools/ant/taskdefs SQLExec.java
  Log:
  Allow the SQL Delimiter to be set so that Oracle stored procs may be
  entered.
  
  Submitted by:	Mike Williams <mikew@cortexebusiness.com.au>
  
  Revision  Changes    Path
  1.17      +13 -1     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
  
  Index: SQLExec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- SQLExec.java	2001/04/03 11:32:31	1.16
  +++ SQLExec.java	2001/05/10 15:25:43	1.17
  @@ -132,6 +132,11 @@
       private Vector transactions = new Vector();
   
       /**
  +     * SQL Statement delimiter
  +     */
  +    private String delimiter = ";";
  +    
  +    /**
        * Print SQL results.
        */
       private boolean print = false;
  @@ -248,6 +253,13 @@
       }
   
       /**
  +     * Set the statement delimiter.
  +     */
  +    public void setDelimiter(String delimiter) {
  +        this.delimiter = delimiter;
  +    }
  +
  +    /**
        * Set the print flag.
        */
       public void setPrint(boolean print) {
  @@ -441,7 +453,7 @@
                   // so we cannot just remove it, instead we must end it
                   if (line.indexOf("--") >= 0) sql += "\n";
   
  -                if (sql.endsWith(";")){
  +                if (sql.endsWith(delimiter)){
                       log("SQL: " + sql, Project.MSG_VERBOSE);
                       execSQL(sql.substring(0, sql.length()-1), out);
                       sql = "";
  
  
  

Mime
View raw message