ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <j_a_fernan...@yahoo.com>
Subject RE: SQLExec and Properties
Date Fri, 27 Apr 2001 20:41:21 GMT
I could really use this one.

It may be very helpful on managing our ever groing number of SQL scripts.

Jose Alberto

> -----Original Message-----
> From: Michael McCallum [mailto:michael@spinsoftware.com]
> Sent: Wednesday, April 25, 2001 8:33 PM
> To: ant-dev@jakarta.apache.org
> Subject: Re: SQLExec and Properties
> 
> 
> If anyone is interested in including the filterset patch i 
> made earlier I have adapted sqlexec to 
> use the fitlerset to replace all tokens.
> 
> I have also extended the filterset to allow abitrary tokens 
> so you can do the &&value. or 
> &foo_bar. or %anything_you_want_really% including ${foo_bar} 
> token replaces on scripts that 
> you run from sql plus. 
> 
> Found this very useful as you can run scripts and test them 
> and edit them and then put them all 
> together with a build script.
> 
> 
> On 25 Apr 2001, at 10:22, Dave King wrote:
> 
> > I'm just wondering about adding property substitution to 
> SQL used in the SQL
> > task.   I've made the changes and I'm wondering if anyone 
> else would find
> > this helpful.  Being paranoid about not breaking some 
> obscure script that
> > uses ${} in the sql, I added a replaceproperties attribute. 
>  Here's what we
> > are using it for.
> > 
> > 	<target name="create-db">
> > 		<sql
> > 			driver="${jdbc.driver}"
> > 			url="${jdbc.url}"
> > 			userid="${admin.id}"
> > 			password="${admin.password}"
> > 			replaceproperties="true"
> > 		>
> > 			IF NOT EXISTS (SELECT name FROM 
> sysdatabases WHERE
> > name = 'ant_test')
> > 			CREATE DATABASE ant_test
> > 			ON 
> > 			( NAME = ant_test_dat,
> > 				FILENAME = 
> '${mssql.data.dir}\ant_test.mdf'
> > ,
> > 				SIZE = 2MB ,
> > 				MAXSIZE = 20MB )
> > 			LOG ON
> > 			( NAME = 'ant_test_log',
> > 				FILENAME =
> > '${mssql.log.dir}\ant_test_Log.LDF' ,
> > 				SIZE = 5MB ,
> > 				MAXSIZE = 5MB 
> > 			);
> > 		</sql>
> > 	</target>
> > 
> > If this is of interest I can post a diff and the code, but 
> I'm not set up to
> > produce a patch.
> > 
> > -Peace
> > Dave
> 
> 


Mime
View raw message