ORM Mapped Class Configuration¶
Relationship Configuration に詳述されている、関係を含まないORM設定の詳細なリファレンスです。
典型的なORM設定をざっと見るには、 ORM Quick Start から始めてください。
SQLAlchemyで実装されているオブジェクトリレーショナルマッピングの概念については、 Using ORM Declarative Forms to Define Table Metadata の SQLAlchemy Unified Tutorial で最初に紹介されています。
- ORM Mapped Class Overview
- Mapping Classes with Declarative
- Declarative Mapping Styles
- Table Configuration with Declarative
- Declarative Table with
mapped_column()
- Using Annotated Declarative Table (Type Annotated Forms for
mapped_column()
) - Accessing Table and Metadata
- Declarative Table Configuration
- Explicit Schema Name with Declarative Table
- Setting Load and Persistence Options for Declarative Mapped Columns
- Naming Declarative Mapped Columns Explicitly
- Appending additional columns to an existing Declarative mapped class
- Using Annotated Declarative Table (Type Annotated Forms for
- Declarative with Imperative Table (a.k.a. Hybrid Declarative)
- Mapping Declaratively with Reflected Tables
- Declarative Table with
- Mapper Configuration with Declarative
- Composing Mapped Hierarchies with Mixins
- Augmenting the Base
- Mixing in Columns
- Mixing in Relationships
- Mixing in
_orm.column_property()
and other_orm.MapperProperty
classes - Using Mixins and Base Classes with Mapped Inheritance Patterns
- Combining Table/Mapper Arguments from Multiple Mixins
- Creating Indexes and Constraints with Naming Conventions on Mixins
- Integration with dataclasses and attrs
- SQL Expressions as Mapped Attributes
- Changing Attribute Behavior
- Composite Column Types
- Mapping Class Inheritance Hierarchies
- Non-Traditional Mappings
- Configuring a Version Counter
- Class Mapping API
registry
add_mapped_attribute()
column_property()
declarative_base()
declarative_mixin()
as_declarative()
mapped_column()
declared_attr
DeclarativeBase
DeclarativeBaseNoMeta
has_inherited_table()
synonym_for()
object_mapper()
class_mapper()
configure_mappers()
clear_mappers()
identity_key()
polymorphic_union()
orm_insert_sentinel()
reconstructor()
Mapper
Mapper.__init__()
Mapper.add_properties()
Mapper.add_property()
Mapper.all_orm_descriptors
Mapper.attrs
Mapper.base_mapper
Mapper.c
Mapper.cascade_iterator()
Mapper.class_
Mapper.class_manager
Mapper.column_attrs
Mapper.columns
Mapper.common_parent()
Mapper.composites
Mapper.concrete
Mapper.configured
Mapper.entity
Mapper.get_property()
Mapper.get_property_by_column()
Mapper.identity_key_from_instance()
Mapper.identity_key_from_primary_key()
Mapper.identity_key_from_row()
Mapper.inherits
Mapper.is_mapper
Mapper.is_sibling()
Mapper.isa()
Mapper.iterate_properties
Mapper.local_table
Mapper.mapped_table
Mapper.mapper
Mapper.non_primary
Mapper.persist_selectable
Mapper.polymorphic_identity
Mapper.polymorphic_iterator()
Mapper.polymorphic_map
Mapper.polymorphic_on
Mapper.primary_key
Mapper.primary_key_from_instance()
Mapper.primary_mapper()
Mapper.relationships
Mapper.selectable
Mapper.self_and_descendants
Mapper.single
Mapper.synonyms
Mapper.tables
Mapper.validators
Mapper.with_polymorphic_mappers
MappedAsDataclass
MappedClassProtocol