Package Modeling :: Package DatabaseAdaptors :: Package PostgresqlAdaptorLayer :: Module PostgresqlAdaptorContext :: Class PostgresqlAdaptorContext
[show private | hide private]
[frames | no frames]

Class PostgresqlAdaptorContext

          AdaptorContext --+    
                           |    
AbstractDBAPI2AdaptorContext --+
                               |
                              PostgresqlAdaptorContext


Concrete AdaptorContext for Postgresql [module psycopg,pgdb or pypgsql]
Method Summary
  adaptorChannelDidClose(self, aChannel)
Invokes AbstractDBAPI2AdaptorContext.adaptorChannelDidClose(), then rollbacks the connection if it still exists (it might have been closed by the superclass' method depending on the configuration) AND if the adaptor uses psycopg AND if there is no more opened channels.
  createAdaptorChannel(self)
See also: Modeling.interfaces.AdaptorContext for details
    Inherited from AbstractDBAPI2AdaptorContext
  __init__(self, anAdaptor)
Initialization.
  beginTransaction(self)
Starts a new transaction.
  commitTransaction(self)
Commits the currently opened transaction.
  dbAPI_cursorForAdaptorChannel(self)
Returns a 'cursor' for use by an AbstractDBAPI2AdaptorChannel when it is about to open the channel.
  rollbackTransaction(self)
Rollbacks the currently opened transaction.
    Inherited from AdaptorContext
  __addChannel__(self, aChannel)
See interfaces.AdaptorContext for details
  adaptor(self)
See interfaces.AdaptorContext for details
  channels(self)
See interfaces.AdaptorContext for details
  delegate(self)
See interfaces.AdaptorContext for details
  handleDroppedConnection(self)
See interfaces.AdaptorContext for details
  hasBusyChannels(self)
See interfaces.AdaptorContext for details
  hasOpenChannels(self)
See interfaces.AdaptorContext for details
  hasOpenTransaction(self)
See interfaces.AdaptorContext for details
  setDelegate(self, aDelegate)
See interfaces.AdaptorContext for details
  transactionDidBegin(self)
See interfaces.AdaptorContext for details
  transactionDidCommit(self)
See interfaces.AdaptorContext for details
  transactionDidRollback(self)
See interfaces.AdaptorContext for details

Class Variable Summary
    Inherited from AbstractDBAPI2AdaptorContext
tuple __implements__ = (<class Modeling.interfaces.AdaptorCont...
    Inherited from AdaptorContext
str __raise_exception__ = 'AbstractMethod'
str __raise_msg__ = 'Left intentionally unimplemented in thi...

Method Details

adaptorChannelDidClose(self, aChannel)

Invokes AbstractDBAPI2AdaptorContext.adaptorChannelDidClose(), then rollbacks the connection if it still exists (it might have been closed by the superclass' method depending on the configuration) AND if the adaptor uses psycopg AND if there is no more opened channels.

The reason for that is that psycopg insolates each connection from another, hence if an other process make changes to the database these changes wont be seen unless the connection itself is closed or rolled back.

Overrides:
Modeling.DatabaseAdaptors.AbstractDBAPI2AdaptorLayer.AbstractDBAPI2AdaptorContext.AbstractDBAPI2AdaptorContext.adaptorChannelDidClose

createAdaptorChannel(self)

See also: Modeling.interfaces.AdaptorContext for details
Overrides:
Modeling.DatabaseAdaptors.AbstractDBAPI2AdaptorLayer.AbstractDBAPI2AdaptorContext.AbstractDBAPI2AdaptorContext.createAdaptorChannel

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