PATH |
Implemented by: EOSynchronizationFactory
Package: com.webobjects.eoaccess
EOSQLExpression is an abstract superclass that defines how to build SQL statements for adaptor channels. You don't typically use instances of EOSQLExpression; rather, you use EOSQLExpression subclasses written to work with a particular RDBMS and corresponding adaptor. A concrete subclass of EOSQLExpression overrides many of its methods in terms of the query language syntax for its specific RDBMS. EOSQLExpression objects are used internally by the Framework, and unless you're creating a concrete adaptor, you won't ordinarily need to interact with EOSQLExpression objects yourself. You most commonly create and use an EOSQLExpression object when you want to send an SQL statement directly to the server. In this case, you simply create an expression with EOSQLExpression and send the expression object to an adaptor channel using EOAdaptorChannel's evaluateExpression method.
For more information on using EOSQLExpressions, see the following sections:
EOSQLExpression defines the following String constants.
Synchronizing the database with a modelstatementsToUpdateObjectStoreForModelstatementsToUpdateObjectStoreForEntityGroupsstatementsToCopyTableNamedphraseCastingColumnNamedstatementsToRenameTableNamedstatementsToInsertColumnForAttributestatementsToDeleteColumnNamedstatementsToRenameColumnNamedstatementsToModifyColumnNullRulestatementsToConvertColumnTypeisColumnTypeEquivalentToColumnTypestatementsToDropForeignKeyConstraintsOnEntityGroupsstatementsToDropPrimaryKeyConstraintsOnEntityGroupsstatementsToDropPrimaryKeySupportForEntityGroupsstatementsToImplementForeignKeyConstraintsOnEntityGroupsstatementsToImplementPrimaryKeyConstraintsOnEntityGroupsstatementsToImplementPrimaryKeySupportForEntityGroupsQuerying about database synchronization supportwsupportsSchemaSynchronizationsupportsDirectColumnCoercionsupportsDirectColumnDeletionsupportsDirectColumnInsertionsupportsDirectColumnNullRuleModificationsupportsDirectColumnRenaming
public abstract boolean isColumnTypeEquivalentToColumnType( EOSchemaSynchronization.ColumnTypes columnTypeA, EOSchemaSynchronization.ColumnTypes columnTypeB, NSDictionary options)
Returns true
if values in a column of columnTypeA can be copied into a column of columnTypeB without the use of a casting phrase, false
otherwise. The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract NSDictionary objectStoreChangesFromAttributeToAttribute( EOAttribute anAttribute, EOAttribute anotherAttribute
Description forthcoming.
public abstract String phraseCastingColumnNamed( String columnName, EOSchemaSynchronization.ColumnTypes fromType, EOSchemaSynchronization.ColumnTypes castType NSDictionary options)
Returns an SQL string to cast the values in the column specified by columnName to a new type. This method is used when the adaptor doesn't support in-place column type coercion, and the table has to be recreated. To move data from the old table to the new table, sometimes a conversion statement is needed (for example, to convert strings in a VARCHAR column to numbers). The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract NSArray statementsToConvertColumnType( String columnName, String tableName, EOSchemaSynchronization.ColumnTypes type, EOSchemaSynchronization.ColumnTypes newType, NSDictionary options)
Returns an array of EOSQLExpressions to convert in place the type of the specified column. The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract NSArray statementsToCopyTableNamed( String tableName, NSArray entityGroup, NSDictionary changes, NSDictionary options)
Returns an array of EOSQLExpressions to copy the specified table into a new table, whose definition is provided by entityGroup-an array of EOEntity objects rooted to the table named tableName. This method is used when the adaptor doesn't support the in-place table modifications required to synchronize the database to a model.
The changes dictionary identifies the changes to make to the database schema; for more information, see "The Change Dictionary" (page 306). The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract NSArray statementsToDeleteColumnNamed( String columnName, String tableName, NSDictionary options)
Returns an array of EOSQLExpressions to delete in place the specified column from the specified table. The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract NSArray statementsToDropForeignKeyConstraintsOnEntityGroups( NSArray entityGroup, NSDictionary changes, NSDictionary options)
Returns an array of EOSQLExpressions to drop foreign key constraints for the table corresponding to entityGroup-an array of EOEntity objects rooted to the same table. The changes dictionary identifies the changes to make to the database schema; for more information, see "The Change Dictionary" (page 306). The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract NSArray statementsToDropPrimaryKeyConstraintsOnEntityGroups( NSArray entityGroup, NSDictionary changes, NSDictionary options)
Returns an array of EOSQLExpressions to drop primary key constraints for the table corresponding to entityGroup-an array of EOEntity objects rooted to the same table. The changes dictionary identifies the changes to make to the database schema; for more information, see "The Change Dictionary" (page 306). The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract NSArray statementsToDropPrimaryKeySupportForEntityGroups( NSArray entityGroup, NSDictionary changes, NSDictionary options)
Returns an array of EOSQLExpressions to drop the primary key support mechanism for the table corresponding to entityGroup-an array of EOEntity objects rooted to the same table. The changes dictionary identifies the changes to make to the database schema; for more information, see "The Change Dictionary" (page 306). The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract NSArray statementsToImplementForeignKeyConstraintsOnEntityGroups( NSArray entityGroup, NSDictionary changes, NSDictionary options)
Returns an array of EOSQLExpressions to implement foreign key constraints on the table corresponding to entityGroup-an array of EOEntity objects rooted to the same table. The changes dictionary identifies the changes to make to the database schema; for more information, see "The Change Dictionary" (page 306). The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract NSArray statementsToImplementPrimaryKeyConstraintsOnEntityGroups( NSArray entityGroup, NSDictionary changes, NSDictionary options)
Returns an array of EOSQLExpressions to implement primary key constraints on the table corresponding to entityGroup-an array of EOEntity objects rooted to the same table. The changes dictionary identifies the changes to make to the database schema; for more information, see "The Change Dictionary" (page 306). The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract NSArray statementsToImplementPrimaryKeySupportForEntityGroups( NSArray entityGroup, NSDictionary changes, NSDictionary options)
Returns an array of EOSQLExpressions to implement support mechanisms for primary key generation for the table corresponding to entityGroup-an array of EOEntity objects rooted to the same table. The changes dictionary identifies the changes to make to the database schema; for more information, see "The Change Dictionary" (page 306). The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract NSArray statementsToInsertColumnForAttribute( EOAttribute attribute, NSDictionary options)
Returns an array of EOSQLExpressions to insert in place a column for the specified attribute. The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract NSArray statementsToModifyColumnNullRule( String columnName, String tableName, boolean allowsNull, NSDictionary options)
Returns an array of EOSQLExpressions to modify in place the specified column to either allow or not allow NULL values as specified by allowsNull. The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract NSArray statementsToRenameColumnNamed( String columnName, String tableName, String newName, NSDictionary options)
Returns an array of EOSQLExpressions to rename in place the specified column. The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract NSArray statementsToRenameTableNamed( String tableName, String newName, NSDictionary options)
Returns an array of EOSQLExpressions to rename in place the specified table. The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract NSArray statementsToUpdateObjectStoreForEntityGroups( NSArray entityGroup, NSDictionary changes, NSDictionary options)
Returns an array of EOSQLExpressions to update the table that corresponds to entityGroup-an array of EOEntity objects rooted to the same table. Inserts and deletes columns, and updates modified columns. The changes dictionary identifies the changes to make to the database schema; for more information, see "The Change Dictionary" (page 306). The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract NSArray statementsToUpdateObjectStoreForModel( EOModel model, NSDictionary changes, NSDictionary options)
Returns an array of EOSQLExpressions to synchronize the database with model. Prepares the statements to insert and delete new and deleted tables before invoking statementsToUpdateObjectStoreForEntityGroups for each modified table. The changes dictionary identifies the changes to make to the database schema; for more information, see "The Change Dictionary" (page 306). The options dictionary describes the aspects of the schema for which to create SQL statements; for more information, see "The Options Dictionary" (page 306).
public abstract boolean supportsDirectColumnCoercion()
Returns true
if the adaptor can change the type of an existing column in place, false
otherwise.
public abstract boolean supportsDirectColumnDeletion()
Returns true
if the adaptor can delete columns, false
otherwise.
public abstract boolean supportsDirectColumnInsertion()
Returns true
if the adaptor can add columns to a table, false
otherwise.
public abstract boolean supportsDirectColumnNullRuleModification()
Returns true
if the adaptor can modify the null rule of an existing column in place, false
otherwise.
public abstract boolean supportsDirectColumnRenaming()
Returns true
if the adaptor can rename table columns, false
otherwise.
public abstract boolean supportsSchemaSynchronization()
Returns true
if the adaptor can update the database to reflect changes in a model, false
otherwise.
© 2001 Apple Computer, Inc. (Last Published April 13, 2001)