public static class ERXSQLHelper.OracleSQLHelper 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| Constructor and Description |
|---|
OracleSQLHelper() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canReliablyPerformDistinctWithSortOrderings()
Returns whether or not this database can always perform the a distinct operation
when sort orderings are applied.
|
protected char |
commandSeparatorChar()
This is totally cheating ...
|
protected String |
commandSeparatorString() |
String |
createIndexSQLForEntities(NSArray<com.webobjects.eoaccess.EOEntity> entities,
NSArray<String> externalTypesToIgnore) |
String |
createSchemaSQLForEntitiesInModelWithNameAndOptions(NSArray<com.webobjects.eoaccess.EOEntity> entities,
String modelName,
NSDictionary optionsCreate)
oracle 9 has a maximum length of 30 characters for table names,
column names and constraint names Foreign key constraint names are
defined like this from the plugin:
|
String |
externalTypeForJDBCType(com.webobjects.jdbcadaptor.JDBCAdaptor adaptor,
int jdbcType)
JDBCAdaptor.externalTypeForJDBCType just returns the first type it finds
instead of trying to find a best match.
|
String |
limitExpressionForSQL(com.webobjects.eoaccess.EOSQLExpression expression,
com.webobjects.eocontrol.EOFetchSpecification fetchSpecification,
String sql,
long start,
long end) |
String |
migrationTableName()
Returns the name of the table to use for database migrations.
|
boolean |
reassignExternalTypeForValueTypeOverride(EOAttribute attribute) |
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)
Returns the SQL expression for creating a unique index on the given set
of columns
|
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.
|
protected String |
sqlForSubquery(String subquery,
String alias)
Returns the syntax for using the given query as an aliased subquery in a from-clause.
|
int |
varcharLargeColumnWidth()
Returns the width that should be used for a varcharLarge column in migrations.
|
int |
varcharLargeJDBCType()
For Oracle, it seems the right thing to do for varcharLarge is to use a CLOB column.
|
_groupByOrHavingIndex, _orderByIndex, addGroupByClauseToExpression, addGroupByClauseToExpression, addHavingCountClauseToExpression, appendItemToListString, attributesToFetchForEntity, columnIndexesFromColumnNames, columnNamesFromColumnIndexes, commentPattern, createDependentSchemaSQLForEntities, createIndexSQLForEntities, createSchemaSQLForEntitiesInDatabaseContext, createSchemaSQLForEntitiesInModel, createSchemaSQLForEntitiesInModelAndOptions, createSchemaSQLForEntitiesInModelWithName, createSchemaSQLForEntitiesWithOptions, createSchemaSQLForEntitiesWithOptions, customQueryExpressionHintAsString, defaultOptionDictionary, formatValueForAttribute, getNextValFromSequenceNamed, handleDatabaseException, jdbcTypeForCustomType, maximumElementPerInClause, 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, sqlForCountDistinct, sqlForCreateIndex, sqlForCreateUniqueIndex, sqlForFullTextQuery, sqlWhereClauseStringForKeyprotected String sqlForSubquery(String subquery, String alias)
ERXSQLHelpersqlForSubquery in class ERXSQLHelpersubquery - the subquery to wrapalias - the alias to useprotected String sqlForGetNextValFromSequencedNamed(String sequenceName)
ERXSQLHelpersqlForGetNextValFromSequencedNamed in class ERXSQLHelpersequenceName - the name of the sequencepublic String createSchemaSQLForEntitiesInModelWithNameAndOptions(NSArray<com.webobjects.eoaccess.EOEntity> entities, String modelName, NSDictionary optionsCreate)
TABLENAME_FOEREIGNKEYNAME_FK
The whole statement looks like this:
ALTER TABLE [TABLENAME] ADD CONSTRAINT [CONSTRAINTNAME] FOREIGN KEY
([FK]) REFERENCES [DESTINATION_TABLE] ([PK]) DEFERRABLE INITIALLY
DEFERRED
THIS means that the tablename and the columnname together cannot be
longer than 26 characters.
This method checks each foreign key constraint name and if it is longer than 30 characters its replaced with a unique name.
createSchemaSQLForEntitiesInModelWithNameAndOptions in class ERXSQLHelperentities - a NSArray containing the entities for which create table
statements should be generated or null if all entities
in the model should be used.modelName - the name of the EOModelString containing SQL statements to create
tablesERXSQLHelper.createSchemaSQLForEntitiesInModelWithNameAndOptions(NSArray, String, NSDictionary)public String limitExpressionForSQL(com.webobjects.eoaccess.EOSQLExpression expression, com.webobjects.eocontrol.EOFetchSpecification fetchSpecification, String sql, long start, long end)
limitExpressionForSQL in class ERXSQLHelperprotected char commandSeparatorChar()
ERXSQLHelpercommandSeparatorChar in class ERXSQLHelperprotected String commandSeparatorString()
commandSeparatorString in class ERXSQLHelperpublic String createIndexSQLForEntities(NSArray<com.webobjects.eoaccess.EOEntity> entities, NSArray<String> externalTypesToIgnore)
createIndexSQLForEntities in class ERXSQLHelperpublic String sqlForCreateUniqueIndex(String indexName, String tableName, ERXSQLHelper.ColumnIndex... columnIndexes)
ERXSQLHelpersqlForCreateUniqueIndex in class ERXSQLHelperindexName - the name of the index to createtableName - the name of the containing tablecolumnIndexes - the list of columns to index onpublic 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 String sqlForRegularExpressionQuery(String key, String value)
ERXSQLHelpersqlForRegularExpressionQuery in class ERXSQLHelperpublic String migrationTableName()
ERXSQLHelpermigrationTableName in class ERXSQLHelperpublic String externalTypeForJDBCType(com.webobjects.jdbcadaptor.JDBCAdaptor adaptor, int jdbcType)
ERXSQLHelperexternalTypeForJDBCType in class ERXSQLHelperadaptor - the adaptor to retrieve an external type forjdbcType - the JDBC type numberpublic boolean reassignExternalTypeForValueTypeOverride(EOAttribute attribute)
reassignExternalTypeForValueTypeOverride in class ERXSQLHelperprotected boolean canReliablyPerformDistinctWithSortOrderings()
ERXSQLHelpercanReliablyPerformDistinctWithSortOrderings in class ERXSQLHelperpublic int varcharLargeJDBCType()
varcharLargeJDBCType in class ERXSQLHelperpublic int varcharLargeColumnWidth()
ERXSQLHelpervarcharLargeColumnWidth in class ERXSQLHelperCopyright © 2002 – 2020 Project Wonder.