SQLAlchemy
The Database Toolkit for Python
  • home
  • features
    • Feature Overview
    • Organizations
    • Testimonials
  • blog
  • library
    • Reference
      • Reference Documentation
    • Architecture
    • Blog Posts
    • Talks
    • Tutorials
    • Recipes
  • community
    • Get Support
    • Participate
    • Develop
    • Bitbucket
  • download
Release: 1.1.0b1 | Release Date: not released

SQLAlchemy 1.1 Documentation

SQLAlchemy 1.1 Documentation

Contents | Index | PDF

SQLAlchemy ORM

  • Object Relational Tutorial
  • Mapper Configuration
    • Types of Mappings
    • Mapping Columns and Expressions¶
      • Mapping Table Columns
      • 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
  • Relationship Configuration
  • Loading Objects
  • Using the Session
  • Events and Internals
  • ORM Extensions
  • ORM Examples

Project Versions

  • 1.1.0b1

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
    • Using a plain descriptor
  • Changing Attribute Behavior
    • Simple Validators
    • Using Descriptors and Hybrids
    • Synonyms
    • Operator Customization
  • Composite Column Types
    • Tracking In-Place Mutations on Composites
    • Redefining Comparison Operations for Composites
Previous: Types of Mappings Next: Mapping Table Columns
© Copyright 2007-2016, the SQLAlchemy authors and contributors. Created using Sphinx 1.3.5.
Python

Website content copyright © by SQLAlchemy authors and contributors. SQLAlchemy and its documentation are licensed under the MIT license.

SQLAlchemy is a trademark of Michael Bayer. mike(&)zzzcomputing.com All rights reserved.

Website generation by Blogofile and Mako Templates for Python.