|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecter.extensions.jdbc.ERXSQLHelper
er.extensions.jdbc.ERXSQLHelper.OracleSQLHelper
public static class ERXSQLHelper.OracleSQLHelper
Nested Class Summary |
---|
Nested classes/interfaces inherited from class er.extensions.jdbc.ERXSQLHelper |
---|
ERXSQLHelper.ColumnIndex, ERXSQLHelper.CustomTypes, ERXSQLHelper.DerbySQLHelper, ERXSQLHelper.EROracleSQLHelper, ERXSQLHelper.FrontBaseSQLHelper, ERXSQLHelper.H2SQLHelper, ERXSQLHelper.MicrosoftSQLHelper, ERXSQLHelper.MySQLSQLHelper, ERXSQLHelper.NoSQLHelper, ERXSQLHelper.OpenBaseSQLHelper, ERXSQLHelper.OracleSQLHelper, ERXSQLHelper.PostgresqlSQLHelper |
Field Summary |
---|
Fields inherited from class er.extensions.jdbc.ERXSQLHelper |
---|
log |
Constructor Summary | |
---|---|
ERXSQLHelper.OracleSQLHelper()
|
Method Summary | |
---|---|
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 java.lang.String |
commandSeparatorString()
|
java.lang.String |
createIndexSQLForEntities(com.webobjects.foundation.NSArray<com.webobjects.eoaccess.EOEntity> entities,
com.webobjects.foundation.NSArray<java.lang.String> externalTypesToIgnore)
|
java.lang.String |
createSchemaSQLForEntitiesInModelWithNameAndOptions(com.webobjects.foundation.NSArray<com.webobjects.eoaccess.EOEntity> entities,
java.lang.String modelName,
com.webobjects.foundation.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: 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. |
java.lang.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. |
java.lang.String |
limitExpressionForSQL(com.webobjects.eoaccess.EOSQLExpression expression,
com.webobjects.eocontrol.EOFetchSpecification fetchSpecification,
java.lang.String sql,
long start,
long end)
|
java.lang.String |
migrationTableName()
Returns the name of the table to use for database migrations. |
boolean |
reassignExternalTypeForValueTypeOverride(com.webobjects.eoaccess.EOAttribute attribute)
|
java.lang.String |
sqlForCreateIndex(java.lang.String indexName,
java.lang.String tableName,
ERXSQLHelper.ColumnIndex... columnIndexes)
Returns the SQL expression for creating an index on the given set of columns |
java.lang.String |
sqlForCreateUniqueIndex(java.lang.String indexName,
java.lang.String tableName,
ERXSQLHelper.ColumnIndex... columnIndexes)
Returns the SQL expression for creating a unique index on the given set of columns |
protected java.lang.String |
sqlForGetNextValFromSequencedNamed(java.lang.String sequenceName)
Returns the SQL required to select the next value from the given sequence. |
java.lang.String |
sqlForRegularExpressionQuery(java.lang.String key,
java.lang.String value)
Returns the SQL expression for a regular expression query. |
protected java.lang.String |
sqlForSubquery(java.lang.String subquery,
java.lang.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ERXSQLHelper.OracleSQLHelper()
Method Detail |
---|
protected java.lang.String sqlForSubquery(java.lang.String subquery, java.lang.String alias)
ERXSQLHelper
sqlForSubquery
in class ERXSQLHelper
subquery
- the subquery to wrapalias
- the alias to use
protected java.lang.String sqlForGetNextValFromSequencedNamed(java.lang.String sequenceName)
ERXSQLHelper
sqlForGetNextValFromSequencedNamed
in class ERXSQLHelper
sequenceName
- the name of the sequence
public java.lang.String createSchemaSQLForEntitiesInModelWithNameAndOptions(com.webobjects.foundation.NSArray<com.webobjects.eoaccess.EOEntity> entities, java.lang.String modelName, com.webobjects.foundation.NSDictionary optionsCreate)
createSchemaSQLForEntitiesInModelWithNameAndOptions
in class ERXSQLHelper
entities
- a NSArray containing the entities for which create table
statements should be generated or null if all entitites in the
model should be used.modelName
- the name of the EOModel
String
containing SQL statements to create
tablescreateSchemaSQLForEntitiesInModelWithNameAndOptions
public java.lang.String limitExpressionForSQL(com.webobjects.eoaccess.EOSQLExpression expression, com.webobjects.eocontrol.EOFetchSpecification fetchSpecification, java.lang.String sql, long start, long end)
limitExpressionForSQL
in class ERXSQLHelper
protected char commandSeparatorChar()
ERXSQLHelper
commandSeparatorChar
in class ERXSQLHelper
protected java.lang.String commandSeparatorString()
commandSeparatorString
in class ERXSQLHelper
public java.lang.String createIndexSQLForEntities(com.webobjects.foundation.NSArray<com.webobjects.eoaccess.EOEntity> entities, com.webobjects.foundation.NSArray<java.lang.String> externalTypesToIgnore)
createIndexSQLForEntities
in class ERXSQLHelper
public java.lang.String sqlForCreateUniqueIndex(java.lang.String indexName, java.lang.String tableName, ERXSQLHelper.ColumnIndex... columnIndexes)
ERXSQLHelper
sqlForCreateUniqueIndex
in class ERXSQLHelper
indexName
- the name of the index to createtableName
- the name of the containing tablecolumnIndexes
- the list of columns to index on
public java.lang.String sqlForCreateIndex(java.lang.String indexName, java.lang.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 on
public java.lang.String sqlForRegularExpressionQuery(java.lang.String key, java.lang.String value)
ERXSQLHelper
sqlForRegularExpressionQuery
in class ERXSQLHelper
public java.lang.String migrationTableName()
ERXSQLHelper
migrationTableName
in class ERXSQLHelper
public java.lang.String externalTypeForJDBCType(com.webobjects.jdbcadaptor.JDBCAdaptor adaptor, int jdbcType)
ERXSQLHelper
externalTypeForJDBCType
in class ERXSQLHelper
adaptor
- the adaptor to retrieve an external type forjdbcType
- the JDBC type number
public boolean reassignExternalTypeForValueTypeOverride(com.webobjects.eoaccess.EOAttribute attribute)
reassignExternalTypeForValueTypeOverride
in class ERXSQLHelper
protected boolean canReliablyPerformDistinctWithSortOrderings()
ERXSQLHelper
canReliablyPerformDistinctWithSortOrderings
in class ERXSQLHelper
public int varcharLargeJDBCType()
varcharLargeJDBCType
in class ERXSQLHelper
public int varcharLargeColumnWidth()
ERXSQLHelper
varcharLargeColumnWidth
in class ERXSQLHelper
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |