SQLAlchemy 0.6.6 Documentation
Search:
Version:
0.6.6
Last Updated: 01/08/2011 17:20:49
Index
(
view source)
Table of Contents
» SQLAlchemy ORM
Previous:
Overview / Installation
Next:
Object Relational Tutorial
SQLAlchemy ORM
SQLAlchemy ORM
¶
Object Relational Tutorial
Introduction
Version Check
Connecting
Define and Create a Table
Define a Python Class to be Mapped
Setting up the Mapping
Creating Table, Class and Mapper All at Once Declaratively
Creating a Session
Adding new Objects
Rolling Back
Querying
Building a Relationship
Working with Related Objects
Querying with Joins
Deleting
Building a Many To Many Relationship
Further Reference
Mapper Configuration
Customizing Column Properties
Deferred Column Loading
SQL Expressions as Mapped Attributes
Changing Attribute Behavior
Composite Column Types
Mapping a Class against Multiple Tables
Mapping a Class against Arbitrary Selects
Multiple Mappers for One Class
Multiple “Persistence” Mappers for One Class
Constructors and Object Initialization
The
mapper()
API
Relationship Configuration
Basic Relational Patterns
Adjacency List Relationships
Specifying Alternate Join Conditions to relationship()
Rows that point to themselves / Mutually Dependent Rows
Mutable Primary Keys / Update Cascades
The
relationship()
API
Collection Configuration and Techniques
Working with Large Collections
Customizing Collection Access
Mapping Class Inheritance Hierarchies
Joined Table Inheritance
Single Table Inheritance
Concrete Table Inheritance
Using Relationships with Inheritance
Using Inheritance with Declarative
Using the Session
What does the Session do ?
Getting a Session
Using the Session
Cascades
Managing Transactions
Embedding SQL Insert/Update Expressions into a Flush
Using SQL Expressions with Sessions
Joining a Session into an External Transaction
The
Session
object and
sessionmaker()
function
Contextual/Thread-local Sessions
Partitioning Strategies
Session Utilities
Attribute and State Management Utilities
Querying
The Query Object
ORM-Specific Query Constructs
Relationship Loading Techniques
Using Loader Strategies: Lazy Loading, Eager Loading
The Zen of Eager Loading
What Kind of Loading to Use ?
Routing Explicit Joins/Statements into Eagerly Loaded Collections
Relation Loader API
ORM Event Interfaces
Mapper Events
Session Events
Attribute Events
Instrumentation Events and Re-implementation
ORM Exceptions
ORM Extensions
Association Proxy
Declarative
Ordering List
Horizontal Sharding
SqlSoup
Examples
Adjacency List
Associations
Attribute Instrumentation
Beaker Caching
Derived Attributes
Directed Graphs
Dynamic Relations as Dictionaries
Horizontal Sharding
Inheritance Mappings
Large Collections
Nested Sets
Polymorphic Associations
PostGIS Integration
Versioned Objects
Vertical Attribute Mapping
XML Persistence
Previous:
Overview / Installation
Next:
Object Relational Tutorial
©
Copyright
2007-2011, the SQLAlchemy authors and contributors. Created using
Sphinx
1.0.1.