Package Modeling :: Package DatabaseAdaptors :: Package OracleAdaptorLayer :: Module OracleSchemaGeneration :: Class OracleSchemaGeneration
[show private | hide private]
[frames | no frames]

Class OracleSchemaGeneration

SchemaGeneration --+
                   |
                  OracleSchemaGeneration


Concrete SchemaGeneration for Oracle

See Modeling.interfaces.SchemaGeneration for further details


Method Summary
  createDatabaseStatementsForConnectionDictionary(self, connectionDictionary, administrativeConnectionDictionary, createUserFlag)
Not supported
  dropDatabaseStatementsForConnectionDictionary(self, connectionDictionary, administrativeConnectionDictionary, dropUserFlag)
Not supported
  dropForeignKeyConstraintStatementsForRelationship(self, relationship)
Return a SQLExpression object designed to remove the foreign key constraints built by foreignKeyConstraintStatementsForRelationship().
  dropPrimaryKeyConstraintStatementsForEntityGroup(self, entityGroup)
Returns the SQL statement used to drop the primary key constraint.
  dropPrimaryKeySupportStatementsForEntityGroup(self, entityGroup)
Returns a list containing a single SQLExpression statement, which takes the following form: 'DROP SEQUENCE <SEQUENCE_NAME>', where '<SEQUENCE_NAME>' is:
  primaryKeyConstraintStatementsForEntityGroup(self, entityGroup)
Overrides the default implementation to return ALTER TABLE <TABLE> ADD CONSTRAINT <TABLE>_PRIMARY_KEY PRIMARY KEY(<PKs>)
  primaryKeySupportStatementsForEntityGroup(self, entityGroup)
Returns a list containing a single SQLExpression statement, which takes the following form: 'CREATE SEQUENCE <SEQUENCE_NAME> START WITH 1 ORDER', where '<SEQUENCE_NAME>' is:
    Inherited from SchemaGeneration
  __init__(self, anAdaptor)
See interfaces.SchemaGeneration for details
  appendExpressionToScript(self, expression, script)
Appends the expression to the StringIO script, prepended with a semi-colon (';') and a newline if the StringIO is not empty.
  createTableStatementsForEntityGroup(self, entityGroup)
Returns a list of SQLExpressions needed to create the tables defined by the supplied 'entityGroup', or an empty list if 'entityGroup' is empty.
  createTableStatementsForEntityGroups(self, entityGroups)
Invokes createTableStatementsForEntityGroup() for each entityGroup in 'entityGroups', and returns the list of SQLExpressions needed to create the necessary table.
  defaultOrderingsForSchemaCreation()
Used in method SchemaGeneration.schemaCreationScriptForEntities() to order the schema creation statements produced (Static method)
  dropPrimaryKeyConstraintStatementsForEntityGroups(self, entityGroups)
Iterates on each entityGroup in 'entityGroups', sends the message 'dropPrimaryKeyConstraintStatementsForEntityGroup' to each of them, collects the results and returns them in a sequence.
  dropPrimaryKeySupportStatementsForEntityGroups(self, entityGroups)
Iterates on each entityGroup in 'entityGroups', sends the message 'dropPrimaryKeySupportStatementsForEntityGroup' to each of them, collects the results and returns them in a sequence.
  dropTableStatementsForEntityGroup(self, entityGroup)
Parameter:
  dropTableStatementsForEntityGroups(self, entityGroups)
Iterates on each entityGroup in 'entityGroups', sends the message 'dropPrimaryKeySupportStatementsForEntityGroup()' to each of them, collects the results and returns them in a sequence.
  foreignKeyConstraintStatementsForRelationship(self, relationship)
Returns a list of SQLExpressions needed to add a constraint statement for the given relationship.
  primaryKeyConstraintStatementsForEntityGroups(self, entityGroups)
Iterates on each entityGroup in 'entityGroups', sends the message 'primaryKeyConstraintStatementsForEntityGroup' to each of them, collects the results and returns them in a sequence.
  primaryKeySupportStatementsForEntityGroups(self, entityGroups)
Iterates on each entityGroup in 'entityGroups', sends the message 'primaryKeySupportStatementsForEntityGroup' to each of them, collects the results and returns them in a sequence.
  schemaCreationScriptForEntities(self, allEntities, options, keyOrderings)
__TBD
  schemaCreationStatementsForEntities(self, allEntities, options, keyOrderings)
