Class VersionUtil


  • public class VersionUtil
    extends Object
    Utility for working with PostGIS Server version.
    Author:
    Phillip Ross
    • 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.