Package Modeling :: Package DatabaseAdaptors :: Package AbstractDBAPI2AdaptorLayer :: Module AbstractDBAPI2AdaptorChannel :: Class AbstractDBAPI2AdaptorChannel
[show private | hide private]
[frames | no frames]

Class AbstractDBAPI2AdaptorChannel

AdaptorChannel --+
                 |
                AbstractDBAPI2AdaptorChannel

Known Subclasses:
MySQLAdaptorChannel, OracleAdaptorChannel, PostgresqlAdaptorChannel, SQLiteAdaptorChannel

Your inheriting concrete Adaptor class must override:

You normally do not need to override other methods. In particular, dbAPI_cursor() does not need to be overridden --but you will use it to access the underlying cursor.


Method Summary
  __init__(self, anAdaptorContext)
See Modeling.interfaces.AdaptorChannel for details
  __unimplemented__(self)
  attributesToFetch(self)
See Modeling.interfaces.AdaptorChannel for details
  cancelFetch(self)
See Modeling.interfaces.AdaptorChannel for details
  closeChannel(self)
See Modeling.interfaces.AdaptorChannel for details
  dbAPI_cursor(self)
  deleteRowsDescribedByQualifier(self, aQualifier, anEntity)
Builds the DELETE SQLExpression for 'aQualifier' and 'anEntity' ans executes it.
  describeModelWithTableNames(self, tableNames)
See Modeling.interfaces.AdaptorChannel for details
  describeResults(self)
See Modeling.interfaces.AdaptorChannel for details
  describeStoredProcedureNames(self)
See Modeling.interfaces.AdaptorChannel for details
  describeTableNames(self)
See Modeling.interfaces.AdaptorChannel for details
  evaluateExpression(self, anSQLexpression)
See Modeling.interfaces.AdaptorChannel for details
  executeStoredProcedure(self, aStoredProcedure, values)
See Modeling.interfaces.AdaptorChannel for details
  fetchRow(self)
See Modeling.interfaces.AdaptorChannel for details
  insertRow(self, row, anEntity)
See Modeling.interfaces.AdaptorChannel for details
  isFetchInProgress(self)
See Modeling.interfaces.AdaptorChannel for details
  isOpen(self)
See Modeling.interfaces.AdaptorChannel for details
  openChannel(self)
See Modeling.interfaces.AdaptorChannel for details
  primaryKeysForNewRowsWithEntity(self, count, anEntity)
Generates and returns a list of dictionaries, whose keys are PK attributes' names and values the corresponding PK value.
  returnValuesForLastStoredProcedureInvocation(self)
See Modeling.interfaces.AdaptorChannel for details
  rowCountForSelectAttributes(self, attributes, aFetchSpecification, shouldLock, anEntity)
Implemented by concrete adaptors to return the number of rows that would be fetched if selectAttributes() is called with the same arguments.
  selectAttributes(self, attributes, aFetchSpecification, shouldLock, anEntity)
See Modeling.interfaces.AdaptorChannel for details
  setAttributesToFetch(self, attributes)
See Modeling.interfaces.AdaptorChannel for details
  updateValuesInRowsDescribedByQualifier(self, row, aQualifier, anEntity)
Builds the UPDATE SQLExpression for 'row', 'aQualifier' and 'anEntity' and executes it.
    Inherited from AdaptorChannel
  adaptorContext(self)
See interfaces.AdaptorChannel for details
  addStoredProceduresNamed(self, storedProcedureNames, aModel)
See interfaces.AdaptorChannel for details
  delegate(self)
See interfaces.AdaptorChannel for details
  deleteRowDescribedByQualifier(self, aQualifier, anEntity)
Calls 'deleteRowsDescribedByQualifier()' on itself and make sure that one and only one row was deleted.
  dictionaryWithObjectsForAttributes(self, objects, attributes)
See interfaces.AdaptorChannel for details
  lockRowComparingAttributes(self, atts, anEntity, aQualifier, snapshot)
See interfaces.AdaptorChannel for details
  performAdaptorOperation(self, anAdaptorOperation)
Examines 'anAdaptorOperation' and executes the corresponding method.
  performAdaptorOperations(self, adaptorOperations)
Iterates on each item in 'adaptorOperations' and calls 'performAdaptorOperation()' with that item as a parameter.
  setDelegate(self, aDelegate)
