assembl.lib.generic_pointer module

class assembl.lib.generic_pointer.GenericRelationshipProperty(*args, **kwargs)[source]

Bases: sqlalchemy_utils.generic.GenericRelationshipProperty

instrument_class(mapper)[source]

Hook called by the Mapper to the property to initiate instrumentation of the class attribute managed by this MapperProperty.

The MapperProperty here will typically call out to the attributes module to set up an InstrumentedAttribute.

This step is the first of two steps to set up an InstrumentedAttribute, and is called early in the mapper setup process.

The second step is typically the init_class_attribute step, called from StrategizedProperty via the post_instrument_class() hook. This step assigns additional state to the InstrumentedAttribute (specifically the “impl”) which has been determined after the MapperProperty has determined what kind of persistence management it needs to do (e.g. scalar, object, collection, etc).

class assembl.lib.generic_pointer.MulticlassTableRefColType(target_classes, *args, **kwargs)[source]

Bases: sqlalchemy.dialects.postgresql.base.ENUM

create(bind=None, checkfirst=True)[source]

Emit CREATE TYPE for this _postgresql.ENUM.

If the underlying dialect does not support PostgreSQL CREATE TYPE, no action is taken.

Parameters
  • bind – a connectable _engine.Engine, _engine.Connection, or similar object to emit SQL.

  • checkfirst – if True, a query against the PG catalog will be first performed to see if the type does not exist already before creating.

class assembl.lib.generic_pointer.UniversalTableRefColType(*args, **kwargs)[source]

Bases: assembl.lib.decl_enums.UpdatablePgEnum