Package net.postgis.jdbc.geometry.util

## Class VersionUtil

- java.lang.Object
- - net.postgis.jdbc.geometry.util.VersionUtil

    public class VersionUtil
    extends Object

Utility for working with PostGIS Server version.

Author:
  Phillip Ross

### Field Summary

Fields
`static String` `NONEXISTENT_FUNCTION_ERROR_MESSAGE_CONTENT` The string to match when determining a function does not exist from the content of an error message.
`static String` `POSTGIS_SERVER_VERSION_SEPERATOR` The token which separates version components within the PostGIS Server version.

### Constructor Summary

Constructors
`VersionUtil()`

### Method Summary

All Methods Static Methods Concrete Methods
`static String` `getVersionString​(Connection connection, String function)` Query a specific version string from the datasource for a specified function.
`static String` `retrievePostGISServerMajorVersion​(Connection connection)`
`static String` `retrievePostGISServerMinorVersion​(Connection connection)`
`static String` `retrievePostGISServerVersion​(Connection connection)`
`static String` `retrievePostGISServerVersionString​(Connection connection)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### NONEXISTENT_FUNCTION_ERROR_MESSAGE_CONTENT

    public static final String NONEXISTENT_FUNCTION_ERROR_MESSAGE_CONTENT

The string to match when determining a function does not exist from the content of an error message.

See Also:
  Constant Field Values

#### POSTGIS_SERVER_VERSION_SEPERATOR

    public static final String POSTGIS_SERVER_VERSION_SEPERATOR

The token which separates version components within the PostGIS Server version.

See Also:
  Constant Field Values

### Constructor Detail

#### VersionUtil

    public VersionUtil()

### Method Detail

#### getVersionString

    public static String getVersionString​(Connection connection,
                                          String function)
                                   throws SQLException

Query a specific version string from the datasource for a specified function.

Parameters:
  `connection` - The connection to issue the version query function against.
  `function` - The version function to use for querying the version.
Returns:
  a string version for the specified function.
Throws:
  `SQLException` - when a jdbc exception occurs.

#### retrievePostGISServerVersionString

    public static String retrievePostGISServerVersionString​(Connection connection)
                                                     throws SQLException

Throws:
  `SQLException`

#### retrievePostGISServerVersion

    public static String retrievePostGISServerVersion​(Connection connection)
                                               throws SQLException

Throws:
  `SQLException`

#### retrievePostGISServerMajorVersion

    public static String retrievePostGISServerMajorVersion​(Connection connection)
                                                    throws SQLException

Throws:
  `SQLException`

#### retrievePostGISServerMinorVersion

    public static String retrievePostGISServerMinorVersion​(Connection connection)
                                                    throws SQLException

Throws:
  `SQLException`