ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian M. Savage" <jsav...@fisci.com>
Subject Re: [PATCH] Print SQL to System.out or output file
Date Wed, 27 Sep 2000 01:13:08 GMT
Ok. Here's a patch which allows the use of the classpath to load the driver. I'm not 100% sure
I did it the best way, but it does seem to work whether using a <classpath>, <classpath
refid>, or using the system classpath.

The part I'm slightly concerned about is that I don't use the DriverManager to get an instance
of the driver, but instead instantiate the driver using either the built in class loader or
the AntClassLoader depending on whether or not the user specifies a classpath.

This patch also includes changes to remove tab characters from the source, some more verbose
messages, and also a patch to the sql.html documentation.

Julian.
  ----- Original Message ----- 
  From: Eric VanLydegraf 
  To: 'ant-dev@jakarta.apache.org' 
  Sent: Saturday, September 23, 2000 3:56 AM
  Subject: RE: [PATCH] Print SQL to System.out or output file


  Here Here ! I Like the classpath idea - yet one more classpath I can build into the ant
build.xml instead of requiring it in the actuall user environment CLASSPATH.
    -----Original Message-----
    From: Tomasini Andrea [mailto:andrea.tomasini@nch.it]
    Sent: Friday, September 22, 2000 3:22 AM
    To: ant-dev@jakarta.apache.org
    Subject: R: [PATCH] Print SQL to System.out or output file


      Here's a patch to to the SQLExec.java which adds the ability to pipe the results of
SQL statements executed with <sql/> to a file or the screen. It simply prints the output
as comma delimited values, optionally printing the headers. I wrote it thinking of using it
to write queries which generate sql statements which can then be fed back into <sql/>
directive a second time.

      Here is sample usage:

                      <sql
                              driver="${db.driver}"
                              url="${db.url}"
                              userid="${db.userid}"
                              password="${db.password}"
                              print="yes"
                              showheaders="no"
                              output="output.txt">
                      select count(*) from footable
                      </sql> 

      Very Good!! What about adding a classpath attribute to locate multiple JDBC Drivers??

      Byez
      ANdreaT

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message