Up

EOSchemaGeneration Class

Authors

David Ayers (ayers@fsfe.org)

Version: 23653

Date: 2006-09-28 17:25:30 +0200 (Don, 28 Sep 2006)

Copyright: (C) 2006 Free Software Foundation, Inc.


Contents -

  1. Software documentation for the EOSQLExpression(EOSchemaGeneration) category
  2. EOSchemaGeneration variables

Software documentation for the EOSQLExpression(EOSchemaGeneration) category

EOSQLExpression(EOSchemaGeneration)

Declared in:
EOAccess/EOSchemaGeneration.h
Description forthcoming.
Method summary

appendExpression: toScript: 

+ (void) appendExpression: (EOSQLExpression*)expression toScript: (NSMutableString*)script;
Append expression statement to an executable script. The default implementation appends the ';'

createDatabaseStatementsForConnectionDictionary: administrativeConnectionDictionary: 

+ (NSArray*) createDatabaseStatementsForConnectionDictionary: (NSDictionary*)connectionDictionary administrativeConnectionDictionary: (NSDictionary*)administrativeConnectionDictionary;
Generates the statements to create a database.

createTableStatementsForEntityGroup: 

+ (NSArray*) createTableStatementsForEntityGroup: (NSArray*)entityGroup;
Generates the statements necessary to implement the schema generation for an entityGroup like creating/dropping a table, a primary key constaint or a primary key generation support such as a sequence.

createTableStatementsForEntityGroups: 

+ (NSArray*) createTableStatementsForEntityGroups: (NSArray*)entityGroups;
Generates statements to create/drop a specific schema generation for a list of entityGroups.

dropDatabaseStatementsForConnectionDictionary: administrativeConnectionDictionary: 

+ (NSArray*) dropDatabaseStatementsForConnectionDictionary: (NSDictionary*)connectionDictionary administrativeConnectionDictionary: (NSDictionary*)administrativeConnectionDictionary;
Generates the statements to drop the database.

dropPrimaryKeySupportStatementsForEntityGroup: 

+ (NSArray*) dropPrimaryKeySupportStatementsForEntityGroup: (NSArray*)entityGroup;
Description forthcoming.

dropPrimaryKeySupportStatementsForEntityGroups: 

+ (NSArray*) dropPrimaryKeySupportStatementsForEntityGroups: (NSArray*)entityGroups;
Description forthcoming.

dropTableStatementsForEntityGroup: 

+ (NSArray*) dropTableStatementsForEntityGroup: (NSArray*)entityGroup;
Description forthcoming.

dropTableStatementsForEntityGroups: 

+ (NSArray*) dropTableStatementsForEntityGroups: (NSArray*)entityGroups;
Description forthcoming.

foreignKeyConstraintStatementsForRelationship: 

+ (NSArray*) foreignKeyConstraintStatementsForRelationship: (EORelationship*)relationship;
The default implementation verifies the relationship joins and calls prepareConstraintStatementForRelationship:sourceColumns:destinationColumns:

primaryKeyConstraintStatementsForEntityGroup: 

+ (NSArray*) primaryKeyConstraintStatementsForEntityGroup: (NSArray*)entityGroup;
Description forthcoming.

primaryKeyConstraintStatementsForEntityGroups: 

+ (NSArray*) primaryKeyConstraintStatementsForEntityGroups: (NSArray*)entityGroups;
Description forthcoming.

primaryKeySupportStatementsForEntityGroup: 

+ (NSArray*) primaryKeySupportStatementsForEntityGroup: (NSArray*)entityGroup;
Description forthcoming.

primaryKeySupportStatementsForEntityGroups: 

+ (NSArray*) primaryKeySupportStatementsForEntityGroups: (NSArray*)entityGroups;
Description forthcoming.

schemaCreationScriptForEntities: options: 

+ (NSString*) schemaCreationScriptForEntities: (NSArray*)entities options: (NSDictionary*)options;
Returns a script to create the schema for the given entities specific for the target db. Options are the same as [+schemaCreationStatementsForEntities:options:]

schemaCreationStatementsForEntities: options: 

+ (NSArray*) schemaCreationStatementsForEntities: (NSArray*)entities options: (NSDictionary*)options;

Returns an array of EOSQLExpression suitable to create the schema for the given entities specific for the target db. Possible options are:

  • Name Value Default
  • createTables YES/NO YES
  • dropTables YES/NO YES
  • createPrimaryKeySupport YES/NO YES
  • dropPrimaryKeySupport YES/NO YES
  • primaryKeyConstraints YES/NO YES
  • foreignKeyConstraints YES/NO NO
  • createDatabase YES/NO NO
  • dropDatabase YES/NO NO

selectStatementForContainerOptions 

+ (EOSQLExpression*) selectStatementForContainerOptions;
Description forthcoming.

addCreateClauseForAttribute: 

- (void) addCreateClauseForAttribute: (EOAttribute*)attribute;
Assembles the create table statement for the given attribute

allowsNullClauseForConstraint: 

- (NSString*) allowsNullClauseForConstraint: (BOOL)allowsNull;
Generates a string to be used in a create table statement

columnTypeStringForAttribute: 

- (NSString*) columnTypeStringForAttribute: (EOAttribute*)attribute;
Assembles an adaptor specific string for using in a create table statement.

prepareConstraintStatementForRelationship: sourceColumns: destinationColumns: 

- (void) prepareConstraintStatementForRelationship: (EORelationship*)relationship sourceColumns: (NSArray*)sourceColumns destinationColumns: (NSArray*)destinationColumns;
Assembles an adaptor specific constraint statement for relationship and the given source and destination columns

EOSchemaGeneration variables

EOCreateDatabaseKey

NSString* EOCreateDatabaseKey;
Description forthcoming.

EOCreatePrimaryKeySupportKey

NSString* EOCreatePrimaryKeySupportKey;
Description forthcoming.

EOCreateTablesKey

NSString* EOCreateTablesKey;
Keys to use the options dictionary for +schemaCreationScriptForEntities:options: and +schemaCreationStatementsForEntities:options:

EODropDatabaseKey

NSString* EODropDatabaseKey;
Description forthcoming.

EODropPrimaryKeySupportKey

NSString* EODropPrimaryKeySupportKey;
Description forthcoming.

EODropTablesKey

NSString* EODropTablesKey;
Description forthcoming.

EOForeignKeyConstraintsKey

NSString* EOForeignKeyConstraintsKey;
Description forthcoming.

EOPrimaryKeyConstraintsKey

NSString* EOPrimaryKeyConstraintsKey;
Description forthcoming.


Up