Table of Contents

Class: IManagedConn_SPI ./src/peak/storage/interfaces.py

Methods that must/may be defined in a ManagedConnection subclass

Base Classes   
Interface
Methods   
_close
_open
  _close 
_close ( self )

Actions to take before del self.connection, if needed.

This method is automatically called when self.connection exists and needs to be closed. If your subclass needs to do anything special at this time (e.g. calling a close method on self.connection, you can override this method to do so.

  _open 
_open ()

Return new "real" connection to be saved as self.connection

This method will be called whenever a new connection needs to be opened. It should return an opened connection of the appropriate type, using whatever configuration data is available. The result will be saved as self.connection for use by other methods. (Note: your subclass code shouldn't call self._open(), since it'll be called automatically if it's needed, when you attempt to use self.connection.

Overriding this method is required.


Table of Contents

This document was automatically generated on Mon Nov 11 01:11:05 2024 by HappyDoc version 2.1