db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Dudziak <tom...@gmail.com>
Subject Re: Todo/issues. to handle before release..
Date Tue, 20 Dec 2005 23:43:03 GMT
On 12/21/05, Jean T. Anderson <jta@bristowhill.com> wrote:

Hi Jean,

> I'm a committer on derby (and on the db pmc). I'm definitely interested
> it using it and showing how it can be used with derby. If somebody can
> point me to a simple example or to a test I could turn into an example,
> that might be a good way to get me started.

The OJB-Derby sample that we did at ApacheCon already uses DdlUtils,
so just have a look at it :-)
Right now, I'm adding unit tests for DdlUtils and I'm using Derby for
that, so for a really short sample of the Ant task adapted from the
DdlUtils unit tests:

    <taskdef name="ddl2Database"
             classname="org.apache.ddlutils.task.DdlToDatabaseTask"
             classpathref="compilation-classpath"/>
    <ddl2Database>
      <database driverclassname="org.apache.derby.jdbc.EmbeddedDriver"
                url="jdbc:derby:target/database/ddlutils"
                username="app"
                password=""/>
      <fileset dir="${src.schema.dir}"
                 includes="*schema.xml"/>

      <createdatabase failonerror="true"/>
      <writeschematodatabase alterdatabase="false"/>
    </ddl2Database>

The API is not really diffcult either:

http://db.apache.org/ddlutils/api-usage.html

Tom

Mime
View raw message