__TBD doc.
  schemaCreationStatementsForEntitiesByOptions(self, allEntities, options)
__TBD doc.
  setDefaultOrderingsForSchemaCreation(keyOrderings)
Sets the default ordering. (Static method)
  tableEntityGroupsForEntities(self, entities)
Returns a list of entityGroups ; each entityGroup consists of the entities in parameter 'entities' which share the same externalName(), and wich answered positively to the definesTableColumns() message.

Class Variable Summary
    Inherited from SchemaGeneration
tuple __implements__ = (<class Modeling.interfaces.SchemaGener...

Instance Method Details

createDatabaseStatementsForConnectionDictionary(self, connectionDictionary, administrativeConnectionDictionary, createUserFlag=1)

Not supported

See also: interfaces.SchemaGeneration for details

Overrides:
Modeling.SchemaGeneration.SchemaGeneration.createDatabaseStatementsForConnectionDictionary

dropDatabaseStatementsForConnectionDictionary(self, connectionDictionary, administrativeConnectionDictionary, dropUserFlag=1)

Not supported
Overrides:
Modeling.SchemaGeneration.SchemaGeneration.dropDatabaseStatementsForConnectionDictionary

dropForeignKeyConstraintStatementsForRelationship(self, relationship)

Return a SQLExpression object designed to remove the foreign key constraints built by foreignKeyConstraintStatementsForRelationship().

See also: foreignKeyConstraintStatementsForRelationship()

Overrides:
Modeling.SchemaGeneration.SchemaGeneration.dropForeignKeyConstraintStatementsForRelationship

dropPrimaryKeyConstraintStatementsForEntityGroup(self, entityGroup)

Returns the SQL statement used to drop the primary key constraint.

That statement is:

ALTER TABLE <TABLE> DROP CONSTRAINT <TABLE>_PRIMARY_KEY

where <TABLE> is entityGroup[0].externalName().

See Modeling.interfaces.SchemaGeneration for further details

See also: primaryKeyConstraintStatementsForEntityGroup()

Overrides:
Modeling.SchemaGeneration.SchemaGeneration.dropPrimaryKeyConstraintStatementsForEntityGroup

dropPrimaryKeySupportStatementsForEntityGroup(self, entityGroup)

Returns a list containing a single SQLExpression statement, which takes the following form: 'DROP SEQUENCE <SEQUENCE_NAME>', where '<SEQUENCE_NAME>' is:

'PK_SEQ_%s'%entityGroup[0].primaryKeyRootName()

See Modeling.interfaces.SchemaGeneration for further details

See also: OracleAdaptorChannel.primaryKeysForNewRowsWithEntity()

Overrides:
Modeling.SchemaGeneration.SchemaGeneration.dropPrimaryKeySupportStatementsForEntityGroup

primaryKeyConstraintStatementsForEntityGroup(self, entityGroup)

Overrides the default implementation to return ALTER TABLE <TABLE> ADD CONSTRAINT <TABLE>_PRIMARY_KEY PRIMARY KEY(<PKs>)

<TABLE> is entityGroup[0].externalName() and <PKs> is a comma-separated list made of entityGroup[0].primaryKeyAttributes().

Parameter:

'entityGroup' -- a list of entities whose externalNames are identical.
See also: dropPrimaryKeyConstraintStatementsForEntityGroup
primaryKeyConstraintStatementsForEntityGroups dropPrimaryKeySupportStatementsForEntityGroup
Overrides:
Modeling.SchemaGeneration.SchemaGeneration.primaryKeyConstraintStatementsForEntityGroup

primaryKeySupportStatementsForEntityGroup(self, entityGroup)

Returns a list containing a single SQLExpression statement, which takes the following form: 'CREATE SEQUENCE <SEQUENCE_NAME> START WITH 1 ORDER', where '<SEQUENCE_NAME>' is:

'PK_SEQ_%s'%entityGroup[0].primaryKeyRootName()

See Modeling.interfaces.SchemaGeneration for further details

See also:
dropPrimaryKeySupportStatementsForEntityGroup() OracleAdaptorChannel.primaryKeysForNewRowsWithEntity()
Overrides:
Modeling.SchemaGeneration.SchemaGeneration.primaryKeySupportStatementsForEntityGroup

Generated by Epydoc 2.1 on Sat Mar 4 13:36:23 2006 http://epydoc.sf.net