From e6a52064b983a4152dbfb75b1597efed46d02e2d Mon Sep 17 00:00:00 2001
From: Stefan Bodewig Note that you may want to enclose your statements in
Auto commit flag for database connection (default false)
No, default "false"
+
+
+print
+ Print result sets from the statements (default false)
+ No, default "false"
+
+
+showheaders
+ Print headers for result sets from the statements (default true)
+ No, default "true"
+
+
+output
+ Output file for result sets (defaults to System.out)
+ No (print to System.out by default)
+
+
classpath
+ Classpath used to load driver
+ No (use system classpath)
+Examples
@@ -80,7 +100,7 @@ truncate table some_other_table;
<![CDATA[
... ]]>
sections so you don't
need to escape <
, >
&
-or other special characters. For exampe:
+<sql driver="org.database.jdbcDriver" @@ -94,6 +114,24 @@ update some_table set column1 = column1 + 1 where column2 < 42; ]]></sql>
The following connects to the database given in url as the sa user using the org.database.jdbcDriver and executes the sql statements contained within the file data.sql, with output piped to outputfile.txt, searching /some/jdbc.jar as well as the system classpath for the driver class.
+ ++ +<sql + driver="org.database.jdbcDriver" + url="jdbc:database-url" + userid="sa" + password="pass" + src="data.sql" + print="yes" + output="outputfile.txt" + > +<classpath> + <pathelement location="/some/jdbc.jar"> +</classpath> +</sql> +