Support for reusable sqlalchemy composite fields.
Base class for creating composite classes which
class MyComposite(object): foo = db.Column(db.Integer()) bar = db.Column(db.Integer()) class MyModel(db.Model): test = db.CompositeField(MyComposite) # both test_foo and test_bar columns will be added to model # their instrumented properties will be _test_foo and _test_bar
Serializer composite to a dictionary.
Composite field which understands composite objects with builtin columns.
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).