stalker.db.mixin.ReferenceMixinDB — Stalker v0.1.1.a9 documentation

### Navigation

- index
- next |
- previous |
- Stalker v0.1.1.a9 documentation »

# stalker.db.mixin.ReferenceMixinDB

class `stalker.db.mixin.` `ReferenceMixinDB`

  Bases: `object`

  A helper class for ReferenceMixin table and mapper setup.

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

  See examples/extending/great_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={})

    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

### Navigation

- index
- next |
- previous |
- Stalker v0.1.1.a9 documentation »