Declarative
The Declarative system is the typically used system provided by the SQLAlchemyORM in order to define classes mapped to relational database tables. However,as noted in Classical Mappings, Declarative is in fact a series ofextensions that ride on top of the SQLAlchemy mapper()
construct.
While the documentation typically refers to Declarative for most examples,the following sections will provide detailed information on how theDeclarative API interacts with the basic mapper()
and Core Table
systems, as well as how sophisticated patterns can be built using systemssuch as mixins.
- Basic Use
- Configuring Relationships
- Table Configuration
- Inheritance Configuration
- Mixin and Custom Base Classes
- Augmenting the Base
- Mixing in Columns
- Mixing in Relationships
- Mixing in deferred(), column_property(), and other MapperProperty classes
- Mixing in Association Proxy and Other Attributes
- Controlling table inheritance with mixins
- Mixing in Columns in Inheritance Scenarios
- Combining Table/Mapper Arguments from Multiple Mixins
- Creating Indexes with Mixins
- Declarative API
当前内容版权归 SQLAlchemy 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 SQLAlchemy .