Mapping Columns and Expressions — SQLAlchemy 1.4 Documentation

Release: 1.4.31 | Release Date: January 20, 2022

# SQLAlchemy 1.4 Documentation

# Mapping Columns and Expressions

The following sections discuss how table columns and SQL expressions are mapped to individual object attributes.

- Mapping Table Columns
  - Naming Columns Distinctly from Attribute Names
  - Automating Column Naming Schemes from Reflected Tables
  - Naming All Columns with a Prefix
  - Using column_property for column level options
  - Mapping a Subset of Table Columns
- SQL Expressions as Mapped Attributes
  - Using a Hybrid
  - Using column_property
    - Composing from Column Properties at Mapping Time
  - Using a plain descriptor
  - Query-time SQL expressions as mapped attributes
- Changing Attribute Behavior
  - Simple Validators
  - Using Custom Datatypes at the Core Level
  - Using Descriptors and Hybrids
  - Synonyms
  - Operator Customization
- Composite Column Types
  - Tracking In-Place Mutations on Composites
  - Redefining Comparison Operations for Composites
  - Nesting Composites