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: a small extension of the class Column
Date Wed, 15 Mar 2006 12:21:27 GMT
On 3/15/06, Yauheni Prykhodzka <yauheni.prykhodzka@pinjaworld.de> wrote:

> i'm developing now a small tool that should compare
> databases (of the same type). I need to get native
> types possibly without any modifications. For example
> the base implementation of DdlUtils returns SMALLINT
> instead of TYNIINT for MySql. Probably i can get
> SMALLINT both for TYNIINT and for some other native
> type if i'll use the current implementation of
> DdlUtils. So the result of the compare can be wrong in
> this case!

The problem is that MySql's TINYINT is not a valid JDBC TINYINT
according to the JDBC spec. Hence, DdlUtils maps it to MySql's
SMALLINT instead.

> I agree with you that isn't a common case. But you
> need to know the native type sometimes.

You might be better off using the JDBC metadata directly which gives
you access to more info that might be of use to you. See the
DumpMetadataTask for reference.

Tom

Mime
View raw message