bodewig 01/09/28 02:48:28
Modified: docs/manual/CoreTasks Tag: ANT_14_BRANCH sql.html
Log:
add documentation for <sql>'s nested <fileset>
Revision Changes Path
No revision
No revision
1.4.2.2 +25 -0 jakarta-ant/docs/manual/CoreTasks/sql.html
Index: sql.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTasks/sql.html,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -u -r1.4.2.1 -r1.4.2.2
--- sql.html 2001/08/28 21:50:53 1.4.2.1
+++ sql.html 2001/09/28 09:48:28 1.4.2.2
@@ -124,6 +124,12 @@
<td valign="top" align="center">Yes, unless statements enclosed within
tags</td>
</tr>
</table>
+<h4>fileset</h4>
+<p>You can specify multiple source files via nested <a
+href="../CoreTypes/fileset.html">fileset</a> elements. Each file of
+the fileset will be run in a transaction of its own, the order by
+which the files of a single fileset will be executed is not
+defined.</p>
<h4>classpath</h4>
<p><code>Sql</code>'s <em>classpath</em> attribute is a <a
href="../using.html#path">PATH like structure</a> and can also be set via a
nested
@@ -194,6 +200,25 @@
<transaction src="data1.sql" />
<transaction src="data2.sql" />
<transaction src="data3.sql" />
+ <transaction>
+ truncate table some_other_table;
+ </transaction>
+</sql>
+</pre></blockquote>
+
+<p>The following example does the same as (and may execute additional
+SQL files if there are more files matching the pattern
+<code>data*.sql</code>) but doesn't guarantee that data1.sql will be
+run before <code>data2.sql</code>.</p>
+
+<blockquote><pre><sql
+ driver="org.database.jdbcDriver"
+ url="jdbc:database-url"
+ userid="sa"
+ password="pass" >
+ <fileset dir=".">
+ <include name="data*.sql" />
+ </fileset>
<transaction>
truncate table some_other_table;
</transaction>