Class tigrbl.column.column_spec.ColumnSpec
tigrbl.column.column_spec.ColumnSpec
ColumnSpec(
*,
storage,
field=None,
io=None,
default_factory=None,
read_producer=None,
)
Aggregate configuration for a model attribute.
A :class:ColumnSpec
brings together the three lower-level specs used by
Tigrbl's declarative column system:
storage
(:class:~tigrbl.column.storage_spec.StorageSpec
) controls how the value is persisted in the database.field
(:class:~tigrbl.column.field_spec.FieldSpec
) describes the Python type and any schema metadata.io
(:class:~tigrbl.column.io_spec.IOSpec
) governs inbound and outbound API exposure.
Optional default_factory
and read_producer
callables allow for
programmatic defaults and virtual read-time values respectively.
Source code in tigrbl/column/column_spec.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
storage
instance-attribute
storage = storage
default_factory
instance-attribute
default_factory = default_factory
read_producer
instance-attribute
read_producer = read_producer