Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this

Table Of Contents

1.1 Overview
1.2 Documentation Overview
1.3 Code Examples
1.4 Installing SQLAlchemy
1.5 Installing a Database API
1.6 Checking the Installed SQLAlchemy Version
1.7 0.5 to 0.6 Migration
2.1 Object Relational Tutorial
2.1.1 Introduction
2.1.2 Version Check
2.1.3 Connecting
2.1.4 Define and Create a Table
2.1.5 Define a Python Class to be Mapped
2.1.6 Setting up the Mapping
2.1.7 Creating Table, Class and Mapper All at Once Declaratively
2.1.8 Creating a Session
2.1.9 Adding new Objects
2.1.10 Rolling Back
2.1.11 Querying
Common Filter Operators
Returning Lists and Scalars
Using Literal SQL
2.1.12 Building a Relationship
2.1.13 Working with Related Objects
2.1.14 Querying with Joins
Using join() to Eagerly Load Collections/Attributes
Using Aliases
Using Subqueries
Selecting Entities from Subqueries
Common Relationship Operators
2.1.15 Deleting
Configuring delete/delete-orphan Cascade
2.1.16 Building a Many To Many Relationship
2.1.17 Further Reference
2.2 Mapper Configuration
2.2.1 Customizing Column Properties
Mapping a Subset of Table Columns
Attribute Names for Mapped Columns
Mapping Multiple Columns to a Single Attribute
2.2.2 Deferred Column Loading
2.2.3 SQL Expressions as Mapped Attributes
2.2.4 Changing Attribute Behavior
Simple Validators
Using Descriptors
Custom Comparators
2.2.5 Composite Column Types
2.2.6 Mapping a Class against Multiple Tables
2.2.7 Mapping a Class against Arbitrary Selects
2.2.8 Multiple Mappers for One Class
2.2.9 Multiple “Persistence” Mappers for One Class
2.2.10 Constructors and Object Initialization
2.2.11 The mapper() API
2.3 Relationship Configuration
2.3.1 Basic Relational Patterns
One To Many
Many To One
One To One
Many To Many
Association Object
2.3.2 Adjacency List Relationships
Self-Referential Query Strategies
Configuring Eager Loading
2.3.3 Specifying Alternate Join Conditions to relationship()
Specifying Foreign Keys
Building Query-Enabled Properties
Multiple Relationships against the Same Parent/Child
2.3.4 Rows that point to themselves / Mutually Dependent Rows
2.3.5 Mutable Primary Keys / Update Cascades
2.3.6 The relationship() API
2.4 Collection Configuration and Techniques
2.4.1 Working with Large Collections
Dynamic Relationship Loaders
Setting Noload
Using Passive Deletes
2.4.2 Customizing Collection Access
Custom Collection Implementations
Annotating Custom Collections via Decorators
Dictionary-Based Collections
Instrumentation and Custom Types
Collections API
2.5 Mapping Class Inheritance Hierarchies
2.5.1 Joined Table Inheritance
Basic Control of Which Tables are Queried
Advanced Control of Which Tables are Queried
Creating Joins to Specific Subtypes
2.5.2 Single Table Inheritance
2.5.3 Concrete Table Inheritance
2.5.4 Using Relationships with Inheritance
Relationships with Concrete Inheritance
2.5.5 Using Inheritance with Declarative
2.6 Using the Session
2.6.1 What does the Session do ?
2.6.2 Getting a Session
2.6.3 Using the Session
Quickie Intro to Object States
Frequently Asked Questions
Adding New or Existing Items
Rolling Back
Refreshing / Expiring
Session Attributes
2.6.4 Cascades
2.6.5 Managing Transactions
Enabling Two-Phase Commit
2.6.6 Embedding SQL Insert/Update Expressions into a Flush
2.6.7 Using SQL Expressions with Sessions
2.6.8 Joining a Session into an External Transaction
Session = sessionmaker()
2.6.9 The Session object and sessionmaker() function
2.6.10 Contextual/Thread-local Sessions
Creating a Thread-local Context
Lifespan of a Contextual Session
Contextual Session API
2.6.11 Partitioning Strategies
Vertical Partitioning
Horizontal Partitioning
2.6.12 Session Utilities
2.6.13 Attribute and State Management Utilities
2.7 Querying
2.7.1 The Query Object
2.7.2 ORM-Specific Query Constructs
2.8 Relationship Loading Techniques
2.8.1 Using Loader Strategies: Lazy Loading, Eager Loading
2.8.2 The Zen of Eager Loading
2.8.3 What Kind of Loading to Use ?
2.8.4 Routing Explicit Joins/Statements into Eagerly Loaded Collections
2.10 ORM Exceptions
2.11 ORM Extensions
2.11.1 Association Proxy
Simplifying Relationships
Simplifying Association Object Relationships
Building Complex Views
2.11.2 Declarative
Defining Attributes
Accessing the MetaData
Configuring Relationships
Configuring Many-to-Many Relationships
Defining Synonyms
Defining SQL Expressions
Table Configuration
Using a Hybrid Approach with __table__
Mapper Configuration
Inheritance Configuration
Mixin Classes
Class Constructor
API Reference
2.11.3 Ordering List
2.11.4 Horizontal Sharding
API Documentation
2.11.5 SqlSoup
Loading objects
Modifying objects
Advanced Use
2.12 Examples
2.12.1 Adjacency List
2.12.2 Associations
2.12.3 Attribute Instrumentation
2.12.4 Beaker Caching
2.12.5 Derived Attributes
2.12.6 Directed Graphs
2.12.7 Dynamic Relations as Dictionaries
2.12.8 Horizontal Sharding
2.12.9 Inheritance Mappings
2.12.10 Large Collections
2.12.11 Nested Sets
2.12.12 Polymorphic Associations
2.12.13 PostGIS Integration
2.12.14 Versioned Objects
2.12.15 Vertical Attribute Mapping
2.12.16 XML Persistence
3.1 SQL Expression Language Tutorial
3.1.1 Introduction
3.1.2 Version Check
3.1.10 Operators
3.1.11 Conjunctions
3.1.12 Using Text
3.1.13 Using Aliases
3.1.14 Using Joins
3.1.15 Intro to Generative Selects and Transformations
3.1.16 Everything Else
Bind Parameter Objects
Unions and Other Set Operations
Scalar Selects
Correlated Subqueries
Ordering, Grouping, Limiting, Offset...ing
3.1.17 Inserts and Updates
Correlated Updates
3.1.18 Deletes
3.1.19 Further Reference
3.2 SQL Statements and Expressions
3.2.1 Functions
3.2.2 Classes
class sqlalchemy.sql.expression.ColumnOperators
3.2.3 Generic Functions
3.3 Engine Configuration
3.3.1 Supported Databases
3.3.2 Database Engine Options
3.3.3 Database Urls
3.3.4 Custom DBAPI connect() arguments
3.3.5 Configuring Logging
3.4 Working with Engines and Connections
3.4.1 Basic Usage
3.4.2 Using Transactions
3.4.3 Understanding Autocommit
3.4.4 Connectionless Execution, Implicit Execution
3.4.5 Using the Threadlocal Execution Strategy
3.5 Connection Pooling
3.5.1 Connection Pool Configuration
3.5.2 Switching Pool Implementations
3.5.3 Using a Custom Connection Function
3.5.4 Constructing a Pool
3.5.5 Pool Event Listeners
3.5.6 Builtin Pool Implementations
3.5.7 Pooling Plain DB-API Connections
3.6 Schema Definition Language
3.6.1 Describing Databases with MetaData
Accessing Tables and Columns
Creating and Dropping Database Tables
Binding MetaData to an Engine or Connection
Specifying the Schema Name
Backend-Specific Options
Schema API Constructs
3.6.2 Reflecting Database Objects
Overriding Reflected Columns
Reflecting Views
Reflecting All Tables at Once
Fine Grained Reflection with Inspector
3.6.3 Column Insert/Update Defaults
Scalar Defaults
Python-Executed Functions
SQL Expressions
Server Side Defaults
Triggered Columns
Defining Sequences
Default Geneation API Constructs
Bases: sqlalchemy.schema.DefaultGenerator
3.6.4 Defining Constraints and Indexes
Defining Foreign Keys
UNIQUE Constraint
CHECK Constraint
Bases: sqlalchemy.schema.Constraint
Other Constraint Classes
3.6.5 Customizing DDL
Controlling DDL Sequences
Custom DDL
3.7 Column and Data Types
3.7.1 Generic Types
3.7.2 SQL Standard Types
Bases: sqlalchemy.types.Text
3.7.3 Vendor-Specific Types
3.7.4 Custom Types
Overriding Type Compilation
Augmenting Existing Types
Creating New Types
3.7.5 Base Type API
3.8 Core Event Interfaces
3.8.1 Execution, Connection and Cursor Events
3.8.2 Connection Pool Events
3.9 Core Exceptions
3.10 Custom SQL Constructs and Compilation Extension
3.10.1 Synopsis
3.10.2 Dialect-specific compilation rules
3.10.3 Compiling sub-elements of a custom expression construct
Cross Compiling between SQL and DDL compilers
3.10.4 Changing the default compilation of existing constructs
3.10.5 Changing Compilation of Types
3.10.6 Subclassing Guidelines
3.11 Expression Serializer Extension
SQL Server Data Types
zxjdbc Notes
4.1.3 MySQL
Supported Versions and Features
Connection Timeouts
Storage Engines
SQL Mode
MySQL SQL Extensions
MySQL Data Types
MySQL-Python Notes
OurSQL Notes
MySQL-Connector Notes
pyodbc Notes
4.1.4 Oracle
Connect Arguments
Identifier Casing
Oracle 8 Compatibility
Synonym/DBLINK Reflection
Oracle Data Types
cx_Oracle Notes
4.1.5 PostgreSQL
Transaction Isolation Level
PostgreSQL Data Types
psycopg2 Notes
py-postgresql Notes
pg8000 Notes
4.1.6 SQLite
Date and Time Types
Auto Incrementing Behavior
SQLite Data Types
4.1.7 Sybase
python-sybase notes
pyodbc notes
mxodbc notes
4.2 Unsupported Databases
4.2.1 Microsoft Access
4.2.2 Informix
4.2.3 MaxDB
Implementation Notes
0 of .
Results for:
No results containing your search query
P. 1


Ratings: (0)|Views: 220 |Likes:
Published by Khoa Võ

More info:

Published by: Khoa Võ on Dec 06, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





You're Reading a Free Preview
Pages 8 to 130 are not shown in this preview.
You're Reading a Free Preview
Pages 141 to 177 are not shown in this preview.
You're Reading a Free Preview
Pages 185 to 303 are not shown in this preview.
You're Reading a Free Preview
Pages 311 to 350 are not shown in this preview.

Activity (3)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Tester VietNam liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->