Inherited by ERXSQLHelper.EROracleSQLHelper.

Public Member Functions | |
| String | createIndexSQLForEntities (NSArray< EOEntity > entities, NSArray< String > externalTypesToIgnore) |
| String | createSchemaSQLForEntitiesInModelWithNameAndOptions (NSArray< EOEntity > entities, String modelName, NSDictionary optionsCreate) |
| String | externalTypeForJDBCType (JDBCAdaptor adaptor, int jdbcType) |
| String | limitExpressionForSQL (EOSQLExpression expression, EOFetchSpecification fetchSpecification, String sql, long start, long end) |
| String | migrationTableName () |
| boolean | reassignExternalTypeForValueTypeOverride (EOAttribute attribute) |
| String | sqlForCreateIndex (String indexName, String tableName, ColumnIndex...columnIndexes) |
| String | sqlForCreateUniqueIndex (String indexName, String tableName, ColumnIndex...columnIndexes) |
| String | sqlForRegularExpressionQuery (String key, String value) |
| int | varcharLargeColumnWidth () |
| int | varcharLargeJDBCType () |
Protected Member Functions | |
| boolean | canReliablyPerformDistinctWithSortOrderings () |
| char | commandSeparatorChar () |
| String | commandSeparatorString () |
| String | sqlForGetNextValFromSequencedNamed (String sequenceName) |
| String | sqlForSubquery (String subquery, String alias) |
| boolean canReliablyPerformDistinctWithSortOrderings | ( | ) | [protected] |
Returns whether or not this database can always perform the a distinct operation when sort orderings are applied. Oracle, for instance, will fail if you try to sort on a key that isn't in the list of fetched keys.
Reimplemented from ERXSQLHelper.
| char commandSeparatorChar | ( | ) | [protected] |
This is totally cheating ... But I just need the separator character for now. We can rewrite the script parser later. Actually, somewhere on earth there is already a sql parser or two. Probably worth getting that one.
Reimplemented from ERXSQLHelper.
| String commandSeparatorString | ( | ) | [protected] |
Reimplemented from ERXSQLHelper.
| String createIndexSQLForEntities | ( | NSArray< EOEntity > | entities, | |
| NSArray< String > | externalTypesToIgnore | |||
| ) |
Reimplemented from ERXSQLHelper.
| String createSchemaSQLForEntitiesInModelWithNameAndOptions | ( | NSArray< 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:
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.
Reimplemented from ERXSQLHelper.
| String externalTypeForJDBCType | ( | JDBCAdaptor | adaptor, | |
| int | jdbcType | |||
| ) |
JDBCAdaptor.externalTypeForJDBCType just returns the first type it finds instead of trying to find a best match. This can still fail, mind you, but it should be much better than the EOF default impl.
| adaptor | the adaptor to retrieve an external type for | |
| jdbcType | the JDBC type number |
Reimplemented from ERXSQLHelper.
| String limitExpressionForSQL | ( | EOSQLExpression | expression, | |
| EOFetchSpecification | fetchSpecification, | |||
| String | sql, | |||
| long | start, | |||
| long | end | |||
| ) |
Reimplemented from ERXSQLHelper.
| String migrationTableName | ( | ) |
Returns the name of the table to use for database migrations.
Reimplemented from ERXSQLHelper.
| boolean reassignExternalTypeForValueTypeOverride | ( | EOAttribute | attribute | ) |
Reimplemented from ERXSQLHelper.
Returns the SQL expression for creating an index on the given set of columns
| indexName | the name of the index to create | |
| tableName | the name of the containing table | |
| columnIndexes | the list of columns to index on |
Reimplemented from ERXSQLHelper.
Returns the SQL expression for creating a unique index on the given set of columns
| indexName | the name of the index to create | |
| tableName | the name of the containing table | |
| columnIndexes | the list of columns to index on |
Reimplemented from ERXSQLHelper.
Returns the SQL required to select the next value from the given sequence. This should return a single row with a single column.
| sequenceName | the name of the sequence |
Reimplemented from ERXSQLHelper.
Returns the SQL expression for a regular expression query.
| key | ||
| value |
Reimplemented from ERXSQLHelper.
Returns the syntax for using the given query as an aliased subquery in a from-clause.
| subquery | the subquery to wrap | |
| alias | the alias to use |
Reimplemented from ERXSQLHelper.
| int varcharLargeColumnWidth | ( | ) |
Returns the width that should be used for a varcharLarge column in migrations.
Reimplemented from ERXSQLHelper.
| int varcharLargeJDBCType | ( | ) |
For Oracle, it seems the right thing to do for varcharLarge is to use a CLOB column. CLOB is limited to 8TB where as VARCHAR is limited to 4000 bytes.
Reimplemented from ERXSQLHelper.
1.5.8