db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DDLUTILS-86) New attribute of Column. Native type is a value of TYPE_NAME in the result set of DataBaseMetadata.getColumns(...).
Date Mon, 17 Sep 2007 01:00:33 GMT

     [ https://issues.apache.org/jira/browse/DDLUTILS-86?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas Dudziak updated DDLUTILS-86:
-----------------------------------

    Fix Version/s:     (was: 1.1)
                   1.2

> New attribute of Column. Native type is a value of TYPE_NAME in the result set of DataBaseMetadata.getColumns(...).
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: DDLUTILS-86
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-86
>             Project: DdlUtils
>          Issue Type: New Feature
>          Components: Core (No specific database)
>            Reporter: Yauheni Prykhodzka
>            Assignee: Thomas Dudziak
>            Priority: Minor
>             Fix For: 1.2
>
>
> It was been discussing with Thomas Dudziak. We try to use DdlUtils to compare two and
more databases. In some cases we need the functionality of JDBC call DataBaseMetadata.getColumns(...).
This call returns among other things the native type of the column as well. Sometimes it's
different than hard coded predefined types for a platform. This difference is very important
if you compare two databases. Here is the begin of my email to Thomas about that problem:
> > 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!
> Here also changes of classes Column and JdbcModelReader.
> Column:
> 66,68d65
> <     
> <     /** native data type */
> <     private String _nativeDataType;
> 516,518d512
> <             
> <             // compare native data type
> <             comparator.append(_nativeDataType,         other.getNativeDataType());
> 554c548
> <         builder.append(_nativeDataType);
> ---
> >         builder.append(getParsedDefaultValue());
> 560,562d553
> <         // native data type
> <         builder.append(getNativeDataType());
> <         
> 577,579d567
> <         // native data type
> <         result.append("; native type=");
> <         result.append(_nativeDataType);
> 616,618d603
> <         // native data type
> <         result.append("; native type=");
> <         result.append(_nativeDataType);        
> 623,636d607
> < 
> < 	/**
> < 	 * @return Returns the _nativeDataType.
> < 	 */
> < 	public String getNativeDataType() {
> < 		return _nativeDataType;
> < 	}
> < 
> < 	/**
> < 	 * @param dataType The _nativeDataType to set.
> < 	 */
> < 	public void setNativeDataType(String dataType) {
> < 		_nativeDataType = dataType;
> < 	}
> JdbcModelReader:
> 184,185d183
> <         // native data type
> <         result.add(new MetaDataColumnDescriptor("TYPE_NAME",        Types.VARCHAR));
> 760,763d757
> <         
> <         // native data type
> <         column.setNativeDataType(((String)values.get("TYPE_NAME")).trim());
> <       
> Thanx,
> Yauheni Prykhodzka

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message