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 Details

    • 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:
    • 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:
  • Constructor Details

    • VersionUtil

      public VersionUtil()
  • Method Details

    • 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