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 11:30:54 GMT
On 3/15/06, Yauheni Prykhodzka <yauheni.prykhodzka@pinjaworld.de> wrote:

> i did a small extension of your code. i added the
> attribute for the
> native data type to the class Column. the native type
> is returned  by a
> jdbc  driver.  you already use a mapping to return the
> native time
> calling PlatformInfo.getNativeType(int). my call is
> Column.getNativeDataType(), that returns String. jdbc
> drive (and my
> call) returns different result that you method of
> PlatformInfo. it's
> important if you want to compare databases.
> so i would like to ask if this is useful for the
> projekt? if it's so, how can i add my
> code to the project? how does it work?

I'm not entirely sure why you need this? In general, the jdbc type of
a column in a model read from a live database is almost always the
type returned by the jdbc driver. Only on some rare cases, DdlUtils
modifies the type in order to enhance the mapping.
E.g. Oracle does not have TINYINT, SMALLINT or BIGINT types, but
rather you have to use NUMBER with varying size for these. On reading
a model from an Oracle database, DdlUtils checks the size (and scale)
of these columns (which are returned as NUMERIC) and if it encounters
the exact size specification for TINYINT/SMALLINT/BIGINT, it changes
the jdbc type accordingly.


View raw message