You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by Valicek Arnost <ar...@turboconsult.cz> on 2006/03/16 19:20:24 UTC

DDLUtils and Informix (how to write it)

Hi,

I found this interesting tool DDLUtils, but it isn't supporting Inforxmix database, so I'd like to create support for Informix. 

After looking to souce code, it seems, that I shoud implement some classes in org.apache.ddlutils.platform.[informix] package.

Is there any documentation which describes what is need to support new database? Or should I learn it from implementation for other databases :)

Or, in worser case, did somebody already tried it and failded? :)

thanks for reply

Arnost

Re: DDLUtils and Informix (how to write it)

Posted by Martin van den Bemt <ml...@mvdb.net>.
Added to the wiki :)

Mvgr,
Martin

Thomas Dudziak wrote:
> On 3/16/06, Valicek Arnost <ar...@turboconsult.cz> wrote:
> 
> 
>>I found this interesting tool DDLUtils, but it isn't supporting Inforxmix database, so I'd like to create support for Informix.
> 
> 
> Yes, because we don't currently have access to an Informix server.
> However I just saw that it is possible to download a trial version of
> Informix Dynamic Server Express Edition, so I might give it a go.
> 
> 
>>After looking to souce code, it seems, that I shoud implement some classes in org.apache.ddlutils.platform.[informix] package.
>>
>>Is there any documentation which describes what is need to support new database? Or should I learn it from implementation for other databases :)
> 
> 
> The steps that I take to implement a new platform are as follows:
> 
> * Create a package, e.g. org.apache.ddlutils.platform.informix, and
> create a platform class (InformixPlatform) in it that inherits from
> PlatformImplBase
> 
> * Add the jdbc driver classname and jdbc subprotocol as constants to
> the platform class
> 
> * Register the platform class in PlatformFactory (including against
> the driver classname and the subprotocol)
> 
> * Create in src/test a jdbc.properties.informix file with the
> appropriate JDBC settings
> 
> * Get the datatype tests to run with the these tests, i.e. that they
> really access the database (though they'll most likely fail)
> 
> * Add a model reader and if necessary, a sql builder implementation to
> the package
> 
> * Register the native type mappings in the platform, and override
> methods in the model reader/sql builder as needed so that the datatype
> tests run successfully
> 
> * Override methods in the model reader and sql builder as needed so
> that the constraint and alteration tests run successfully
> 
> Tom
> 
> 

Re: DDLUtils and Informix (how to write it)

Posted by Thomas Dudziak <to...@gmail.com>.
On 3/16/06, Valicek Arnost <ar...@turboconsult.cz> wrote:

> I found this interesting tool DDLUtils, but it isn't supporting Inforxmix database, so I'd like to create support for Informix.

Yes, because we don't currently have access to an Informix server.
However I just saw that it is possible to download a trial version of
Informix Dynamic Server Express Edition, so I might give it a go.

> After looking to souce code, it seems, that I shoud implement some classes in org.apache.ddlutils.platform.[informix] package.
>
> Is there any documentation which describes what is need to support new database? Or should I learn it from implementation for other databases :)

The steps that I take to implement a new platform are as follows:

* Create a package, e.g. org.apache.ddlutils.platform.informix, and
create a platform class (InformixPlatform) in it that inherits from
PlatformImplBase

* Add the jdbc driver classname and jdbc subprotocol as constants to
the platform class

* Register the platform class in PlatformFactory (including against
the driver classname and the subprotocol)

* Create in src/test a jdbc.properties.informix file with the
appropriate JDBC settings

* Get the datatype tests to run with the these tests, i.e. that they
really access the database (though they'll most likely fail)

* Add a model reader and if necessary, a sql builder implementation to
the package

* Register the native type mappings in the platform, and override
methods in the model reader/sql builder as needed so that the datatype
tests run successfully

* Override methods in the model reader and sql builder as needed so
that the constraint and alteration tests run successfully

Tom