Querying Data, Loading Objects
The following sections refer to techniques for emitting SELECT statements within an ORM context. This involves primarily statements that return instances of ORM mapped objects, but also involves calling forms that deliver individual column or groups of columns as well.
For an introduction to querying with the SQLAlchemy ORM, one of the following tutorials shoud be consulted:
SQLAlchemy 1.4 / 2.0 Tutorial - for 2.0 style usage
Object Relational Tutorial (1.x API) - for 1.x style usage.
As SQLAlchemy 1.4 represents a transition from 1.x to 2.0 style, the below sections are currently mixed as far as which style they are using.
- ORM Querying Guide
- Loading Columns
- Relationship Loading Techniques
- Configuring Loader Strategies at Mapping Time
- Relationship Loading with Loader Options
- Lazy Loading
- Joined Eager Loading
- Subquery Eager Loading
- Select IN loading
- What Kind of Loading to Use ?
- Polymorphic Eager Loading
- Wildcard Loading Strategies
- Routing Explicit Joins/Statements into Eagerly Loaded Collections
- Creating Custom Load Rules
- Relationship Loader API
- Loading Inheritance Hierarchies
- Constructors and Object Initialization
- Query API
当前内容版权归 SQLAlchemy 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 SQLAlchemy .