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
The super-class for all PostgreSQL Database Types. Allows a number
of utility methods relating to version number extraction to be
re-used.
-
Field Summary
Fields inherited from class org.ofbiz.core.entity.jdbc.dbtype.AbstractDatabaseType
ALTER_TABLE_DROP_INDEX, CHANGE_COLUMN_TYPE_CLAUSE_STRUCTURE_STANDARD_ALTER_COLUMN, CHANGE_COLUMN_TYPE_CLAUSE_STRUCTURE_STANDARD_MODIFY, DROP_INDEX_SCHEMA_DOT_INDEX, DROP_INDEX_SCHEMA_DOT_TABLE_DOT_INDEX, STANDARD_SELECT_FOR_UPDATE_SYNTAXFields inherited from interface org.ofbiz.core.entity.jdbc.dbtype.DatabaseType
STANDARD_SELECT_SYNTAXFields inherited from interface org.ofbiz.core.entity.jdbc.sql.escape.ReservedKeywordsAware
END_ESCAPE_CHARACTER_SQUARE_BRACKET, ESCAPE_CHARACTER_BACK_TICK, ESCAPE_CHARACTER_DOUBLE_QUOTE, START_ESCAPE_CHARACTER_SQUARE_BRACKET -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPostgresDatabaseType(String name, String fieldTypeName) -
Method Summary
Modifier and TypeMethodDescriptionprotected int[]getSchemaName(Connection con) Returns the name of the connected schema.getSimpleSelectSqlSyntax(boolean clusterMode) Based on the cluster mode parameter, and the capabilities of the database, return the appropriate SELECT statement for usage.protected int[]parseVersionStr(String version) protected booleanpostgresVersionGreaterThanOrEqual(Connection con, int major, int minor) protected booleanpostgresVersionLessThanOrEqual(Connection con, int major, int minor) Methods inherited from class org.ofbiz.core.entity.jdbc.dbtype.AbstractDatabaseType
equals, getChangeColumnTypeSQL, getChangeColumnTypeStructure, getConstraintNameClipLength, getDropIndexSQL, getDropIndexStructure, getFieldTypeName, getName, getReservedKeywords, hashCode, initialize, isProductNameInPrefixList, matchesConnection, productNameMatches, productNamesMatch, registerWithFactory, toString, versionGreaterThanOrEqual, versionGreaterThanOrEqual, versionLessThanOrEqualMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ofbiz.core.entity.jdbc.sql.escape.ReservedKeywordsAware
enableEscaping, escapeColumnName, getEndEscapeCharacter, getStartEscapeCharacter
-
Constructor Details
-
AbstractPostgresDatabaseType
-
-
Method Details
-
getSchemaName
Description copied from interface:DatabaseTypeReturns the name of the connected schema.- Specified by:
getSchemaNamein interfaceDatabaseType- Overrides:
getSchemaNamein classAbstractDatabaseType- Parameters:
con- the connection for which to return the schema- Returns:
- null if a schema name is not available
-
parseVersionStr
-
getPostgresVersion
- 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
Description copied from interface:DatabaseTypeBased on the cluster mode parameter, and the capabilities of the database, return the appropriate SELECT statement for usage.
-