Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dtp-dev] bug#149611 - Database Version is not flexible ...

Hi Rob

Oracle database product name with version is as below here

Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

The current impl of LabelProvider for SQLModel Content displays the product name and the version correctly but " - Production" is missed. Isn't better to display DatabaseMetaData.getDatabaseProductVersion() as it is ?

Regards
Anthos

rcernich@xxxxxxxxxx wrote:
Hey Anthos,

Could you please provide specific examples where you cannot satisfactorily
override the default behavior?  I would like to resolve any shortcomings in
the API that restrict specialization (as this is a framework, it is
important that the behavior can be customized, within limits of course).

See below for comments on the specific usages you listed.

Best regards,
Rob

dtp-dev-bounces@xxxxxxxxxxx wrote on 07/06/2006 04:13:40 PM:

The static method Version.valueOf(..) is in used in few places in the
core code, which makes it difficult to override the Version class to
handle vendor specific way.

You can provide whatever data is required to the valueOf() method.  This
may require formatting your input prior to invoking valueOf().  You can
always use the constructor directly, which specifies individual parameters
for major, minor, release, and build components.


projects/opensource/eclipse-src/org.eclipse.datatools.connectivity/
plugins/org.eclipse.datatools.connectivity/src/org/eclipse/datatools/
connectivity/VersionProviderConnection.java:149:
Version oldTechVersion = Version.valueOf(props.getProperty(

Version information is stored in the properties using Version.toString()
(Version.valueOf(aVersion.toString()).equals(aVersion) == true).

projects/opensource/eclipse-src/org.eclipse.datatools.connectivity/
plugins/org.eclipse.datatools.connectivity/src/org/eclipse/datatools/
connectivity/VersionProviderConnection.java:175:             Version
oldServerVersion = Version.valueOf(props.getProperty(

Same as preceding comment.


projects/opensource/eclipse-src/org.eclipse.datatools.connectivity/
plugins/org.eclipse.datatools.connectivity.db.generic/src/org/eclipse/
datatools/connectivity/db/generic/JDBCConnection.java:
152:                          mServerVersion = Version.valueOf
(versionString);

Assumes DatabaseMetaData.getDatabaseProductVersion() is of the form
<int>.<int>.<int>.<string>; not sure what the JDBC specification says about
the string returned by this method.  However, since extenders have the
ability to override the IServerVersionProvider methods on JDBCConnection,
they can easily tailor the implementation of these to match the information
returned by their server (e.g. by reformatting the string or by
instantiating a version object directly using its constructor).


projects/opensource/eclipse-src/org.eclipse.datatools.connectivity/
plugins/org.eclipse.datatools.connectivity.oda.profile/src/org/
eclipse/datatools/connectivity/oda/profile/OdaConnectionWrapper.java:
144:            return Version.valueOf
( m_odaMetadataHelper.getDataSourceProductVersion() );

I assume this is internally consistent with ODA (i.e. that
getDataSourceProductVersion() returns a compatible string).


projects/opensource/eclipse-src/org.eclipse.datatools.connectivity/
plugins/org.eclipse.datatools.connectivity.oda.profile/src/org/
eclipse/datatools/connectivity/oda/profile/OdaConnectionWrapper.java:
179:        return Version.valueOf( Constants.ODA_COMPONENT_VERSION );

Same as preceding comment.

_______________________________________________
dtp-dev mailing list
dtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-dev



Back to the top