dto¶
- class advanced_alchemy.extensions.litestar.dto.SQLAlchemyDTO[source]¶
Bases:
AbstractDTO
,Generic
[T
]Support for domain modelling with SQLAlchemy.
- config: ClassVar[SQLAlchemyDTOConfig]¶
Config objects to define properties of the DTO.
- classmethod generate_field_definitions(model_type: type[DeclarativeBase]) Generator[DTOFieldDefinition, None, None] [source]¶
Generate
FieldDefinition
instances frommodel_type
.- Yields:
FieldDefinition
instances.
- classmethod detect_nested_field(field_definition: FieldDefinition) bool [source]¶
Return
True
iffield_definition
represents a nested model field.- Parameters:
field_definition¶ – inspect type to determine if field represents a nested model.
- Returns:
True
iffield_definition
represents a nested model field.