ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Dawson" <tim.daw...@notiva.com>
Subject [patch] added file reference capability to SQL task
Date Mon, 11 Mar 2002 16:28:10 GMT
This patch adds the capability to have a SQL file reference another
file. Rather than relying on a nested FileSet that has no specified
order, you can specify a sql file that will refer to the files one at a
time, e.g. 

-- foo.sql --
select * from foo;
@bar.sql
@baz.sql

-- bar.sql --
select * from bar;

-- baz.sql --
select * from baz;

will execute 
select * from foo;
select * from bar;
select * from baz;

I made this change to the <sql> task because our DBA had been using this
approach for sql files run from SQLPLUS and I wanted to be able to
automate that process with Ant so it could be part of our auto-build.
(plus I didn't want to install the SQL client on our build box)

If the sql being executed comes from a file, and the file references are
relative, I made them relative to the original file, not the JVM's
current directory, which seemed like it would be a little easier to
maintain.

---
Tim Dawson
Lead Technical Architect
Notiva Corporation

Mime
View raw message