l.s.d.i.IDatabasePolicy(Interface) : interface documentation

Part of lp.services.database.interfaces View In Hierarchy

Implement database policy based on the request.

The publisher adapts the request to IDatabasePolicy to instantiate the policy for the current request.

Method __enter__ Standard Python context manager interface.
Method __exit__ Standard Python context manager interface.
Method getStore Retrieve a Store.
Method install Hook called when policy is pushed onto the IStoreSelector.
Method uninstall Hook called when policy is popped from the IStoreSelector.
def __enter__():
Standard Python context manager interface.

The IDatabasePolicy will install itself using the IStoreSelector utility.

def __exit__(exc_type, exc_value, traceback):
Standard Python context manager interface.

The IDatabasePolicy will uninstall itself using the IStoreSelector utility.

def getStore(name, flavor):
Retrieve a Store.
Parametersnameone of ALL_STORES.
flavorMASTER_FLAVOR, SLAVE_FLAVOR, or DEFAULT_FLAVOR.
def install():
Hook called when policy is pushed onto the IStoreSelector.
def uninstall():
Hook called when policy is popped from the IStoreSelector.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.