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, sqlWhereClauseStringForKey
public 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 ERXSQLHelper
protected String sqlForGetNextValFromSequencedNamed(String sequenceName)
ERXSQLHelper
sqlForGetNextValFromSequencedNamed
in class ERXSQLHelper
sequenceName
- the name of the sequencepublic String limitExpressionForSQL(EOSQLExpression expression, EOFetchSpecification fetchSpecification, String sql, long start, long end)
limitExpressionForSQL
in class ERXSQLHelper
public String sqlForRegularExpressionQuery(String key, String value)
ERXSQLHelper
sqlForRegularExpressionQuery
in class ERXSQLHelper
public String externalTypeForJDBCType(JDBCAdaptor adaptor, int jdbcType)
externalTypeForJDBCType
in class ERXSQLHelper
adaptor
- the adaptor to retrieve an external type forjdbcType
- the JDBC type numberpublic String sqlForCreateUniqueIndex(String indexName, String tableName, ERXSQLHelper.ColumnIndex... columnIndexes)
sqlForCreateUniqueIndex
in class ERXSQLHelper
indexName
- 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)
ERXSQLHelper
sqlForCreateIndex
in class ERXSQLHelper
indexName
- the name of the index to createtableName
- the name of the containing tablecolumnIndexes
- the list of columns to index onpublic int varcharLargeJDBCType()
ERXSQLHelper
varcharLargeJDBCType
in class ERXSQLHelper
public int varcharLargeColumnWidth()
ERXSQLHelper
varcharLargeColumnWidth
in class ERXSQLHelper
public boolean handleDatabaseException(EODatabaseContext databaseContext, Throwable throwable)
ERXSQLHelper
handleDatabaseException
in class ERXSQLHelper
protected String sqlForCountDistinct(EOEntity entity)
ERXSQLHelper
Concrete classes may override this implementation to add support for composite primary keys according to their database specific SQL syntax.
sqlForCountDistinct
in class ERXSQLHelper
entity
- the base entity used in this queryCopyright © 2002 – 2024 Project Wonder.