See interfaces.AdaptorChannel for details
  updateValuesInRowDescribedByQualifier(self, row, aQualifier, anEntity)
Calls 'updateValuesInRowsDescribedByQualifier' on itself and make sure that one and only one row was updated.

Class Variable Summary
tuple __implements__ = (<class Modeling.interfaces.AdaptorChan...

Method Details

__init__(self, anAdaptorContext)
(Constructor)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.__init__

__unimplemented__(self)

Overrides:
Modeling.AdaptorChannel.AdaptorChannel.__unimplemented__ (inherited documentation)

attributesToFetch(self)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.attributesToFetch

cancelFetch(self)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.cancelFetch

closeChannel(self)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.closeChannel

deleteRowsDescribedByQualifier(self, aQualifier, anEntity)

Builds the DELETE SQLExpression for 'aQualifier' and 'anEntity' ans executes it. Returns the number of rows that were deleted.

Raises GeneralAdaptorException if the channel is not opened, or if it is fetching, or if its AdaptorContext has no transaction in progress.

See Modeling.interfaces.AdaptorChannel for details

Overrides:
Modeling.AdaptorChannel.AdaptorChannel.deleteRowsDescribedByQualifier

describeModelWithTableNames(self, tableNames)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.describeModelWithTableNames

describeResults(self)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.describeResults

describeStoredProcedureNames(self)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.describeStoredProcedureNames

describeTableNames(self)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.describeTableNames

evaluateExpression(self, anSQLexpression)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.evaluateExpression

executeStoredProcedure(self, aStoredProcedure, values)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.executeStoredProcedure

fetchRow(self)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.fetchRow

insertRow(self, row, anEntity)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.insertRow

isFetchInProgress(self)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.isFetchInProgress

isOpen(self)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.isOpen

openChannel(self)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.openChannel

primaryKeysForNewRowsWithEntity(self, count, anEntity)

Generates and returns a list of dictionaries, whose keys are PK attributes' names and values the corresponding PK value.

If 'anEntity' defines more than one PK (compound primary key), returns an empty list.

Parameters:

count -- the number of primary keys to generate

anEntity -- the entity for which PKs are generated

Subclasses should override this method without calling the superclass' implementation.

This method is correlated with the implementation of your concrete SchemaGeneration's methods:

  • primaryKeySupportStatementsForEntityGroup()
  • dropPrimaryKeySupportStatementsForEntityGroup()

See also: Modeling.AdaptorChannel.primaryKeysForNewRowsWithEntity()

Overrides:
Modeling.AdaptorChannel.AdaptorChannel.primaryKeysForNewRowsWithEntity

returnValuesForLastStoredProcedureInvocation(self)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.returnValuesForLastStoredProcedureInvocation

rowCountForSelectAttributes(self, attributes, aFetchSpecification, shouldLock, anEntity)

Implemented by concrete adaptors to return the number of rows that would be fetched if selectAttributes() is called with the same arguments.

Parameters: see selectAttributes()

See also: SQLExpression.prepareSelectCountExpressionWithAttributes()

Overrides:
Modeling.AdaptorChannel.AdaptorChannel.rowCountForSelectAttributes (inherited documentation)

selectAttributes(self, attributes, aFetchSpecification, shouldLock, anEntity)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.selectAttributes

setAttributesToFetch(self, attributes)

See Modeling.interfaces.AdaptorChannel for details
Overrides:
Modeling.AdaptorChannel.AdaptorChannel.setAttributesToFetch

updateValuesInRowsDescribedByQualifier(self, row, aQualifier, anEntity)

Builds the UPDATE SQLExpression for 'row', 'aQualifier' and 'anEntity' and executes it.

Returns the number of rows that were updated.

Raises GeneralAdaptorException if the channel is not opened, or if it is fetching, or if its AdaptorContext has no transaction in progress.

See Modeling.interfaces.AdaptorChannel for details

Overrides:
Modeling.AdaptorChannel.AdaptorChannel.updateValuesInRowsDescribedByQualifier

Class Variable Details

__implements__

Type:
tuple
Value:
(<class Modeling.interfaces.AdaptorChannel.IAdaptorChannel at 0xb77020\
8c>,)                                                                  

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