Class AbstractPostgresDatabaseType

java.lang.Object
org.ofbiz.core.entity.jdbc.dbtype.AbstractDatabaseType
org.ofbiz.core.entity.jdbc.dbtype.AbstractPostgresDatabaseType
All Implemented Interfaces:
DatabaseType, ReservedKeywordsAware
Direct Known Subclasses:
Postgres73DatabaseType, PostgresDatabaseType

public abstract class AbstractPostgresDatabaseType extends AbstractDatabaseType
The super-class for all PostgreSQL Database Types. Allows a number of utility methods relating to version number extraction to be re-used.
  • Constructor Details

    • AbstractPostgresDatabaseType

      protected AbstractPostgresDatabaseType(String name, String fieldTypeName)
  • Method Details

    • getSchemaName

      public String getSchemaName(Connection con)
      Description copied from interface: DatabaseType
      Returns the name of the connected schema.
      Specified by:
      getSchemaName in interface DatabaseType
      Overrides:
      getSchemaName in class AbstractDatabaseType
      Parameters:
      con - the connection for which to return the schema
      Returns:
      null if a schema name is not available
    • parseVersionStr

      protected int[] parseVersionStr(String version)
    • getPostgresVersion

      protected int[] getPostgresVersion(Connection con) throws SQLException
      Throws:
      SQLException
    • postgresVersionGreaterThanOrEqual

      protected boolean postgresVersionGreaterThanOrEqual(Connection con, int major, int minor) throws SQLException
      Throws:
      SQLException
    • postgresVersionLessThanOrEqual

      protected boolean postgresVersionLessThanOrEqual(Connection con, int major, int minor) throws SQLException
      Throws:
      SQLException
    • getSimpleSelectSqlSyntax

      public String getSimpleSelectSqlSyntax(boolean clusterMode)
      Description copied from interface: DatabaseType
      Based on the cluster mode parameter, and the capabilities of the database, return the appropriate SELECT statement for usage.