]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Repair formatting throughout documentation
authorKataev Denis <kataev@skydns.ru>
Mon, 22 May 2017 21:52:45 +0000 (17:52 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 22 May 2017 21:53:09 +0000 (17:53 -0400)
1. Section decorators to [one style](http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#sections):
without inset at both side and with same length as text.
2. Fix broken [reference](http://docs.sqlalchemy.org/en/latest/core/type_basics.html#generic-types).
3. Convert tabs to space in some small files.
4. Some python code snippets have python+sql syntax hint.

Change-Id: I39a7a41ef0b0591c6bf1e610748e2b5c19fc5379
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/361

88 files changed:
doc/build/changelog/changelog_01.rst
doc/build/changelog/changelog_02.rst
doc/build/changelog/changelog_03.rst
doc/build/changelog/changelog_04.rst
doc/build/changelog/changelog_05.rst
doc/build/changelog/changelog_06.rst
doc/build/changelog/changelog_07.rst
doc/build/changelog/changelog_08.rst
doc/build/changelog/changelog_09.rst
doc/build/changelog/changelog_10.rst
doc/build/changelog/changelog_11.rst
doc/build/changelog/changelog_12.rst
doc/build/changelog/index.rst
doc/build/changelog/migration_06.rst
doc/build/changelog/migration_07.rst
doc/build/changelog/migration_08.rst
doc/build/changelog/migration_10.rst
doc/build/changelog/migration_11.rst
doc/build/changelog/migration_12.rst
doc/build/core/api_basics.rst
doc/build/core/connections.rst
doc/build/core/constraints.rst
doc/build/core/custom_types.rst
doc/build/core/ddl.rst
doc/build/core/defaults.rst
doc/build/core/engines.rst
doc/build/core/event.rst
doc/build/core/events.rst
doc/build/core/interfaces.rst
doc/build/core/metadata.rst
doc/build/core/pooling.rst
doc/build/core/reflection.rst
doc/build/core/tutorial.rst
doc/build/core/type_api.rst
doc/build/dialects/index.rst
doc/build/dialects/mssql.rst
doc/build/dialects/mysql.rst
doc/build/dialects/oracle.rst
doc/build/dialects/postgresql.rst
doc/build/dialects/sqlite.rst
doc/build/dialects/sybase.rst
doc/build/faq/connections.rst
doc/build/faq/index.rst
doc/build/faq/metadata_schema.rst
doc/build/faq/ormconfiguration.rst
doc/build/faq/performance.rst
doc/build/faq/sessions.rst
doc/build/faq/sqlexpressions.rst
doc/build/orm/backref.rst
doc/build/orm/basic_relationships.rst
doc/build/orm/collections.rst
doc/build/orm/composites.rst
doc/build/orm/constructors.rst
doc/build/orm/contextual.rst
doc/build/orm/deprecated.rst
doc/build/orm/events.rst
doc/build/orm/examples.rst
doc/build/orm/extending.rst
doc/build/orm/extensions/associationproxy.rst
doc/build/orm/extensions/declarative/api.rst
doc/build/orm/extensions/declarative/basic_use.rst
doc/build/orm/extensions/declarative/mixins.rst
doc/build/orm/extensions/declarative/table_config.rst
doc/build/orm/extensions/indexable.rst
doc/build/orm/extensions/instrumentation.rst
doc/build/orm/extensions/mutable.rst
doc/build/orm/index.rst
doc/build/orm/inheritance.rst
doc/build/orm/inheritance_loading.rst
doc/build/orm/join_conditions.rst
doc/build/orm/loading_columns.rst
doc/build/orm/loading_objects.rst
doc/build/orm/loading_relationships.rst
doc/build/orm/mapped_attributes.rst
doc/build/orm/mapped_sql_expr.rst
doc/build/orm/mapping_columns.rst
doc/build/orm/nonstandard_mappings.rst
doc/build/orm/persistence_techniques.rst
doc/build/orm/query.rst
doc/build/orm/relationship_persistence.rst
doc/build/orm/self_referential.rst
doc/build/orm/session_api.rst
doc/build/orm/session_basics.rst
doc/build/orm/session_events.rst
doc/build/orm/session_state_management.rst
doc/build/orm/session_transaction.rst
doc/build/orm/tutorial.rst
doc/build/orm/versioning.rst

index b0d95d45c96dab5d930793346702195129d9e049..d2878f6d5c345a8f4153085feb896a2f2eb9ecc2 100644 (file)
@@ -1,7 +1,7 @@
 
-==============
+=============
 0.1 Changelog
-==============
+=============
 
                 
 .. changelog::
index 44b77b664934412fcf039c7b7194fc8bd1d8d0c2..ef389f63f4d0533b2117a05548bbb77bb7feaf53 100644 (file)
@@ -1,7 +1,7 @@
 
-==============
+=============
 0.2 Changelog
-==============
+=============
 
 
 .. changelog::
index 349367c38e2fc556402735ee0dd70cccbe39063c..27eda474f5cea7560ca94151548eb6f989ac46f2 100644 (file)
@@ -1,7 +1,7 @@
 
-==============
+=============
 0.3 Changelog
-==============
+=============
 
                 
 .. changelog::
index 1bd49871c1f0a22a3d347d44be193716cc44faf3..7dcfa82e1cabea9155bda5bd33f2e0877e7c7293 100644 (file)
@@ -1,7 +1,7 @@
 
-==============
+=============
 0.4 Changelog
-==============
+=============
 
                 
 .. changelog::
index 5bcfd5fdfc706a06c79b634fdfc277cd49137d43..172caaa517db9a8b130a0c2cf6611023cf0748f2 100644 (file)
@@ -1,7 +1,7 @@
 
-==============
+=============
 0.5 Changelog
-==============
+=============
 
                 
 .. changelog::
index d1c7fe5dbe4cc3f6425baba55bab7f017d7adcd7..1a3664f7de7a13bae5cafcaab4f0e01a8427565e 100644 (file)
@@ -1,7 +1,7 @@
 
-==============
+=============
 0.6 Changelog
-==============
+=============
 
                 
 .. changelog::
index a77945fc26ebefa20f3e55ffd5f0a38319f710cb..2b7654ec2e2f98f278e3d2dde8b83b998e8b101d 100644 (file)
@@ -1,7 +1,7 @@
 
-==============
+=============
 0.7 Changelog
-==============
+=============
 
 .. changelog::
     :version: 0.7.11
index 6eb58306abcb814184024ab7c22ed85ad2a4c227..548bc43e8cd2515c5652669c09e28d81b98d3498 100644 (file)
@@ -1,7 +1,7 @@
 
-==============
+=============
 0.8 Changelog
-==============
+=============
 
 .. changelog_imports::
 
index c912387cd45dff550c36526575adee036638c944..159c5acfe96cfda75cf44de2af0d6ccbc0754537 100644 (file)
@@ -1,7 +1,7 @@
 
-==============
+=============
 0.9 Changelog
-==============
+=============
 
 .. changelog_imports::
 
index b0047dd8e79e04906cd7e8bf2f3c45dc679a55c7..d282fa3a110aa8682c34c3005a5c0962abcdd1e3 100644 (file)
@@ -1,8 +1,8 @@
 
 
-==============
+=============
 1.0 Changelog
-==============
+=============
 
 .. changelog_imports::
 
index 9fba02c32062c1d12982ce77cdc08fa0d698f152..90a8bb3a500e586f200e29d89ad16718de6e0623 100644 (file)
@@ -1,8 +1,8 @@
 
 
-==============
+=============
 1.1 Changelog
-==============
+=============
 
 .. changelog_imports::
 
index 2d15358490b2366869ed2582f5eb4bcc0e28993b..9cf441f81bcd651386477079a693a8c2ed966ef7 100644 (file)
@@ -1,6 +1,6 @@
-==============
+=============
 1.2 Changelog
-==============
+=============
 
 .. changelog_imports::
 
index 787d4766abde9196bf241d7251798a7ea7bbd55a..3d3cdf3a95496688d0d71e73c59d7342b38e97d2 100644 (file)
@@ -7,7 +7,7 @@ SQLAlchemy changelogs and migration guides are now integrated
 within the main documentation.
 
 Current Migration Guide
-------------------------
+-----------------------
 
 .. toctree::
    :titlesonly:
index c3d0df1f3520334da0e809071be7e595d3d66436..54a553623e100a7e18b2e54d40d7c6de392376d4 100644 (file)
@@ -1,6 +1,6 @@
-==============================
+=============================
 What's New in SQLAlchemy 0.6?
-==============================
+=============================
 
 .. admonition:: About this Document
 
index 9c4ba3f816fbcbb126e5354ebdbc19ad4c9b2049..589970c3818c9a1baa672c87920a2ae0767a3414 100644 (file)
@@ -1,6 +1,6 @@
-==============================
+=============================
 What's New in SQLAlchemy 0.7?
-==============================
+=============================
 
 .. admonition:: About this Document
 
index 19faafa89c1c1a0d92fd353b60bbdef31a5eadde..64ef46c263e85c321c39c66ed3a460575996074f 100644 (file)
@@ -1,6 +1,6 @@
-==============================
+=============================
 What's New in SQLAlchemy 0.8?
-==============================
+=============================
 
 .. admonition:: About this Document
 
@@ -527,7 +527,7 @@ the :class:`.Table` to which ``User`` is mapped.
 :ticket:`2245`
 
 Query.update() supports UPDATE..FROM
--------------------------------------
+------------------------------------
 
 The new UPDATE..FROM mechanics work in query.update().
 Below, we emit an UPDATE against ``SomeEntity``, adding
@@ -576,7 +576,7 @@ that were not flushed in the current transaction.
 :ticket:`2452`
 
 Caching Example now uses dogpile.cache
----------------------------------------
+--------------------------------------
 
 The caching example now uses `dogpile.cache <https://dogpilecache.readthedocs.io/>`_.
 Dogpile.cache is a rewrite of the caching portion
@@ -607,7 +607,7 @@ this change is needed as illustrated in the Beaker example::
 :ticket:`2589`
 
 New Core Features
-==================
+=================
 
 Fully extensible, type-level operator support in Core
 -----------------------------------------------------
@@ -686,7 +686,7 @@ as more string, integer and date operators.
 .. _feature_2623:
 
 Multiple-VALUES support for Insert
------------------------------------
+----------------------------------
 
 The :meth:`.Insert.values` method now supports a list of dictionaries,
 which will render a multi-VALUES statement such as
@@ -708,7 +708,7 @@ remains unchanged::
 :ticket:`2623`
 
 Type Expressions
------------------
+----------------
 
 SQL expressions can now be associated with types.  Historically,
 :class:`.TypeEngine` has always allowed Python-side functions which
@@ -753,7 +753,7 @@ to embed PostGIS expressions inline in SQL based on type rules.
 :ticket:`1534`
 
 Core Inspection System
------------------------
+----------------------
 
 The :func:`.inspect` function introduced in :ref:`feature_orminspection_08`
 also applies to the core.  Applied to an :class:`.Engine` it produces
@@ -1241,7 +1241,7 @@ the previous behavior.
 :ticket:`2664`
 
 Repaired the Event Targeting of :class:`.InstrumentationEvents`
-----------------------------------------------------------------
+---------------------------------------------------------------
 
 The :class:`.InstrumentationEvents` series of event targets have
 documented that the events will only be fired off according to
index 3056f6b62c7235006573489e063cb55139ff8bc4..175d962343184c6a3f001b5bcc6dc4ae8574d13d 100644 (file)
@@ -1,6 +1,6 @@
-==============================
+=============================
 What's New in SQLAlchemy 1.0?
-==============================
+=============================
 
 .. admonition:: About this Document
 
@@ -41,7 +41,7 @@ to proceed at speeds that rival direct use of the Core.
 :ticket:`3100`
 
 New Performance Example Suite
-------------------------------
+-----------------------------
 
 Inspired by the benchmarking done for the :ref:`bulk_operations` feature
 as well as for the :ref:`faq_how_to_profile` section of the FAQ, a new
@@ -94,7 +94,7 @@ once, a query as a pre-compiled unit begins to be feasible::
 .. _feature_3150:
 
 Improvements to declarative mixins, ``@declared_attr`` and related features
-----------------------------------------------------------------------------
+---------------------------------------------------------------------------
 
 The declarative system in conjunction with :class:`.declared_attr` has been
 overhauled to support new capabilities.
@@ -322,7 +322,7 @@ object totally smokes both namedtuple and KeyedTuple::
 .. _feature_slots:
 
 Significant Improvements in Structural Memory Use
---------------------------------------------------
+-------------------------------------------------
 
 Structural memory use has been improved via much more significant use
 of ``__slots__`` for many internal objects.  This optimization is
@@ -353,7 +353,7 @@ well as weakrefs, within a basic import of "nova.db.sqlalchemy.models"::
 .. _feature_updatemany:
 
 UPDATE statements are now batched with executemany() in a flush
-----------------------------------------------------------------
+---------------------------------------------------------------
 
 UPDATE statements can now be batched within an ORM flush
 into more performant executemany() call, similarly to how INSERT
@@ -418,7 +418,7 @@ of inheritance-oriented scenarios, including:
 .. _bug_3227:
 
 Session.get_bind() will receive the Mapper in all relevant Query cases
------------------------------------------------------------------------
+----------------------------------------------------------------------
 
 A series of issues were repaired where the :meth:`.Session.get_bind`
 would not receive the primary :class:`.Mapper` of the :class:`.Query`,
@@ -501,7 +501,7 @@ as remaining ORM constructs such as :func:`.orm.synonym`.
 .. _bug_3188:
 
 ColumnProperty constructs work a lot better with aliases, order_by
--------------------------------------------------------------------
+------------------------------------------------------------------
 
 A variety of issues regarding :func:`.column_property` have been fixed,
 most specifically with regards to the :func:`.aliased` construct as well
@@ -583,7 +583,7 @@ New Features and Improvements - Core
 .. _feature_3034:
 
 Select/Query LIMIT / OFFSET may be specified as an arbitrary SQL expression
-----------------------------------------------------------------------------
+---------------------------------------------------------------------------
 
 The :meth:`.Select.limit` and :meth:`.Select.offset` methods now accept
 any SQL expression, in addition to integer values, as arguments.  The ORM
@@ -826,7 +826,7 @@ the :class:`.Constraint` is constructed::
 .. _feature_insert_from_select_defaults:
 
 INSERT FROM SELECT now includes Python and SQL-expression defaults
--------------------------------------------------------------------
+------------------------------------------------------------------
 
 :meth:`.Insert.from_select` now includes Python and SQL-expression defaults if
 otherwise unspecified; the limitation where non-server column defaults
@@ -1354,7 +1354,7 @@ joined loader options can still be used::
 .. _bug_3233:
 
 Changes and fixes in handling of duplicate join targets
---------------------------------------------------------
+-------------------------------------------------------
 
 Changes here encompass bugs where an unexpected and inconsistent
 behavior would occur in some scenarios when joining to an entity
@@ -2155,7 +2155,7 @@ state.
 .. _feature_3084:
 
 MetaData.sorted_tables accessor is "deterministic"
------------------------------------------------------
+--------------------------------------------------
 
 The sorting of tables resulting from the :attr:`.MetaData.sorted_tables`
 accessor is "deterministic"; the ordering should be the same in all cases
@@ -2264,7 +2264,7 @@ flag::
 :ticket:`3319`
 
 New PostgreSQL Table options
------------------------------
+----------------------------
 
 Added support for PG table options TABLESPACE, ON COMMIT,
 WITH(OUT) OIDS, and INHERITS, when rendering DDL via
@@ -2398,14 +2398,14 @@ by PostgreSQL as of 9.4.  SQLAlchemy allows this using
     :class:`.FunctionFilter`
 
 PG8000 dialect supports client side encoding
----------------------------------------------
+--------------------------------------------
 
 The :paramref:`.create_engine.encoding` parameter is now honored
 by the pg8000 dialect, using on connect handler which
 emits ``SET CLIENT_ENCODING`` matching the selected encoding.
 
 PG8000 native JSONB support
---------------------------------------
+---------------------------
 
 Support for PG8000 versions greater than 1.10.1 has been added, where
 JSONB is supported natively.
@@ -2421,12 +2421,12 @@ Support for the pypy psycopg2cffi dialect is added.
     :mod:`sqlalchemy.dialects.postgresql.psycopg2cffi`
 
 Dialect Improvements and Changes - MySQL
-=============================================
+========================================
 
 .. _change_3155:
 
 MySQL TIMESTAMP Type now renders NULL / NOT NULL in all cases
---------------------------------------------------------------
+-------------------------------------------------------------
 
 The MySQL dialect has always worked around MySQL's implicit NOT NULL
 default associated with TIMESTAMP columns by emitting NULL for
@@ -2449,7 +2449,7 @@ columns.
 .. _change_3283:
 
 MySQL SET Type Overhauled to support empty sets, unicode, blank value handling
--------------------------------------------------------------------------------
+------------------------------------------------------------------------------
 
 The :class:`.mysql.SET` type historically not included a system of handling
 blank sets and empty values separately; as different drivers had different
@@ -2582,7 +2582,7 @@ and is generally in decent working order, if someone wants to pick up
 on polishing it.
 
 Dialect Improvements and Changes - SQLite
-=============================================
+=========================================
 
 SQLite named and unnamed UNIQUE and FOREIGN KEY constraints will inspect and reflect
 -------------------------------------------------------------------------------------
@@ -2632,7 +2632,7 @@ to control the behavior completely, based on deprecation guidelines from
 Microsoft.  See :ref:`mssql_large_type_deprecation` for details.
 
 Dialect Improvements and Changes - Oracle
-=============================================
+=========================================
 
 .. _change_3220:
 
@@ -2653,7 +2653,7 @@ CTE support has been fixed up for Oracle, and there is also a new feature
 :ticket:`3220`
 
 New Oracle Keywords for DDL
------------------------------
+---------------------------
 
 Keywords such as COMPRESS, ON COMMIT, BITMAP:
 
index b3f8cb1055cea952d3dc674d5972804de05e4499..c790e4641165c322314f3bf85526b59cba67ca32 100644 (file)
@@ -1,6 +1,6 @@
-==============================
+=============================
 What's New in SQLAlchemy 1.1?
-==============================
+=============================
 
 .. admonition:: About this Document
 
@@ -32,7 +32,7 @@ as things like "extras", ``setup.py`` now depends on Setuptools fully.
 
 .. seealso::
 
-       :ref:`installation`
+    :ref:`installation`
 
 :ticket:`3489`
 
@@ -47,7 +47,7 @@ as it relies on deprecated features of setuptools.
 
 .. seealso::
 
-       :ref:`c_extensions`
+    :ref:`c_extensions`
 
 :ticket:`3500`
 
@@ -625,7 +625,7 @@ for an attribute being replaced.
 .. _change_3749:
 
 Same-named relationships on inheriting mappers no longer warn
---------------------------------------------------------------
+-------------------------------------------------------------
 
 When creating two mappers in an inheritance scenario, placing a relationship
 on both with the same name would emit the warning
@@ -1220,7 +1220,7 @@ RANGE and ROWS expressions for window functions::
 .. _change_2857:
 
 Support for the SQL LATERAL keyword
-------------------------------------
+-----------------------------------
 
 The LATERAL keyword is currently known to only be supported by PostgreSQL 9.3
 and greater, however as it is part of the SQL standard support for this keyword
@@ -1378,7 +1378,7 @@ will not have much impact on the behavior of the column during an INSERT.
 .. _change_is_distinct_from:
 
 Support for IS DISTINCT FROM and IS NOT DISTINCT FROM
-------------------------------------------------------
+-----------------------------------------------------
 
 New operators :meth:`.ColumnOperators.is_distinct_from` and
 :meth:`.ColumnOperators.isnot_distinct_from` allow the IS DISTINCT
@@ -1533,7 +1533,7 @@ used for the fetch.
 .. _change_3292:
 
 Support for Python's native ``enum`` type and compatible forms
----------------------------------------------------------------
+--------------------------------------------------------------
 
 The :class:`.Enum` type can now be constructed using any
 PEP-435 compliant enumerated type.   When using this mode, input values
@@ -1562,7 +1562,7 @@ string/integer/etc values::
     assert e.scalar(t.select()) is MyEnum.two
 
 The ``Enum.enums`` collection is now a list instead of a tuple
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 As part of the changes to :class:`.Enum`, the :attr:`.Enum.enums` collection
 of elements is now a list instead of a tuple.  This because lists
@@ -2444,7 +2444,7 @@ in order to have an array value present in a composed ORM row.
 .. _change_3503:
 
 Correct SQL Types are Established from Indexed Access of ARRAY, JSON, HSTORE
------------------------------------------------------------------------------
+----------------------------------------------------------------------------
 
 For all three of :class:`~.postgresql.ARRAY`, :class:`~.postgresql.JSON` and :class:`.HSTORE`,
 the SQL type assigned to the expression returned by indexed access, e.g.
@@ -2495,7 +2495,7 @@ This includes:
 .. _change_3503_cast:
 
 The JSON cast() operation now requires ``.astext`` is called explicitly
-------------------------------------------------------------------------
+-----------------------------------------------------------------------
 
 As part of the changes in :ref:`change_3503`, the workings of the
 :meth:`.ColumnElement.cast` operator on :class:`.postgresql.JSON` and
@@ -2596,7 +2596,7 @@ The `PyGreSQL <https://pypi.python.org/pypi/PyGreSQL>`_ DBAPI is now supported.
     :ref:`dialect-postgresql-pygresql`
 
 The "postgres" module is removed
----------------------------------
+--------------------------------
 
 The ``sqlalchemy.dialects.postgres`` module, long deprecated, is
 removed; this has emitted a warning for many years and projects
@@ -2625,7 +2625,7 @@ or "SELECT...FOR SHARE" query on the PostgreSQL backend:
     stmt = select([table]).with_for_update(read=True, key_share=True)
 
 Dialect Improvements and Changes - MySQL
-=============================================
+========================================
 
 .. _change_3547:
 
@@ -2732,7 +2732,7 @@ directives are no longer needed::
 
 
 Dialect Improvements and Changes - SQLite
-=============================================
+=========================================
 
 .. _change_3634:
 
@@ -2797,7 +2797,7 @@ given schema in the results.  Cross-schema foreign keys aren't supported.
 .. _change_3629:
 
 Reflection of the name of PRIMARY KEY constraints
---------------------------------------------------
+-------------------------------------------------
 
 The SQLite backend now takes advantage of the "sqlite_master" view
 of SQLite in order to extract the name of the primary key constraint
@@ -2932,7 +2932,7 @@ on this behavior, set the flag back to True.
 :ticket:`3434`
 
 Dialect Improvements and Changes - Oracle
-=============================================
+=========================================
 
 Support for SKIP LOCKED
 -----------------------
index a46311f62bd4b2f98e84a7323ebc987ff46eaee9..d321af871d80b516a6586189e9aaa4a0e3dcc337 100644 (file)
@@ -1,6 +1,6 @@
-==============================
+=============================
 What's New in SQLAlchemy 1.2?
-==============================
+=============================
 
 .. admonition:: About this Document
 
@@ -516,7 +516,7 @@ Key Behavioral Changes - ORM
 .. _change_3740:
 
 Percent signs in literal_column() now conditionally escaped
-------------------------------------------------------------
+-----------------------------------------------------------
 
 The :obj:`.literal_column` construct now escapes percent sign characters
 conditionally, based on whether or not the DBAPI in use makes use of a
@@ -848,13 +848,13 @@ itself will also be present::
 :ticket:`3959`
 
 Dialect Improvements and Changes - MySQL
-=============================================
+========================================
 
 Dialect Improvements and Changes - SQLite
-=============================================
+=========================================
 
 Dialect Improvements and Changes - Oracle
-=============================================
+=========================================
 
 .. _change_3276:
 
@@ -896,7 +896,7 @@ Dialect Improvements and Changes - SQL Server
 .. _change_2626:
 
 SQL Server schema names with embedded dots supported
------------------------------------------------------
+----------------------------------------------------
 
 The SQL Server dialect has a behavior such that a schema name with a dot inside
 of it is assumed to be a "database"."owner" identifier pair, which is
index e56a1117b3a9e69d9e1acaf4b704fa64d2469df2..a7b6e2edec1706df4c3183899ea5aef169b0a16f 100644 (file)
@@ -1,6 +1,6 @@
-=================
+===============
 Core API Basics
-=================
+===============
 
 .. toctree::
     :maxdepth: 2
index 5cdc5a3ddcc68da9ef6f07a817c40d978f2c097b..29e884396eeb85fd49caa811358c1a6d3cfd79ce 100644 (file)
@@ -1,8 +1,8 @@
 .. _connections_toplevel:
 
-=====================================
+====================================
 Working with Engines and Connections
-=====================================
+====================================
 
 .. module:: sqlalchemy.engine
 
@@ -148,7 +148,7 @@ is available as well::
 .. _connections_nested_transactions:
 
 Nesting of Transaction Blocks
-------------------------------
+-----------------------------
 
 The :class:`.Transaction` object also handles "nested"
 behavior by keeping track of the outermost begin/commit pair. In this example,
@@ -241,7 +241,7 @@ it so that a SELECT statement will issue a COMMIT::
 .. _dbengine_implicit:
 
 Connectionless Execution, Implicit Execution
-=============================================
+============================================
 
 Recall from the first section we mentioned executing with and without explicit
 usage of :class:`.Connection`. "Connectionless" execution
index 88d003678601018d57f9b177653b3a4a97d1ac07..ab9eae41f3093dd6d9c298914534d5fdcf2c50d0 100644 (file)
@@ -3,9 +3,9 @@
 
 .. module:: sqlalchemy.schema
 
-=================================
+================================
 Defining Constraints and Indexes
-=================================
+================================
 
 This section will discuss SQL :term:`constraints` and indexes.  In SQLAlchemy
 the key classes include :class:`.ForeignKeyConstraint` and :class:`.Index`.
@@ -391,7 +391,7 @@ option of being configured directly::
     :class:`.PrimaryKeyConstraint` - detailed API documentation.
 
 Setting up Constraints when using the Declarative ORM Extension
-----------------------------------------------------------------
+---------------------------------------------------------------
 
 The :class:`.Table` is the SQLAlchemy Core construct that allows one to define
 table metadata, which among other things can be used by the SQLAlchemy ORM
@@ -568,7 +568,7 @@ name as follows::
 .. _naming_check_constraints:
 
 Naming CHECK Constraints
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~
 
 The :class:`.CheckConstraint` object is configured against an arbitrary
 SQL expression, which can have any number of columns present, and additionally
@@ -640,7 +640,7 @@ structure of the expression will determine which column is noted as
 .. _naming_schematypes:
 
 Configuring Naming for Boolean, Enum, and other schema types
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 The :class:`.SchemaType` class refers to type objects such as :class:`.Boolean`
 and :class:`.Enum` which generate a CHECK constraint accompanying the type.
@@ -828,7 +828,7 @@ The :class:`~sqlalchemy.schema.Index` object also supports its own ``create()``
 .. _schema_indexes_functional:
 
 Functional Indexes
-~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~
 
 :class:`.Index` supports SQL and function expressions, as supported by the
 target backend.  To create an index against a column using a descending
index f47640c92707238e885d4200f0be3560e19f49ed..64f91b23fcc036bee762bcbb4f5b687c401ee282 100644 (file)
@@ -166,7 +166,7 @@ binary in CHAR(16) if desired::
                 return uuid.UUID(value)
 
 Marshal JSON Strings
-^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^
 
 This type uses ``simplejson`` to marshal Python data structures
 to/from JSON.   Can be modified to use Python's builtin json encoder::
index 76692226e3b9bc58cc907fa20e0dc7a467d82dc7..db0905d72620e147a861baed7870ce69a287ff06 100644 (file)
@@ -132,7 +132,7 @@ first looking within the PostgreSQL catalogs to see if it exists:
     DROP TABLE users{stop}
 
 Using the built-in DDLElement Classes
---------------------------------------
+-------------------------------------
 
 The ``sqlalchemy.schema`` package contains SQL expression constructs that
 provide DDL expressions. For example, to produce a ``CREATE TABLE`` statement:
index bb6699cc62b21ebc3cc9c3c250bea68e023f732f..f6cf4f4b3a34aef51ff879a66737cc0ac862b029 100644 (file)
@@ -5,7 +5,7 @@
 .. _metadata_defaults:
 
 Column Insert/Update Defaults
-==============================
+=============================
 
 SQLAlchemy provides a very rich featureset regarding column level events which
 take place during INSERT and UPDATE statements. Options include:
@@ -227,7 +227,7 @@ the database side normally.
 .. _triggered_columns:
 
 Triggered Columns
-------------------
+-----------------
 
 Columns with values set by a database trigger or other external process may be
 called out using :class:`.FetchedValue` as a marker::
@@ -273,7 +273,7 @@ rows should be performed after an insert or update.
 
 
 Defining Sequences
--------------------
+------------------
 
 SQLAlchemy represents database sequences using the
 :class:`~sqlalchemy.schema.Sequence` object, which is considered to be a
index f429ba561fec6da1f050a1cfdf2f6970c046f57b..dc5a8c996bc9a0867c3812938d9a86718f2022f1 100644 (file)
@@ -42,7 +42,7 @@ applications.
 .. _supported_dbapis:
 
 Supported Databases
-====================
+===================
 
 SQLAlchemy includes many :class:`.Dialect` implementations for various
 backends.   Dialects for the most common databases are included with SQLAlchemy; a handful
@@ -212,7 +212,7 @@ For more information on connection pooling, see :ref:`pooling_toplevel`.
 .. _custom_dbapi_args:
 
 Custom DBAPI connect() arguments
-=================================
+================================
 
 Custom arguments used when issuing the ``connect()`` call to the underlying
 DBAPI may be issued in three distinct ways. String-based arguments can be
@@ -246,7 +246,7 @@ argument, which specifies a callable that returns a DBAPI connection:
 .. _dbengine_logging:
 
 Configuring Logging
-====================
+===================
 
 Python's standard `logging
 <http://docs.python.org/library/logging.html>`_ module is used to
index edc16e60351273024f22525f479f3030160d0e29..018a46cd7df196bf18f82b3917646e1301cca753 100644 (file)
@@ -117,7 +117,7 @@ and objects::
     listen(my_engine, 'connect', my_on_connect)
 
 Modifiers
-----------
+---------
 
 Some listeners allow modifiers to be passed to :func:`.listen`.  These
 modifiers sometimes provide alternate calling signatures for
@@ -136,7 +136,7 @@ this value can be supported::
     listen(UserContact.phone, 'set', validate_phone, retval=True)
 
 Event Reference
-----------------
+---------------
 
 Both SQLAlchemy Core and SQLAlchemy ORM feature a wide variety of event hooks:
 
index 451cb9460c50bd041c598ae31fe3157e61b634de..1dc56b053b063b5527c2bbc295222e05e8645fd8 100644 (file)
@@ -1,7 +1,7 @@
 .. _core_event_toplevel:
 
 Core Events
-============
+===========
 
 This section describes the event interfaces provided in
 SQLAlchemy Core.
@@ -12,13 +12,13 @@ ORM events are described in :ref:`orm_event_toplevel`.
    :members:
 
 Connection Pool Events
------------------------
+----------------------
 
 .. autoclass:: sqlalchemy.events.PoolEvents
    :members:
 
 SQL Execution and Connection Events
-------------------------------------
+-----------------------------------
 
 .. autoclass:: sqlalchemy.events.ConnectionEvents
     :members:
@@ -27,7 +27,7 @@ SQL Execution and Connection Events
     :members:
 
 Schema Events
------------------------
+-------------
 
 .. autoclass:: sqlalchemy.events.DDLEvents
     :members:
index 7e76127f4de0e098ce6940f2482b4ada80f89f40..706db625ee15dab94d8b4bd49c7d609807ccf8cb 100644 (file)
@@ -1,7 +1,7 @@
 .. _dep_interfaces_core_toplevel:
 
 Deprecated Event Interfaces
-============================
+===========================
 
 .. module:: sqlalchemy.interfaces
 
index 1e762b188e2d8ada531f299e8cf1059b99fc273b..21f1014545ab05f546e501e65e5d0bd878aa7620 100644 (file)
@@ -256,7 +256,7 @@ There are two major migration tools available for SQLAlchemy:
 
 
 Specifying the Schema Name
----------------------------
+--------------------------
 
 Some databases support the concept of multiple schemas. A
 :class:`~sqlalchemy.schema.Table` can reference this by specifying the
index 086b544dbb3faa9b897fc59ba3ec843d0e203a30..257cd44203102816b1389e9ece63eb2a2d17feba 100644 (file)
@@ -102,7 +102,7 @@ a last resort for when a DBAPI has some form of ``connect``
 that is not at all supported by SQLAlchemy.
 
 Constructing a Pool
-------------------------
+-------------------
 
 To use a :class:`.Pool` by itself, the ``creator`` function is
 the only argument that's required and is passed first, followed
@@ -286,7 +286,7 @@ a new DBAPI connection.
 
 
 Disconnect Handling - Optimistic
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 When pessimistic handling is not employed, as well as when the database is
 shutdown and/or restarted in the middle of a connection's period of use within
@@ -335,7 +335,7 @@ database restarts are not anticipated.
 .. _pool_setting_recycle:
 
 Setting Pool Recycle
-~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~
 
 An additional setting that can augment the "optimistic" approach is to set the
 pool recycle parameter.   This parameter prevents the pool from using a particular
@@ -456,7 +456,7 @@ coercing the pool to recycle the connection record to make a new connection.
 
 
 API Documentation - Available Pool Implementations
----------------------------------------------------
+--------------------------------------------------
 
 .. autoclass:: sqlalchemy.pool.Pool
 
index ca1e3bf20c9c362a7fdb060a8f99b6d7795bebf9..139f4df7ee7505134cc0ef28ad185f5f90c3fb44 100644 (file)
@@ -55,7 +55,7 @@ hasn't already been loaded; once loaded, new calls to
 reflection queries.
 
 Overriding Reflected Columns
------------------------------
+----------------------------
 
 Individual columns can be overridden with explicit values when reflecting
 tables; this is handy for specifying custom datatypes, constraints such as
@@ -67,7 +67,7 @@ primary keys that may not be configured within the database, etc.::
     ... autoload=True)
 
 Reflecting Views
------------------
+----------------
 
 The reflection system can also reflect views. Basic usage is the same as that
 of a table::
index f368c723791e48fb49982fb468e64a6fa5ba7aff..634abbfc527d3090c888ce54307b8131c67b863e 100644 (file)
@@ -100,7 +100,7 @@ database, which is then used to emit the SQL.
     connecting to several kinds of databases with links to more information.
 
 Define and Create Tables
-=========================
+========================
 
 The SQL Expression Language constructs its expressions in most cases against
 table columns. In SQLAlchemy, a column is most often represented by an object
@@ -244,7 +244,7 @@ compiled form of the statement::
     {'fullname': 'Jack Jones', 'name': 'jack'}
 
 Executing
-==========
+=========
 
 The interesting part of an :class:`~sqlalchemy.sql.expression.Insert` is
 executing it. In this tutorial, we will generally focus on the most explicit
@@ -311,7 +311,7 @@ function, to using ``INSERT..RETURNING`` syntax; this all occurs transparently.
 .. _execute_multiple:
 
 Executing Multiple Statements
-==============================
+=============================
 
 Our insert example above was intentionally a little drawn out to show some
 various behaviors of expression language constructs. In the usual case, an
@@ -372,7 +372,7 @@ The "executemany" style of invocation is available for each of the
 .. _coretutorial_selecting:
 
 Selecting
-==========
+=========
 
 We began with inserts just so that our test database had some data in it. The
 more interesting part of the data is selecting it! We'll cover UPDATE and
@@ -542,7 +542,7 @@ are working with is ultimately the same type of object. SQLAlchemy terms the
 base class of all of these expressions as :class:`~.expression.ColumnElement`.
 
 Operators
-==========
+=========
 
 Since we've stumbled upon SQLAlchemy's operator paradigm, let's go through
 some of its capabilities. We've seen how to equate two columns to each other:
@@ -631,7 +631,7 @@ This function can also be used to make bitwise operators explicit. For example::
 is a bitwise AND of the value in `somecolumn`.
 
 Operator Customization
------------------------
+----------------------
 
 While :meth:`.ColumnOperators.op` is handy to get at a custom operator in a hurry,
 the Core supports fundamental customization and extension of the operator system at
@@ -643,7 +643,7 @@ for a description.
 
 
 Conjunctions
-=============
+============
 
 
 We'd like to show off some of our operators inside of :func:`.select`
@@ -794,7 +794,7 @@ parameters, we passed them into the :meth:`~.Connection.execute` method
 as additional arguments.
 
 Specifying Bound Parameter Behaviors
-------------------------------------------
+------------------------------------
 
 The :func:`~.expression.text` construct supports pre-established bound values
 using the :meth:`.TextClause.bindparams` method::
@@ -817,7 +817,7 @@ or special SQL-side processing provided by the datatype.
 .. _sqlexpression_text_columns:
 
 Specifying Result-Column Behaviors
-----------------------------------------------
+----------------------------------
 
 We may also specify information about the result columns using the
 :meth:`.TextClause.columns` method; this method can be used to specify
@@ -1067,7 +1067,7 @@ by a column name that appears more than once:
 
 
 Using Aliases
-==============
+=============
 
 The alias in SQL corresponds to a "renamed" version of a table or SELECT
 statement, which occurs anytime you say "SELECT .. FROM sometable AS
@@ -1145,7 +1145,7 @@ to "correlate" the inner ``users`` table with the outer one:
     {stop}[(u'jack',)]
 
 Using Joins
-============
+===========
 
 We're halfway along to being able to construct any SELECT expression. The next
 cornerstone of the SELECT is the JOIN expression. We've already been doing
@@ -1231,7 +1231,7 @@ Oracle DBAs don't want their black magic being found out ;).
     :class:`.Join`
 
 Everything Else
-================
+===============
 
 The concepts of creating SQL expressions have been introduced. What's left are
 more variants of the same themes. So now we'll catalog the rest of the
@@ -1412,7 +1412,7 @@ of our selectable:
 .. _window_functions:
 
 Window Functions
------------------
+----------------
 
 Any :class:`.FunctionElement`, including functions generated by
 :data:`~.expression.func`, can be turned into a "window function", that is an
@@ -2046,7 +2046,7 @@ by the database if this syntax is not supported.
 .. _updates_order_parameters:
 
 Parameter-Ordered Updates
---------------------------
+-------------------------
 
 The default behavior of the :func:`.update` construct when rendering the SET
 clauses is to render them using the column ordering given in the
@@ -2131,7 +2131,7 @@ The value is available as :attr:`~.ResultProxy.rowcount`:
     1
 
 Further Reference
-==================
+=================
 
 Expression Language Reference: :ref:`expression_api_toplevel`
 
index 7f0b68b64b58acea5d397d936a097ca0138ca471..f165df5a2668259c0075b269d9f2131dc215b764 100644 (file)
@@ -3,7 +3,7 @@
 .. _types_api:
 
 Base Type API
---------------
+-------------
 
 .. autoclass:: TypeEngine
    :members:
index c5d239b67fa160bf81eb0cf06ee1a67dc46fe2be..b120d83eb15277ffaebba2f655bb5795f50f71d1 100644 (file)
@@ -59,7 +59,7 @@ Production Ready
   on top of `pythone-tds <https://github.com/denisenkom/pytds>`_.
 
 Experimental / Incomplete
-^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Dialects that are in an incomplete state or are considered somewhat experimental.
 
index 6173ffba190b9ba7aa8ab075d2eb046890268bb3..490ecaccf55007786f61066380c5e21a1b48a6e0 100644 (file)
@@ -6,7 +6,7 @@ Microsoft SQL Server
 .. automodule:: sqlalchemy.dialects.mssql.base
 
 SQL Server Data Types
------------------------
+---------------------
 
 As with all SQLAlchemy dialects, all UPPERCASE types that are known to be
 valid with SQL server are importable from the top level dialect, whether
@@ -110,7 +110,7 @@ pymssql
 .. automodule:: sqlalchemy.dialects.mssql.pymssql
 
 zxjdbc
---------------
+------
 
 .. automodule:: sqlalchemy.dialects.mssql.zxjdbc
 
index 100f2d2e343bec3e7a9c0e79fa37f321b467d054..ebfc8a31ccbcba48cfb8d82b7040238ce3e21797 100644 (file)
@@ -6,7 +6,7 @@ MySQL
 .. automodule:: sqlalchemy.dialects.mysql.base
 
 MySQL Data Types
-------------------
+----------------
 
 As with all SQLAlchemy dialects, all UPPERCASE types that are known to be
 valid with MySQL are importable from the top level dialect::
@@ -158,32 +158,32 @@ construction arguments, are as follows:
 
 
 MySQL-Python
---------------------
+------------
 
 .. automodule:: sqlalchemy.dialects.mysql.mysqldb
 
 pymysql
--------------
+-------
 
 .. automodule:: sqlalchemy.dialects.mysql.pymysql
 
 MySQL-Connector
-----------------------
+---------------
 
 .. automodule:: sqlalchemy.dialects.mysql.mysqlconnector
 
 cymysql
-------------
+-------
 
 .. automodule:: sqlalchemy.dialects.mysql.cymysql
 
 OurSQL
---------------
+------
 
 .. automodule:: sqlalchemy.dialects.mysql.oursql
 
 Google App Engine
------------------------
+-----------------
 
 .. automodule:: sqlalchemy.dialects.mysql.gaerdbms
 
@@ -193,6 +193,6 @@ pyodbc
 .. automodule:: sqlalchemy.dialects.mysql.pyodbc
 
 zxjdbc
---------------
+------
 
 .. automodule:: sqlalchemy.dialects.mysql.zxjdbc
index 4b4de3d4c60321bb7a3c935077fd235c91c63833..f8e9f891ae543b7dee129ad103b5d32927fe8524 100644 (file)
@@ -6,7 +6,7 @@ Oracle
 .. automodule:: sqlalchemy.dialects.oracle.base
 
 Oracle Data Types
--------------------
+-----------------
 
 As with all SQLAlchemy dialects, all UPPERCASE types that are known to be
 valid with Oracle are importable from the top level dialect, whether
@@ -54,11 +54,11 @@ construction arguments, are as follows:
 
 
 cx_Oracle
-----------
+---------
 
 .. automodule:: sqlalchemy.dialects.oracle.cx_oracle
 
 zxjdbc
--------
+------
 
 .. automodule:: sqlalchemy.dialects.oracle.zxjdbc
index 38b2e47411e6f2346c4b5c6f9629c0bddda41a66..03511b0474699931f987f5847753803a9441c049 100644 (file)
@@ -6,7 +6,7 @@ PostgreSQL
 .. automodule:: sqlalchemy.dialects.postgresql.base
 
 PostgreSQL Data Types
-------------------------
+---------------------
 
 As with all SQLAlchemy dialects, all UPPERCASE types that are known to be
 valid with PostgreSQL are importable from the top level dialect, whether
@@ -182,7 +182,7 @@ For example::
       )
 
 PostgreSQL DML Constructs
----------------------------
+-------------------------
 
 .. autofunction:: sqlalchemy.dialects.postgresql.dml.insert
 
index 93a54ee8d7b6e556eed02d4b1cb9a0079dcfe56e..936ae253f17fee9b483d3cc461db88ea24d8b046 100644 (file)
@@ -6,7 +6,7 @@ SQLite
 .. automodule:: sqlalchemy.dialects.sqlite.base
 
 SQLite Data Types
-------------------------
+-----------------
 
 As with all SQLAlchemy dialects, all UPPERCASE types that are known to be
 valid with SQLite are importable from the top level dialect, whether
index 8e9695325a3c102dd0a9009a25ce9a776de4d41b..835e295fcfc19ea3214f20f6bd93132999a6017a 100644 (file)
@@ -6,17 +6,17 @@ Sybase
 .. automodule:: sqlalchemy.dialects.sybase.base
 
 python-sybase
--------------------
+-------------
 
 .. automodule:: sqlalchemy.dialects.sybase.pysybase
 
 pyodbc
-------------
+------
 
 .. automodule:: sqlalchemy.dialects.sybase.pyodbc
 
 mxodbc
-------------
+------
 
 .. automodule:: sqlalchemy.dialects.sybase.mxodbc
 
index 7e763d288cc5e4961ccfee5d54d9fd04fb602f89..d2e33f3c57248e04fac061b5d9e5acf930291be8 100644 (file)
@@ -22,7 +22,7 @@ refers to a :class:`.QueuePool` as a source of connectivity.
 For more detail, see :ref:`engines_toplevel` and :ref:`pooling_toplevel`.
 
 How do I pass custom connect arguments to my database API?
------------------------------------------------------------
+----------------------------------------------------------
 
 The :func:`.create_engine` call accepts additional arguments either
 directly via the ``connect_args`` keyword argument::
@@ -56,7 +56,7 @@ on how :class:`.Session` should be used in a multithreaded environment,
 see :ref:`session_faq_threadsafe`.
 
 Why does SQLAlchemy issue so many ROLLBACKs?
----------------------------------------------
+--------------------------------------------
 
 SQLAlchemy currently assumes DBAPI connections are in "non-autocommit" mode -
 this is the default behavior of the Python database API, meaning it
@@ -74,7 +74,7 @@ isolation. For background on why you might see stale data even on MySQL, see
 http://dev.mysql.com/doc/refman/5.1/en/innodb-transaction-model.html
 
 I'm on MyISAM - how do I turn it off?
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 The behavior of the connection pool's connection return behavior can be
 configured using ``reset_on_return``::
@@ -85,7 +85,7 @@ configured using ``reset_on_return``::
     engine = create_engine('mysql://scott:tiger@localhost/myisam_database', pool=QueuePool(reset_on_return=False))
 
 I'm on SQL Server - how do I turn those ROLLBACKs into COMMITs?
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 ``reset_on_return`` accepts the values ``commit``, ``rollback`` in addition
 to ``True``, ``False``, and ``None``.   Setting to ``commit`` will cause
index 120e0ba3a2d9e6df22f400f9263d25fa5e2dd29f..5961226ce4f3072896e2ac12fd4d46bf1f1c5bc7 100644 (file)
@@ -1,8 +1,8 @@
 .. _faq_toplevel:
 
-============================
+==========================
 Frequently Asked Questions
-============================
+==========================
 
 The Frequently Asked Questions section is a growing collection of commonly
 observed questions to well-known issues.
index 7e4a5572023741f8383c759c885821a56c1ac457..822076854682ee81c5bec5ba2d3408f5115c5471 100644 (file)
@@ -1,6 +1,6 @@
-==================
+=================
 MetaData / Schema
-==================
+=================
 
 .. contents::
     :local:
@@ -56,7 +56,7 @@ A more comprehensive option is to use schema migration tools, such as Alembic
 or SQLAlchemy-Migrate; see :ref:`schema_migrations` for discussion on this.
 
 How can I sort Table objects in order of their dependency?
-===========================================================================
+==========================================================
 
 This is available via the :attr:`.MetaData.sorted_tables` function::
 
@@ -67,7 +67,7 @@ This is available via the :attr:`.MetaData.sorted_tables` function::
         print(t)
 
 How can I get the CREATE TABLE/ DROP TABLE output as a string?
-===========================================================================
+==============================================================
 
 Modern SQLAlchemy has clause constructs which represent DDL operations. These
 can be rendered to strings like any other SQL expression::
@@ -92,7 +92,7 @@ The `Alembic <https://bitbucket.org/zzzeek/alembic>`_ tool also supports
 an "offline" SQL generation mode that renders database migrations as SQL scripts.
 
 How can I subclass Table/Column to provide certain behaviors/configurations?
-=============================================================================
+============================================================================
 
 :class:`.Table` and :class:`.Column` are not good targets for direct subclassing.
 However, there are simple ways to get on-construction behaviors using creation
index 1263906c434a1e1ecef03cbb1e5bcb943860c932..589a7a151a2633266e8b83f5669e68851c8f5f9e 100644 (file)
@@ -1,5 +1,5 @@
 ORM Configuration
-==================
+=================
 
 .. contents::
     :local:
@@ -72,7 +72,7 @@ columns::
 
 
 How do I configure a Column that is a Python reserved word or similar?
-----------------------------------------------------------------------------
+----------------------------------------------------------------------
 
 Column-based attributes can be given any name desired in the mapping. See
 :ref:`mapper_column_distinct_names`.
index d9684a44cb590550b3147ec2d5a1a49e1b195456..c6f51ebb132ac46e364e944560814edef5db81e5 100644 (file)
@@ -17,7 +17,7 @@ Looking for performance issues typically involves two stratgies.  One
 is query profiling, and the other is code profiling.
 
 Query Profiling
-^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^
 
 Sometimes just plain SQL logging (enabled via python's logging module
 or via the ``echo=True`` argument on :func:`.create_engine`) can give an
@@ -154,7 +154,7 @@ analysis of the query plan is warranted, using a system such as EXPLAIN,
 SHOW PLAN, etc. as is provided by the database backend.
 
 Result Fetching Slowness - Core
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 If on the other hand you see many thousands of calls related to fetching rows,
 or very long calls to ``fetchall()``, it may
@@ -223,7 +223,7 @@ that could indicate that everything is fast except for the actual network connec
 and too much time is spent with data moving over the network.
 
 Result Fetching Slowness - ORM
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 To detect slowness in ORM fetching of rows (which is the most common area
 of performance concern), calls like ``populate_state()`` and ``_instance()`` will
@@ -269,7 +269,7 @@ practice they are very easy to read.
     with bundled profiling capabilities.
 
 I'm inserting 400,000 rows with the ORM and it's really slow!
---------------------------------------------------------------
+-------------------------------------------------------------
 
 The SQLAlchemy ORM uses the :term:`unit of work` pattern when synchronizing
 changes to the database. This pattern goes far beyond simple "inserts"
@@ -463,7 +463,7 @@ Script::
 .. _faq_compiled_cache_threshold:
 
 How do I deal with "compiled statement cache reaching its size threshhold"?
------------------------------------------------------------------------------
+---------------------------------------------------------------------------
 
 Some parts of the ORM make use of a least-recently-used (LRU) cache in order
 to cache generated SQL statements for fast reuse.  More generally, these
@@ -509,4 +509,4 @@ the ORM should not generally require adjustment, and the LRU boundaries
 should never be reached.  If this warning is occurring and the application
 is not generating hundreds of engines, please report the issue to the
 SQLAlchemy developers on the mailing list; see the guidelines
-at http://www.sqlalchemy.org/support.html#mailinglist.
\ No newline at end of file
+at http://www.sqlalchemy.org/support.html#mailinglist.
index f7247aa210cae8e6aa875b24475156517c646545..2daba29698b5f70a61720df544076c30951404e2 100644 (file)
@@ -1,5 +1,5 @@
 Sessions / Queries
-===================
+==================
 
 .. contents::
     :local:
@@ -135,7 +135,7 @@ For a detailed discussion on how to organize usage of the :class:`.Session`,
 please see :ref:`session_faq_whentocreate`.
 
 But why does flush() insist on issuing a ROLLBACK?
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 It would be great if :meth:`.Session.flush` could partially complete and then not roll
 back, however this is beyond its current capabilities since its internal
@@ -297,7 +297,7 @@ output::
     LEN!
 
 How Do I use Textual SQL with ORM Queries?
--------------------------------------------
+------------------------------------------
 
 See:
 
@@ -316,7 +316,7 @@ why isn't my ``__init__()`` called when I load objects?
 See :ref:`mapping_constructors` for a description of this behavior.
 
 how do I use ON DELETE CASCADE with SA's ORM?
-----------------------------------------------
+---------------------------------------------
 
 SQLAlchemy will always issue UPDATE or DELETE statements for dependent
 rows which are currently loaded in the :class:`.Session`.  For rows which
index fce6c47db5107a4f960502843b40536e09dc6dc0..da956912a378d503af6053d0dbff241ea889c83c 100644 (file)
@@ -1,5 +1,5 @@
 SQL Expressions
-=================
+===============
 
 .. contents::
     :local:
index 1165d7fa9a8c88ebab8c6d18f39fd1584ac3277d..116fb74eec8bc43b88d1747e1aa89281c167b995 100644 (file)
@@ -105,7 +105,7 @@ exactly the same as if the above two relationships were created individually
 using :paramref:`~.relationship.back_populates` on each.
 
 Backref Arguments
-~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~
 
 We've established that the :paramref:`~.relationship.backref` keyword is merely a shortcut for building
 two individual :func:`.relationship` constructs that refer to each other.  Part of
@@ -187,7 +187,7 @@ it into a form that is interpreted by the receiving :func:`.relationship` as add
 arguments to be applied to the new relationship it creates.
 
 One Way Backrefs
-~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~
 
 An unusual case is that of the "one way backref".   This is where the
 "back-populating" behavior of the backref is only desirable in one
index cd6389ab7ebcf0561e3ba0cea87dc66bcf621719..6a121be9fd2ab737b0f0d160ace33b2b79f9c118 100644 (file)
@@ -1,7 +1,7 @@
 .. _relationship_patterns:
 
 Basic Relationship Patterns
-----------------------------
+---------------------------
 
 A quick walkthrough of the basic relational patterns.
 
@@ -15,7 +15,7 @@ The imports used for each of the following sections is as follows::
 
 
 One To Many
-~~~~~~~~~~~~
+~~~~~~~~~~~
 
 A one to many relationship places a foreign key on the child table referencing
 the parent.  :func:`.relationship` is then specified on the parent, as referencing
@@ -59,7 +59,7 @@ on a single :func:`.relationship` instead of using
 
 
 Many To One
-~~~~~~~~~~~~
+~~~~~~~~~~~
 
 Many to one places a foreign key in the parent table referencing the child.
 :func:`.relationship` is declared on the parent, where a new scalar-holding
@@ -102,7 +102,7 @@ may be applied to a single :func:`.relationship`, such as ``Parent.child``::
 .. _relationships_one_to_one:
 
 One To One
-~~~~~~~~~~~
+~~~~~~~~~~
 
 One To One is essentially a bidirectional relationship with a scalar
 attribute on both sides. To achieve this, the :paramref:`~.relationship.uselist` flag indicates
@@ -149,7 +149,7 @@ to specify ``uselist`` on a backref, use the :func:`.backref` function::
 .. _relationships_many_to_many:
 
 Many To Many
-~~~~~~~~~~~~~
+~~~~~~~~~~~~
 
 Many to Many adds an association table between two classes. The association
 table is indicated by the :paramref:`~.relationship.secondary` argument to
index 53ac9e3ce4f384181218080100635dbd83c71997..abd969933660275c913c542293dfc03c396c4bcc 100644 (file)
@@ -16,7 +16,7 @@ and techniques.
 .. currentmodule:: sqlalchemy.orm
 
 Working with Large Collections
-===============================
+==============================
 
 The default behavior of :func:`.relationship` is to fully load
 the collection of items in, as according to the loading strategy of the
@@ -31,7 +31,7 @@ loading of child items both at load time as well as deletion time.
 .. _dynamic_relationship:
 
 Dynamic Relationship Loaders
------------------------------
+----------------------------
 
 A key feature to enable management of a large collection is the so-called "dynamic"
 relationship.  This is an optional form of :func:`~sqlalchemy.orm.relationship` which
@@ -140,7 +140,7 @@ loader option.
 .. _passive_deletes:
 
 Using Passive Deletes
-----------------------
+---------------------
 
 Use :paramref:`~.relationship.passive_deletes` to disable child object loading on a DELETE
 operation, in conjunction with "ON DELETE (CASCADE|SET NULL)" on your database
@@ -222,7 +222,7 @@ default list, by specifying the :paramref:`~.relationship.collection_class` opti
     assert child in parent.children
 
 Dictionary Collections
------------------------
+----------------------
 
 A little extra detail is needed when using a dictionary as a collection.
 This because objects are always loaded from the database as lists, and a key-generation
@@ -350,7 +350,7 @@ for examples.
 .. autofunction:: mapped_collection
 
 Custom Collection Implementations
-==================================
+=================================
 
 You can use your own types for collections as well.  In simple cases,
 inherting from ``list`` or ``set``, adding custom behavior, is all that's needed.
@@ -454,7 +454,7 @@ collections. Use them when your class doesn't quite meet the regular interface
 for its container type, or when you otherwise would like to use a different method to
 get the job done.
 
-.. sourcecode:: python+sql
+.. sourcecode:: python
 
     from sqlalchemy.orm.collections import collection
 
@@ -599,7 +599,7 @@ The ORM uses this approach for built-ins, quietly substituting a trivial
 subclass when a ``list``, ``set`` or ``dict`` is used directly.
 
 Collection Internals
-=====================
+====================
 
 Various internal methods.
 
index 76d4cd023a59a1bd74c65a23ad8baf2d3294a3be..04f9b5110c47a20deb4a4dcd6ce8156d5412c86d 100644 (file)
@@ -3,7 +3,7 @@
 .. _mapper_composite:
 
 Composite Column Types
-=======================
+======================
 
 Sets of columns can be associated with a single user-defined datatype. The ORM
 provides a single attribute which represents the group of columns using the
index 38cbb41820674d1500992a8213d679cd8fddce0e..637afccb7b879e9970c486c5d066d474b6d9c7d7 100644 (file)
@@ -3,7 +3,7 @@
 .. _mapping_constructors:
 
 Constructors and Object Initialization
-=======================================
+======================================
 
 Mapping imposes no restrictions or requirements on the constructor
 (``__init__``) method for the class. You are free to require any arguments for
index cadfe8e050fa04b6d618bb2aa27ad3468587896d..fd55846220a32a130d7914327730aeb757e501ad 100644 (file)
@@ -1,7 +1,7 @@
 .. _unitofwork_contextual:
 
 Contextual/Thread-local Sessions
-=================================
+================================
 
 Recall from the section :ref:`session_faq_whentocreate`, the concept of
 "session scopes" was introduced, with an emphasis on web applications
index 8d277011c45779d010299e320207e92c4c1073c4..088705a0e6c648df365f9b19ebfea5991d057d35 100644 (file)
@@ -3,7 +3,7 @@
 .. _dep_interfaces_orm_toplevel:
 
 Deprecated ORM Event Interfaces
-================================
+===============================
 
 .. module:: sqlalchemy.orm.interfaces
 
@@ -17,19 +17,19 @@ until SQLAlchemy 0.5.  The non-ORM analogue is described at :ref:`dep_interfaces
     a consistent interface to all events without the need for subclassing.
 
 Mapper Events
------------------
+-------------
 
 .. autoclass:: MapperExtension
     :members:
 
 Session Events
------------------
+--------------
 
 .. autoclass:: SessionExtension
     :members:
 
 Attribute Events
---------------------
+----------------
 
 .. autoclass:: AttributeExtension
     :members:
index 470a9386bb8697e115eb6c2d5b2f9b863062d447..d373f253ee1feda9e0c54ef2249b47faee7c0b4b 100644 (file)
@@ -17,7 +17,7 @@ Attribute Events
    :members:
 
 Mapper Events
----------------
+-------------
 
 .. autoclass:: sqlalchemy.orm.events.MapperEvents
    :members:
@@ -35,13 +35,13 @@ Session Events
    :members:
 
 Query Events
--------------
+------------
 
 .. autoclass:: sqlalchemy.orm.events.QueryEvents
    :members:
 
 Instrumentation Events
------------------------
+----------------------
 
 .. automodule:: sqlalchemy.orm.instrumentation
 
index 1a0007ca7eb73b6eb890b28028d1114ea44f62c9..76afab26f1a395ba978c4e14ffed11e81403369f 100644 (file)
@@ -36,19 +36,19 @@ Directed Graphs
 .. automodule:: examples.graphs
 
 Dynamic Relations as Dictionaries
-------------------------------------
+---------------------------------
 
 .. automodule:: examples.dynamic_dict
 
 .. _examples_generic_associations:
 
 Generic Associations
-------------------------
+--------------------
 
 .. automodule:: examples.generic_associations
 
 Large Collections
-------------------------
+-----------------
 
 .. automodule:: examples.large_collection
 
@@ -58,7 +58,7 @@ Materialized Paths
 .. automodule:: examples.materialized_paths
 
 Nested Sets
-------------
+-----------
 
 .. automodule:: examples.nested_sets
 
@@ -79,12 +79,12 @@ Relationship Join Conditions
 .. _examples_xmlpersistence:
 
 XML Persistence
-------------------------
+---------------
 
 .. automodule:: examples.elementtree
 
 Versioning Objects
-------------------------
+------------------
 
 .. _examples_versioned_history:
 
@@ -101,7 +101,7 @@ Versioning using Temporal Rows
 .. automodule:: examples.versioned_rows
 
 Vertical Attribute Mapping
-------------------------------------
+--------------------------
 
 .. automodule:: examples.vertical
 
@@ -109,10 +109,10 @@ Vertical Attribute Mapping
 .. _examples_inheritance:
 
 Inheritance Mapping Recipes
-============================
+===========================
 
 Basic Inheritance Mappings
-----------------------------------
+--------------------------
 
 .. automodule:: examples.inheritance
 
@@ -122,14 +122,14 @@ Special APIs
 .. _examples_instrumentation:
 
 Attribute Instrumentation
-------------------------------------
+-------------------------
 
 .. automodule:: examples.custom_attributes
 
 .. _examples_sharding:
 
 Horizontal Sharding
-------------------------
+-------------------
 
 .. automodule:: examples.sharding
 
@@ -139,14 +139,14 @@ Extending the ORM
 .. _examples_caching:
 
 Dogpile Caching
-------------------------
+---------------
 
 .. automodule:: examples.dogpile_caching
 
 .. _examples_postgis:
 
 PostGIS Integration
-------------------------
+-------------------
 
 .. automodule:: examples.postgis
 
index 4b2b86f6218ca6c3f5ca0a6815cf86ebb965ddda..f20f01c18a14798264bb5228516b8de1749ef2e6 100644 (file)
@@ -3,10 +3,10 @@ Events and Internals
 ====================
 
 .. toctree::
-       :maxdepth: 2
+    :maxdepth: 2
 
-       events
-       internals
-       exceptions
-       deprecated
+    events
+    internals
+    exceptions
+    deprecated
 
index 7628bc1bdfadb0fbf2124e2dc43688c4b15b62d4..18803c75fff78dbb23d11b001f6e8c17c40eb46c 100644 (file)
@@ -114,7 +114,7 @@ or dictionary is taken into account, so that the proxy should act just like
 the underlying collection or attribute does.
 
 Creation of New Values
------------------------
+----------------------
 
 When a list append() event (or set add(), dictionary __setitem__(), or scalar
 assignment event) is intercepted by the association proxy, it instantiates a
@@ -256,7 +256,7 @@ by all these operations::
 .. _proxying_dictionaries:
 
 Proxying to Dictionary Based Collections
------------------------------------------
+----------------------------------------
 
 The association proxy can proxy to dictionary based collections as well.   SQLAlchemy
 mappings usually use the :func:`.attribute_mapped_collection` collection type to
index 67b66a9709a26df166fc71a647ea6477d35f522b..5ef209b75f2bb7cb51601f63cbaa77116a5a3378 100644 (file)
@@ -68,7 +68,7 @@ configuration via the :meth:`.MapperEvents.before_configured` event::
 .. _declarative_abstract:
 
 ``__abstract__``
-~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~
 
 ``__abstract__`` causes declarative to skip the production
 of a table or mapper for the class entirely.  A class can be added within a
index bc9f913f2e59320adbce2b55731ed1ca7d7a57bc..b23fa4044df4f5142f1d0dcb63a04d2360472349 100644 (file)
@@ -69,7 +69,7 @@ so that string-configured :class:`~sqlalchemy.schema.ForeignKey`
 references can be resolved without issue.
 
 Accessing the MetaData
-=======================
+======================
 
 The :func:`declarative_base` base class contains a
 :class:`.MetaData` object where newly defined
index 577ed140f49e8c7eed5f62c0d85171bb7ea8b761..c401b9bc8fb5388954aba5a31ae3c8492051878a 100644 (file)
@@ -1,7 +1,7 @@
 .. _declarative_mixins:
 
 Mixin and Custom Base Classes
-==============================
+=============================
 
 A common need when using :mod:`~sqlalchemy.ext.declarative` is to
 share some functionality, such as a set of common columns, some common
@@ -292,7 +292,7 @@ the :class:`.declared_attr` is invoked::
    that will be mapped.
 
 Mixing in Association Proxy and Other Attributes
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Mixins can specify user-defined attributes as well as other extension
 units such as :func:`.association_proxy`.   The usage of
@@ -373,7 +373,7 @@ and ``TypeB`` classes.
 .. _decl_mixin_inheritance:
 
 Controlling table inheritance with mixins
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 The ``__tablename__`` attribute may be used to provide a function that
 will determine the name of the table used for each class in an inheritance
@@ -434,7 +434,7 @@ against the parent::
 .. _mixin_inheritance_columns:
 
 Mixing in Columns in Inheritance Scenarios
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 In constrast to how ``__tablename__`` and other special names are handled when
 used with :class:`.declared_attr`, when we mix in columns and properties (e.g.
index 9a621e6dd995c4b455dbf264ef97a30dfb2cf977..f203c55806fab06810e413c1aff1892c9ca3fc26 100644 (file)
@@ -38,7 +38,7 @@ specifying the last argument as a dictionary::
                 )
 
 Using a Hybrid Approach with __table__
-=======================================
+======================================
 
 As an alternative to ``__tablename__``, a direct
 :class:`~sqlalchemy.schema.Table` construct may be used.  The
index 060549a726b50a3305511768c1deaeaa26e8220f..8639e5782d8706d1a831e7c567d2d1489661cfdc 100644 (file)
@@ -9,5 +9,5 @@ API Reference
 -------------
 
 .. autoclass:: sqlalchemy.ext.indexable.index_property
-       :members:
+    :members:
 
index 16084e319111da3f628e51bceb12ade134ab07b7..422721ffeeba8dfadbc5ff6953bc2e6e6c5252e3 100644 (file)
@@ -1,7 +1,7 @@
 .. _instrumentation_toplevel:
 
 Alternate Class Instrumentation
-================================
+===============================
 
 .. automodule:: sqlalchemy.ext.instrumentation
 
index 2ef0a5adbc446b72a5da8514aad7bd5ebddd757a..3e49b86cb161384977bcef1ad470767d59dcdac6 100644 (file)
@@ -1,7 +1,7 @@
 .. _mutable_toplevel:
 
 Mutation Tracking
-==================
+=================
 
 .. automodule:: sqlalchemy.ext.mutable
 
@@ -20,15 +20,15 @@ API Reference
     :members:
 
 .. autoclass:: MutableDict
-       :members:
-       :undoc-members:
+    :members:
+    :undoc-members:
 
 .. autoclass:: MutableList
-       :members:
-       :undoc-members:
+    :members:
+    :undoc-members:
 
 .. autoclass:: MutableSet
-       :members:
-       :undoc-members:
+    :members:
+    :undoc-members:
 
 
index b7683a8ad09e8cbbd45292f94b07adf998157e16..8434df62c7de2b822d8300758ac5fe62d8299255 100644 (file)
@@ -1,7 +1,7 @@
 .. _orm_toplevel:
 
 SQLAlchemy ORM
-===============
+==============
 
 Here, the Object Relational Mapper is introduced and fully described. If you
 want to work with higher-level SQL which is constructed automatically for you,
index 2d21e9e7886eee34c74190003a657a0f9861e21e..14b85420c9c5df131dca10e110592e5730b89536 100644 (file)
@@ -1,7 +1,7 @@
 .. _inheritance_toplevel:
 
 Mapping Class Inheritance Hierarchies
-======================================
+=====================================
 
 SQLAlchemy supports three forms of inheritance: **single table inheritance**,
 where several types of classes are represented by a single table, **concrete
@@ -25,7 +25,7 @@ return objects of multiple types.
 .. _joined_inheritance:
 
 Joined Table Inheritance
--------------------------
+------------------------
 
 In joined table inheritance, each class along a hierarchy of classes
 is represented by a distinct table.  Querying for a particular subclass
index cbb08761740a190b3ad838198547ad45e8309bbb..85e6af8bdd3b6175cf9265277fa58fba383d83b5 100644 (file)
@@ -30,7 +30,7 @@ tables will be available in the SELECT.
 .. _with_polymorphic:
 
 Using with_polymorphic
------------------------
+----------------------
 
 For the following sections, assume the ``Employee`` / ``Engineer`` / ``Manager``
 examples introduced in :ref:`inheritance_toplevel`.
@@ -339,7 +339,7 @@ narrowing the criterion to specific derived aliases or subclasses. Suppose the
 with a ``Company`` object. We'll add a ``company_id`` column to the
 ``employees`` table and a new table ``companies``:
 
-.. sourcecode:: python+sql
+.. sourcecode:: python
 
     class Company(Base):
         __tablename__ = 'company'
@@ -464,7 +464,7 @@ eager-loaded ``Engineer`` class, we access this class from the namespace of the
 .. _loading_joined_inheritance:
 
 Loading objects with joined table inheritance
------------------------------------------------
+---------------------------------------------
 
 When using joined table inheritance, if we query for a specific subclass
 that represents a JOIN of two tables such as our ``Engineer`` example
@@ -567,7 +567,7 @@ function and its configurational variants.
 .. _loading_single_inheritance:
 
 Loading objects with single table inheritance
------------------------------------------------
+---------------------------------------------
 
 In modern Declarative, single inheritance mappings produce :class:`.Column`
 objects that are mapped only to a subclass, and not available from the
@@ -655,6 +655,6 @@ Since we specified ``"*"`` for the entities, both ``Engineer`` and
 
 
 Inheritance Loading API
-------------------------
+-----------------------
 
 .. autofunction:: sqlalchemy.orm.with_polymorphic
index f40ad23de174ae15461e80ef000bfa350308533a..b83b76fd55d73022e3385fa2c3996e6e83f2a19d 100644 (file)
@@ -1,7 +1,7 @@
 .. _relationship_configure_joins:
 
 Configuring how Relationship Joins
-------------------------------------
+----------------------------------
 
 :func:`.relationship` will normally create a join between two tables
 by examining the foreign key relationship between the two tables
@@ -104,7 +104,7 @@ one :class:`.Column` we need::
 .. _relationship_primaryjoin:
 
 Specifying Alternate Join Conditions
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 The default behavior of :func:`.relationship` when constructing a join
 is that it equates the value of primary key columns
@@ -248,7 +248,7 @@ SQL expressions::
 .. _relationship_custom_operator:
 
 Using custom operators in join conditions
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Another use case for relationships is the use of custom operators, such
 as PostgreSQL's "is contained within" ``<<`` operator when joining with
@@ -468,7 +468,7 @@ we seek for a load of ``Element.descendants`` to look like::
 .. _self_referential_many_to_many:
 
 Self-Referential Many-to-Many Relationship
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Many to many relationships can be customized by one or both of :paramref:`~.relationship.primaryjoin`
 and :paramref:`~.relationship.secondaryjoin` - the latter is significant for a relationship that
@@ -718,7 +718,7 @@ additional columns when we query; these can be ignored:
 
 
 Building Query-Enabled Properties
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Very ambitious custom join conditions may fail to be directly persistable, and
 in some cases may not even load correctly. To remove the persistence part of
@@ -728,7 +728,7 @@ attribute (data written to the collection will be ignored on flush()).
 However, in extreme cases, consider using a regular Python property in
 conjunction with :class:`.Query` as follows:
 
-.. sourcecode:: python+sql
+.. sourcecode:: python
 
     class User(Base):
         __tablename__ = 'user'
index 95d0606a504578ba4be76c552ea89bfd7ccefb1e..afa54078f1464337c9429685d0f2f6f6b06f9418 100644 (file)
@@ -9,7 +9,7 @@ This section presents additional options regarding the loading of columns.
 .. _deferred:
 
 Deferred Column Loading
-========================
+=======================
 
 This feature allows particular columns of a table be loaded only
 upon direct access, instead of when the entity is queried using
@@ -76,7 +76,7 @@ using :func:`.orm.undefer_group`, sending in the group name::
     query.options(undefer_group('photos')).all()
 
 Load Only Cols
----------------
+--------------
 
 An arbitrary set of columns can be selected as "load only" columns, which will
 be loaded while deferring all other columns on a given entity, using :func:`.orm.load_only`::
@@ -145,7 +145,7 @@ Column Deferral API
 .. _bundles:
 
 Column Bundles
-===============
+==============
 
 The :class:`.Bundle` may be used to query for groups of columns under one
 namespace.
index c5550d4079d24214ac42b3c51441cbcadb851a7a..64dce643c7c2e671634cda2373228fd267826e8c 100644 (file)
@@ -1,6 +1,6 @@
-=======================
+===============
 Loading Objects
-=======================
+===============
 
 Notes and features regarding the general loading of mapped objects.
 
index f2279a2b49757199fe789acc51f64dd1e68ade4e..6d3beb94de01e521f0844f0351d98a2fdbc1fd53 100644 (file)
@@ -617,7 +617,7 @@ limitations of :func:`.subqueryload`.
 .. _subqueryload_ordering:
 
 The Importance of Ordering
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 A query which makes use of :func:`.subqueryload` in conjunction with a
 limiting modifier such as :meth:`.Query.first`, :meth:`.Query.limit`,
@@ -918,7 +918,7 @@ Above, all relationships on ``Address`` will be set to a lazy load.
 .. _contains_eager:
 
 Routing Explicit Joins/Statements into Eagerly Loaded Collections
-------------------------------------------------------------------
+-----------------------------------------------------------------
 
 The behavior of :func:`~sqlalchemy.orm.joinedload()` is such that joins are
 created automatically, using anonymous aliases as targets, the results of which
@@ -992,7 +992,7 @@ Or using the class-bound descriptor::
         contains_eager(Order.items))
 
 Using contains_eager() to load a custom-filtered collection result
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 When we use :func:`.contains_eager`, *we* are constructing ourselves the
 SQL that will be used to populate collections.  From this, it naturally follows
@@ -1036,7 +1036,7 @@ in fact associated with the collection.
 
 
 Advanced Usage with Arbitrary Statements
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 The ``alias`` argument can be more creatively used, in that it can be made
 to represent any set of arbitrary names to match up into a statement.
@@ -1061,7 +1061,7 @@ to a string SQL statement::
         options(contains_eager(User.addresses, alias=eager_columns))
 
 Creating Custom Load Rules
----------------------------
+--------------------------
 
 .. warning::  This is an advanced technique!   Great care and testing
    should be applied.
@@ -1146,7 +1146,7 @@ and ``A.b.a`` from our event:
 
 
 Relationship Loader API
-------------------------
+-----------------------
 
 .. autofunction:: contains_alias
 
index fe98adc97d5f911a5d1afa2c6a503d9a7af974c7..8a451084934fcc2e1efed2d6b3ec4c3d837f7828 100644 (file)
@@ -1,7 +1,7 @@
 .. module:: sqlalchemy.orm
 
 Changing Attribute Behavior
-============================
+===========================
 
 .. _simple_validators:
 
index bc9e7a9f766884d5b9e93ccefdb7dea1c8d14a95..858e6973e14a0df3c20ef83e2796f6e3890b4967 100644 (file)
@@ -3,7 +3,7 @@
 .. _mapper_sql_expressions:
 
 SQL Expressions as Mapped Attributes
-=====================================
+====================================
 
 Attributes on a mapped class can be linked to SQL expressions, which can
 be used in queries.
@@ -174,7 +174,7 @@ here with a classical mapping::
         })
 
 Using a plain descriptor
--------------------------
+------------------------
 
 In cases where a SQL query more elaborate than what :func:`.orm.column_property`
 or :class:`.hybrid_property` can provide must be emitted, a regular Python
index b36bfd2f106d7b1e8a914168a6dd4e603661669e..4b31b92102c91089d0835fe58447362c4368b85c 100644 (file)
@@ -105,7 +105,7 @@ tables, a more flexible approach is to use that described in
 
 
 Using column_property for column level options
------------------------------------------------
+----------------------------------------------
 
 Options can be specified when mapping a :class:`.Column` using the
 :func:`.column_property` function.  This function
index 4645a8029cfdb561a7e61dd1032fe74cfd4facc5..7e34bd55ffc75ee4178e8fab8215fb3ddaf09d96 100644 (file)
@@ -5,7 +5,7 @@ Non-Traditional Mappings
 .. _maptojoin:
 
 Mapping a Class against Multiple Tables
-========================================
+=======================================
 
 Mappers can be constructed against arbitrary relational units (called
 *selectables*) in addition to plain tables. For example, the :func:`~.expression.join`
index 06b8faff73b62e1c4d83aee7bfb6b48476e29b0c..7a7d9042d4ebfb7fad2c467243179e55c56ad03b 100644 (file)
@@ -5,7 +5,7 @@ Additional Persistence Techniques
 .. _flush_embedded_sql_expressions:
 
 Embedding SQL Insert/Update Expressions into a Flush
-=====================================================
+====================================================
 
 This feature allows the value of a database column to be set to a SQL
 expression instead of a literal value. It's especially useful for atomic
@@ -32,7 +32,7 @@ from the database.
 .. _session_sql_expressions:
 
 Using SQL Expressions with Sessions
-====================================
+===================================
 
 SQL expressions and strings can be executed via the
 :class:`~sqlalchemy.orm.session.Session` within its transactional context.
index 1517cb997abf29c41769520efeaaa965b15bc8cb..8a857c057fae442475cad5408d4c021dfbe2dcf8 100644 (file)
@@ -26,13 +26,13 @@ ORM-Specific Query Constructs
 .. autoclass:: sqlalchemy.orm.util.AliasedInsp
 
 .. autoclass:: sqlalchemy.orm.query.Bundle
-       :members:
+    :members:
 
 .. autoclass:: sqlalchemy.util.KeyedTuple
-       :members: keys, _fields, _asdict
+    :members: keys, _fields, _asdict
 
 .. autoclass:: sqlalchemy.orm.strategy_options.Load
-       :members:
+    :members:
 
 .. autofunction:: join
 
index 1a855216c8573eba1b41f8fde77df6f1739dc35f..225d26a16cd0f1ed6b1cd096d4d521e3be49a025 100644 (file)
@@ -167,7 +167,7 @@ the foreign key for the purposes of joining and cross-population.
 .. _passive_updates:
 
 Mutable Primary Keys / Update Cascades
----------------------------------------
+--------------------------------------
 
 When the primary key of an entity changes, related items
 which reference the primary key must also be updated as
index f6ed35fd6e08f9a1542d5d815b8ed2ca8e792d3a..a3b288d5cdcc64cea1e929482d104b62375e51a7 100644 (file)
@@ -1,7 +1,7 @@
 .. _self_referential:
 
 Adjacency List Relationships
------------------------------
+----------------------------
 
 The **adjacency list** pattern is a common relational pattern whereby a table
 contains a foreign key reference to itself. This is the most common
@@ -119,7 +119,7 @@ the "remote" side.
     where a column points to itself.
 
 Self-Referential Query Strategies
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Querying of self-referential structures works like any other query::
 
@@ -218,7 +218,7 @@ arbitrarily join along a chain of self-referential nodes, see
 .. _self_referential_eager_loading:
 
 Configuring Self-Referential Eager Loading
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Eager loading of relationships occurs using joins or outerjoins from parent to
 child table during a normal query operation, such that the parent and its
index 9c8523542e9077b4b05545ac168312086d686aa4..5523422e01c481582c3471672094bb971a8e47c9 100644 (file)
@@ -1,10 +1,10 @@
 .. module:: sqlalchemy.orm.session
 
 Session API
-============
+===========
 
 Session and sessionmaker()
----------------------------
+--------------------------
 
 .. autoclass:: sessionmaker
     :members:
@@ -29,7 +29,7 @@ Session Utilities
 .. autofunction:: sqlalchemy.orm.util.was_deleted
 
 Attribute and State Management Utilities
------------------------------------------
+----------------------------------------
 
 These functions are provided by the SQLAlchemy attribute
 instrumentation API to provide a detailed interface for dealing
index 18610d3f0319b4fddbdccc05c9f07d1c1725a5e8..de0dd1e3a8fec35ccb2c4f5566d4d451cbd6c5ff 100644 (file)
@@ -1,6 +1,6 @@
-==========================
+==============
 Session Basics
-==========================
+==============
 
 What does the Session do ?
 ==========================
@@ -98,7 +98,7 @@ is then maintained by the helper.  Some of these helpers are discussed in the
 section :ref:`session_faq_whentocreate`.
 
 Adding Additional Configuration to an Existing sessionmaker()
---------------------------------------------------------------
+-------------------------------------------------------------
 
 A common scenario is where the :class:`.sessionmaker` is invoked
 at module import time, however the generation of one or more :class:`.Engine`
@@ -125,7 +125,7 @@ when the construct is invoked::
     session = Session()
 
 Creating Ad-Hoc Session Objects with Alternate Arguments
----------------------------------------------------------
+--------------------------------------------------------
 
 For the use case where an application needs to create a new :class:`.Session` with
 special arguments that deviate from what is normally used throughout the application,
@@ -155,14 +155,14 @@ transaction - see :ref:`session_external_transaction` for an example of this.
 .. _session_faq:
 
 Session Frequently Asked Questions
-===================================
+==================================
 
 By this point, many users already have questions about sessions.
 This section presents a mini-FAQ (note that we have also a :doc:`real FAQ </faq/index>`)
 of the most basic issues one is presented with when using a :class:`.Session`.
 
 When do I make a :class:`.sessionmaker`?
-------------------------------------------
+----------------------------------------
 
 Just one time, somewhere in your application's global scope. It should be
 looked upon as part of your application's configuration. If your
@@ -391,7 +391,7 @@ doing its work.   For example, we can further separate concerns using a `context
 
 
 Is the Session a cache?
-----------------------------------
+-----------------------
 
 Yeee...no. It's somewhat used as a cache, in that it implements the
 :term:`identity map` pattern, and stores objects keyed to their primary key.
@@ -429,7 +429,7 @@ The newer :ref:`core_inspection_toplevel` system can also be used::
 .. _session_faq_threadsafe:
 
 Is the session thread-safe?
-------------------------------
+---------------------------
 
 The :class:`.Session` is very much intended to be used in a
 **non-concurrent** fashion, which usually means in only one thread at a
@@ -475,7 +475,7 @@ using the :meth:`.Session.merge` method to copy the state of an object into
 a new object local to a different :class:`.Session`.
 
 Basics of Using a Session
-===========================
+=========================
 
 The most basic :class:`.Session` use patterns are presented here.
 
@@ -559,7 +559,7 @@ into the Session's list of objects to be marked as deleted::
 .. _session_deleting_from_collections:
 
 Deleting from Collections
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~
 
 A common confusion that arises regarding :meth:`~.Session.delete` is when
 objects which are members of a collection are being deleted.   While the
index f3ab57e59913b6b9976c760162863b21918dc906..7901d8f4a8a708302096e2deebb918533936aa1a 100644 (file)
@@ -243,7 +243,7 @@ now has an identity key.   Track pending to persistent with the
         print("pending to persistent: %s" % object_)
 
 Pending to Transient
-^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^
 
 The :term:`pending` object can revert back to :term:`transient` if the
 :meth:`.Session.rollback` method is called before the pending object
@@ -256,7 +256,7 @@ for the object before it is flushed.  Track pending to transient with the
         print("transient to pending: %s" % object_)
 
 Loaded as Persistent
-^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^
 
 Objects can appear in the :class:`.Session` directly in the :term:`persistent`
 state when they are loaded from the database.   Tracking this state transition
@@ -316,7 +316,7 @@ Track the persistent to deleted transition with
 
 
 Deleted to Detached
-^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^
 
 The deleted object becomes :term:`detached` when the session's transaction
 is committed.  After the :meth:`.Session.commit` method is called, the
@@ -340,7 +340,7 @@ the deleted to detached transition using :meth:`.SessionEvents.deleted_to_detach
 
 
 Persistent to Detached
-^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^
 
 The persistent object becomes :term:`detached` when the object is de-associated
 with the :class:`.Session`, via the :meth:`.Session.expunge`,
@@ -360,7 +360,7 @@ Track objects as they move from persistent to detached using the
         print("object became detached: %s" % object_)
 
 Detached to Persistent
-^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^
 
 The detached object becomes persistent when it is re-associated with a
 session using the :meth:`.Session.add` or equivalent method.  Track
@@ -373,7 +373,7 @@ objects moving back to persistent from detached using the
 
 
 Deleted to Persistent
-^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^
 
 The :term:`deleted` object can be reverted to the :term:`persistent`
 state when the transaction in which it was DELETEd was rolled back
index e825568e51a14d250df482cc89833fda09efc9b3..40fda4c7593fc83020f0e82819b2dd42d5e71a44 100644 (file)
@@ -574,7 +574,7 @@ or loaded with :meth:`~.Session.refresh` varies based on several factors, includ
 
 
 When to Expire or Refresh
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~
 
 The :class:`.Session` uses the expiration feature automatically whenever
 the transaction referred to by the session ends.  Meaning, whenever :meth:`.Session.commit`
index e686fd7f6de5a314389dd828480b2f466f06aa11..c508d8b35bf0064c46a65fe1f87a472cf13f27da 100644 (file)
@@ -1,6 +1,6 @@
-=======================================
+======================================
 Transactions and Connection Management
-=======================================
+======================================
 
 .. _unitofwork_transaction:
 
index afe097e859c68b88a1c5972051d67c0080b37e58..f742151b000a3800c32e7bab7372001c1171fd18 100644 (file)
@@ -1111,7 +1111,7 @@ implies a basic one to many association from the ``users`` to a new
 table which stores email addresses, which we will call ``addresses``. Using
 declarative, we define this table along with its mapped class, ``Address``:
 
-.. sourcecode:: python+sql
+.. sourcecode:: python
 
     >>> from sqlalchemy import ForeignKey
     >>> from sqlalchemy.orm import relationship
@@ -1217,7 +1217,7 @@ already been created:
     COMMIT
 
 Working with Related Objects
-=============================
+============================
 
 Now when we create a ``User``, a blank ``addresses`` collection will be
 present. Various collection types, such as sets and dictionaries, are possible
@@ -1309,7 +1309,7 @@ to optimize the loading of this collection in a bit.
 .. _ormtutorial_joins:
 
 Querying with Joins
-====================
+===================
 
 Now that we have two tables, we can show some more features of :class:`.Query`,
 specifically how to create queries that deal with both tables at the same time.
@@ -1691,7 +1691,7 @@ very easy to use:
    ensure correct results.  See :ref:`subqueryload_ordering`.
 
 Joined Load
--------------
+-----------
 
 The other automatic eager loading function is more well known and is called
 :func:`.orm.joinedload`.   This style of loading emits a JOIN, by default
@@ -1750,7 +1750,7 @@ for both the lead and the related object.
    a detailed description of how this is used.
 
 Explicit Join + Eagerload
---------------------------
+-------------------------
 
 A third style of eager loading is when we are constructing a JOIN explicitly in
 order to locate the primary rows, and would like to additionally apply the extra
index bf25f78c1562117d7abcbcc2a76278f63106bb86..f9ad0c5d5f3b244a9ebabfd4b780f38908ee5e6b 100644 (file)
@@ -210,7 +210,7 @@ e.g. PostgreSQL, Oracle, SQL Server (though SQL Server has
     Support for server side version identifier tracking.
 
 Programmatic or Conditional Version Counters
----------------------------------------------
+--------------------------------------------
 
 When ``version_id_generator`` is set to False, we can also programmatically
 (and conditionally) set the version identifier on our object in the same way