diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-12-25 14:49:57 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-12-25 14:49:57 -0500 |
commit | 8105b343380c6656e6fa4a02b1221aae61dada4a (patch) | |
tree | 059681763c4e9a4af33438b918a423651223f102 | |
parent | 0ff337f29e3f1060a98338300fcecfc550936558 (diff) | |
download | sqlalchemy-8105b343380c6656e6fa4a02b1221aae61dada4a.tar.gz |
fix .. note::/ ..warning:: directives which no longer consistently
support inline formatting in docutils 0.8
-rw-r--r-- | doc/build/core/connections.rst | 4 | ||||
-rw-r--r-- | doc/build/core/engines.rst | 1 | ||||
-rw-r--r-- | doc/build/orm/relationships.rst | 4 | ||||
-rw-r--r-- | doc/build/orm/tutorial.rst | 16 | ||||
-rwxr-xr-x | lib/sqlalchemy/ext/declarative.py | 4 | ||||
-rw-r--r-- | lib/sqlalchemy/ext/orderinglist.py | 4 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/__init__.py | 22 |
7 files changed, 40 insertions, 15 deletions
diff --git a/doc/build/core/connections.rst b/doc/build/core/connections.rst index 7b2e6aa69..3dd7d113b 100644 --- a/doc/build/core/connections.rst +++ b/doc/build/core/connections.rst @@ -123,7 +123,9 @@ in :ref:`sqlexpression_toplevel`. Using Transactions ================== -.. note:: This section describes how to use transactions when working directly +.. note:: + + This section describes how to use transactions when working directly with :class:`.Engine` and :class:`.Connection` objects. When using the SQLAlchemy ORM, the public API for transaction control is via the :class:`.Session` object, which makes usage of the :class:`.Transaction` diff --git a/doc/build/core/engines.rst b/doc/build/core/engines.rst index feaa109cf..22162cb69 100644 --- a/doc/build/core/engines.rst +++ b/doc/build/core/engines.rst @@ -316,6 +316,7 @@ string. To set this to a specific name, use the "logging_name" and "pool_logging_name" keyword arguments with :func:`sqlalchemy.create_engine`. .. note:: + The SQLAlchemy :class:`.Engine` conserves Python function call overhead by only emitting log statements when the current logging level is detected as ``logging.INFO`` or ``logging.DEBUG``. It only checks this level when diff --git a/doc/build/orm/relationships.rst b/doc/build/orm/relationships.rst index a4ac63ee7..486723e43 100644 --- a/doc/build/orm/relationships.rst +++ b/doc/build/orm/relationships.rst @@ -349,7 +349,9 @@ extension allows the configuration of attributes which will access two "hops" with a single access, one "hop" to the associated object, and a second to a target attribute. -.. note:: When using the association object pattern, it is +.. note:: + + When using the association object pattern, it is advisable that the association-mapped table not be used as the ``secondary`` argument on a :func:`.relationship` elsewhere, unless that :func:`.relationship` contains diff --git a/doc/build/orm/tutorial.rst b/doc/build/orm/tutorial.rst index 81c6be8dc..cf904078e 100644 --- a/doc/build/orm/tutorial.rst +++ b/doc/build/orm/tutorial.rst @@ -90,7 +90,9 @@ Next, we can issue CREATE TABLE statements derived from our table metadata, by c () COMMIT -.. note:: Users familiar with the syntax of CREATE TABLE may notice that the +.. note:: + + Users familiar with the syntax of CREATE TABLE may notice that the VARCHAR columns were generated without a length; on SQLite and Postgresql, this is a valid datatype, but on others, it's not allowed. So if running this tutorial on one of those databases, and you wish to use SQLAlchemy to @@ -888,7 +890,9 @@ from ``Address`` to ``User`` it is **many to one**, and from ``User`` to ``Address`` it is **one to many**. SQLAlchemy is automatically aware of many-to-one/one-to-many based on foreign keys. -.. note:: The :func:`~sqlalchemy.orm.relationship()` function has historically +.. note:: + + The :func:`~sqlalchemy.orm.relationship()` function has historically been known as :func:`~sqlalchemy.orm.relation()`, which is the name that's available in all versions of SQLAlchemy prior to 0.6beta2, including the 0.5 and 0.4 series. :func:`~sqlalchemy.orm.relationship()` is only available @@ -1065,7 +1069,9 @@ See :ref:`loading_toplevel` for information on :func:`~sqlalchemy.orm.subqueryload`. We'll also see another way to "eagerly" load in the next section. -.. note:: The join created by :func:`.joinedload` is anonymously aliased such that +.. note:: + + The join created by :func:`.joinedload` is anonymously aliased such that it **does not affect the query results**. An :meth:`.Query.order_by` or :meth:`.Query.filter` call **cannot** reference these aliased tables - so-called "user space" joins are constructed using @@ -1448,7 +1454,9 @@ relationships to mappings at any point in time, in this case the existing relationship needs to be removed, so we need to tear down the mappings completely and start again. -.. note:: Tearing down mappers with :func:`~.orm.clear_mappers` is not a typical +.. note:: + + Tearing down mappers with :func:`~.orm.clear_mappers` is not a typical operation, and normal applications do not need to use this function. It is here so that the tutorial code can be executed as a whole. diff --git a/lib/sqlalchemy/ext/declarative.py b/lib/sqlalchemy/ext/declarative.py index 70080e9c7..ef4ae7595 100755 --- a/lib/sqlalchemy/ext/declarative.py +++ b/lib/sqlalchemy/ext/declarative.py @@ -1306,7 +1306,9 @@ class declared_attr(property): """Mark a class-level method as representing the definition of a mapped property or special declarative member name. - .. note:: @declared_attr is available as + .. note:: + + @declared_attr is available as ``sqlalchemy.util.classproperty`` for SQLAlchemy versions 0.6.2, 0.6.3, 0.6.4. diff --git a/lib/sqlalchemy/ext/orderinglist.py b/lib/sqlalchemy/ext/orderinglist.py index ce63b88ea..ba505eb7b 100644 --- a/lib/sqlalchemy/ext/orderinglist.py +++ b/lib/sqlalchemy/ext/orderinglist.py @@ -73,7 +73,9 @@ Use the ``ordering_list`` function to set up the ``collection_class`` on relatio (as in the mapper example above). This implementation depends on the list starting in the proper order, so be SURE to put an order_by on your relationship. -.. warning:: ``ordering_list`` only provides limited functionality when a primary +.. warning:: + + ``ordering_list`` only provides limited functionality when a primary key column or unique column is the target of the sort. Since changing the order of entries often means that two rows must trade values, this is not possible when the value is constrained by a primary key or unique constraint, since one of the rows diff --git a/lib/sqlalchemy/orm/__init__.py b/lib/sqlalchemy/orm/__init__.py index 3fdbd8795..e3aaee4f3 100644 --- a/lib/sqlalchemy/orm/__init__.py +++ b/lib/sqlalchemy/orm/__init__.py @@ -182,7 +182,9 @@ def create_session(bind=None, **kwargs): def relationship(argument, secondary=None, **kwargs): """Provide a relationship of a primary Mapper to a secondary Mapper. - .. note:: :func:`relationship` is historically known as + .. note:: + + :func:`relationship` is historically known as :func:`relation` prior to version 0.6. This corresponds to a parent-child or associative table relationship. The @@ -1055,10 +1057,12 @@ def joinedload(*keys, **kw): """Return a ``MapperOption`` that will convert the property of the given name into an joined eager load. - .. note:: This function is known as :func:`eagerload` in all versions - of SQLAlchemy prior to version 0.6beta3, including the 0.5 and 0.4 - series. :func:`eagerload` will remain available for the foreseeable - future in order to enable cross-compatibility. + .. note:: + + This function is known as :func:`eagerload` in all versions + of SQLAlchemy prior to version 0.6beta3, including the 0.5 and 0.4 + series. :func:`eagerload` will remain available for the foreseeable + future in order to enable cross-compatibility. Used with :meth:`~sqlalchemy.orm.query.Query.options`. @@ -1080,7 +1084,9 @@ def joinedload(*keys, **kw): query(Order).options(joinedload(Order.user, innerjoin=True)) - .. note:: The join created by :func:`joinedload` is anonymously aliased such that + .. note:: + + The join created by :func:`joinedload` is anonymously aliased such that it **does not affect the query results**. An :meth:`.Query.order_by` or :meth:`.Query.filter` call **cannot** reference these aliased tables - so-called "user space" joins are constructed using @@ -1108,7 +1114,9 @@ def joinedload_all(*keys, **kw): """Return a ``MapperOption`` that will convert all properties along the given dot-separated path into an joined eager load. - .. note:: This function is known as :func:`eagerload_all` in all versions + .. note:: + + This function is known as :func:`eagerload_all` in all versions of SQLAlchemy prior to version 0.6beta3, including the 0.5 and 0.4 series. :func:`eagerload_all` will remain available for the foreseeable future in order to enable cross-compatibility. |