Previous topic

stalker.db.mixin.ReferenceMixinDB

Next topic

stalker.db.mixin.ScheduleMixinDB

This Page

stalker.db.mixin.StatusMixinDB

Inheritance diagram of stalker.db.mixin.StatusMixinDB

class stalker.db.mixin.StatusMixinDB[source]

Bases: object

A helper class for StatusMixin table and mapper setup.

Helps setting up tables and mappers for classes mixed in with stalker.core.models.StatusMixin

See examples/extending/statused_entity.py for an example.

__init__()

x.__init__(...) initializes x; see help(type(x)) for signature

Methods

setup(class_, class_table[, mapper_arguments]) Creates the necessary tables and properties for the mappers for the mixed in class.
classmethod setup(class_, class_table, mapper_arguments={})[source]

Creates the necessary tables and properties for the mappers for the mixed in class.

Use the returning dictionary (mapper_arguments) in your mapper.

Parameters:
  • class_ – The mixed in class, in other words the class which will be extended with the mixin functionalities
  • class_table – The table holding the information about the class
  • mapper_arguments (dict) – Incoming mapper arugments for the SQLAlchemy.Orm.Mapper, it will be updated with the properties of the current mixin
Returns:

a dictionary holding the mapper_arguments