Knut Anders Hatlen (JIRA) wrote:
> [
> http://issues.apache.org/jira/browse/DERBY-864?page=comments#action_12363878
> ]
>
>Knut Anders Hatlen commented on DERBY-864:
>------------------------------------------
>
>David's question: Do we have version detection at that level of granularity in
>the protocol?
>
>The client driver has a class ProductLevel with methods
> - boolean greaterThanOrEqualTo(int versionLevel, int releaseLevel, int
> modificationLevel)
> - boolean lessThan(int versionLevel, int releaseLevel, int modificationLevel)
>which let you detect the version of the server.
>
>In Reply.java, we could have something like this:
>
>if
>(netAgent_.netConnection_.databaseMetaData_.productLevel_.greaterThanOrEqualTo(10,
> 2, 0)) {
> // new behaviour
>} else {
> // old behaviour
>}
>
>
>
Ideally there would be a boolean in NetDatabaseMetaData set in
computeFeatureSet_() , so that we keep all the version specific stuff
centralized. See this comment in NetDatabaseMetaData.java
// Set flags describing the level of support for this connection.
// Flags will be set based on manager level and/or specific product
identifiers.
// Support for a specific server version can be set as follows. For
example
// if (productLevel_.greaterThanOrEqualTo(11,1,0))
// supportsTheBestThingEver = true