public static class ERXSQLHelper.PostgresqlSQLHelper extends ERXSQLHelper
ERXSQLHelper.ColumnIndex, ERXSQLHelper.CustomTypes, ERXSQLHelper.DB2SQLHelper, ERXSQLHelper.DerbySQLHelper, ERXSQLHelper.EROracleSQLHelper, ERXSQLHelper.FirebirdSQLHelper, ERXSQLHelper.FrontBaseSQLHelper, ERXSQLHelper.H2SQLHelper, ERXSQLHelper.MicrosoftSQLHelper, ERXSQLHelper.MySQLSQLHelper, ERXSQLHelper.NoSQLHelper, ERXSQLHelper.OpenBaseSQLHelper, ERXSQLHelper.OracleSQLHelper, ERXSQLHelper.PostgresqlSQLHelper| Modifier and Type | Field and Description |
|---|---|
static String |
UNIQUE_CONSTRAINT_EXCEPTION_STATE
The exception state string for unique constraint exceptions.
|
static String |
UNIQUE_CONSTRAINT_MESSAGE_FORMAT |
| Constructor and Description |
|---|
PostgresqlSQLHelper() |
| Modifier and Type | Method and Description |
|---|---|
String |
externalTypeForJDBCType(JDBCAdaptor adaptor,
int jdbcType)
For most types, finding the type in jdbc2Info's typeInfo will provide
us with a correct type mapping.
|
boolean |
handleDatabaseException(EODatabaseContext databaseContext,
Throwable throwable)
Returns true if the SQL helper can handle the exception.
|
String |
limitExpressionForSQL(EOSQLExpression expression,
EOFetchSpecification fetchSpecification,
String sql,
long start,
long end) |
boolean |
reassignExternalTypeForValueTypeOverride(EOAttribute attr)
Overriden to prevent the external time types set in
externalTypeForJDBCType(JDBCAdaptor, int) from being reset. |
protected String |
sqlForCountDistinct(EOEntity entity)
Returns the SQL to count the distinct number of rows.
|
String |
sqlForCreateIndex(String indexName,
String tableName,
ERXSQLHelper.ColumnIndex... columnIndexes)
Returns the SQL expression for creating an index on the given set
of columns
|
String |
sqlForCreateUniqueIndex(String indexName,
String tableName,
ERXSQLHelper.ColumnIndex... columnIndexes)
Creates unique index; stolen from the derby helper
|
protected String |
sqlForGetNextValFromSequencedNamed(String sequenceName)
Returns the SQL required to select the next value from the given sequence.
|
String |
sqlForRegularExpressionQuery(String key,
String value)
Returns the SQL expression for a regular expression query.
|
int |
varcharLargeColumnWidth()
Returns the width that should be used for a varcharLarge column in migrations.
|
int |
varcharLargeJDBCType()
Returns the JDBCType that should be used for a varcharLarge column in migrations.
|
_groupByOrHavingIndex, _orderByIndex, addGroupByClauseToExpression, addGroupByClauseToExpression, addHavingCountClauseToExpression, appendItemToListString, attributesToFetchForEntity, canReliablyPerformDistinctWithSortOrderings, columnIndexesFromColumnNames, columnNamesFromColumnIndexes, commandSeparatorChar, commandSeparatorString, commentPattern, createDependentSchemaSQLForEntities, createIndexSQLForEntities, createIndexSQLForEntities, createSchemaSQLForEntitiesInDatabaseContext, createSchemaSQLForEntitiesInModel, createSchemaSQLForEntitiesInModelAndOptions, createSchemaSQLForEntitiesInModelWithName, createSchemaSQLForEntitiesInModelWithNameAndOptions, createSchemaSQLForEntitiesWithOptions, createSchemaSQLForEntitiesWithOptions, customQueryExpressionHintAsString, defaultOptionDictionary, formatValueForAttribute, getNextValFromSequenceNamed, jdbcTypeForCustomType, maximumElementPerInClause, migrationTableName, newSQLHelper, newSQLHelper, newSQLHelper, newSQLHelper, newSQLHelper, newSQLHelper, newSQLHelper, newSQLHelper, newSQLHelper, newSQLHelper, newSQLHelper, newSQLHelper, newSQLHelper, prepareConnectionForSchemaChange, quoteColumnName, readFormatForAggregateFunction, readFormatForAggregateFunction, removeSelectFromExpression, restoreConnectionSettingsAfterSchemaChange, rowCountForFetchSpecification, shouldExecute, shouldPerformDistinctInMemory, splitSQLStatements, splitSQLStatementsFromFile, splitSQLStatementsFromInputStream, sqlExpressionForFetchSpecification, sqlExpressionForFetchSpecification, sqlForCreateIndex, sqlForCreateUniqueIndex, sqlForFullTextQuery, sqlForSubquery, sqlWhereClauseStringForKeypublic static final String UNIQUE_CONSTRAINT_EXCEPTION_STATE
public static final String UNIQUE_CONSTRAINT_MESSAGE_FORMAT
public boolean reassignExternalTypeForValueTypeOverride(EOAttribute attr)
externalTypeForJDBCType(JDBCAdaptor, int) from being reset.reassignExternalTypeForValueTypeOverride in class ERXSQLHelperprotected String sqlForGetNextValFromSequencedNamed(String sequenceName)
ERXSQLHelpersqlForGetNextValFromSequencedNamed in class ERXSQLHelpersequenceName - the name of the sequencepublic String limitExpressionForSQL(EOSQLExpression expression, EOFetchSpecification fetchSpecification, String sql, long start, long end)
limitExpressionForSQL in class ERXSQLHelperpublic String sqlForRegularExpressionQuery(String key, String value)
ERXSQLHelpersqlForRegularExpressionQuery in class ERXSQLHelperpublic String externalTypeForJDBCType(JDBCAdaptor adaptor, int jdbcType)
externalTypeForJDBCType in class ERXSQLHelperadaptor - the adaptor to retrieve an external type forjdbcType - the JDBC type numberpublic String sqlForCreateUniqueIndex(String indexName, String tableName, ERXSQLHelper.ColumnIndex... columnIndexes)
sqlForCreateUniqueIndex in class ERXSQLHelperindexName - the name of the index to createtableName - the name of the containing tablecolumnIndexes - the list of columns to index onERXSQLHelper.sqlForCreateUniqueIndex(String, String, ColumnIndex...)public String sqlForCreateIndex(String indexName, String tableName, ERXSQLHelper.ColumnIndex... columnIndexes)
ERXSQLHelpersqlForCreateIndex in class ERXSQLHelperindexName - the name of the index to createtableName - the name of the containing tablecolumnIndexes - the list of columns to index onpublic int varcharLargeJDBCType()
ERXSQLHelpervarcharLargeJDBCType in class ERXSQLHelperpublic int varcharLargeColumnWidth()
ERXSQLHelpervarcharLargeColumnWidth in class ERXSQLHelperpublic boolean handleDatabaseException(EODatabaseContext databaseContext, Throwable throwable)
ERXSQLHelperhandleDatabaseException in class ERXSQLHelperprotected String sqlForCountDistinct(EOEntity entity)
ERXSQLHelperConcrete classes may override this implementation to add support for composite primary keys according to their database specific SQL syntax.
sqlForCountDistinct in class ERXSQLHelperentity - the base entity used in this queryCopyright © 2002 – 2025 Project Wonder.