From 1a6dd8b393991cb0cdba044d1c560c08ca426f89 Mon Sep 17 00:00:00 2001 From: Vraj Mohan Date: Thu, 14 Nov 2013 15:59:06 -0500 Subject: [PATCH] Fix cross references --- doc/build/core/pooling.rst | 4 +++- doc/build/core/tutorial.rst | 18 +++++++++--------- doc/build/orm/extensions/mutable.rst | 1 - lib/sqlalchemy/engine/reflection.py | 2 +- lib/sqlalchemy/orm/query.py | 4 ++-- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/doc/build/core/pooling.rst b/doc/build/core/pooling.rst index 83ec0252f2..550fb35274 100644 --- a/doc/build/core/pooling.rst +++ b/doc/build/core/pooling.rst @@ -291,11 +291,13 @@ API Documentation - Available Pool Implementations .. automethod:: connect .. automethod:: dispose .. automethod:: recreate + .. automethod:: unique_connection .. autoclass:: sqlalchemy.pool.QueuePool - .. automethod:: __init__ + .. automethod:: connect + .. automethod:: unique_connection .. autoclass:: SingletonThreadPool diff --git a/doc/build/core/tutorial.rst b/doc/build/core/tutorial.rst index aa8ba2f2a2..492c294cab 100644 --- a/doc/build/core/tutorial.rst +++ b/doc/build/core/tutorial.rst @@ -238,7 +238,7 @@ we use the ``connect()`` method:: >>> conn #doctest: +ELLIPSIS -The :class:`~sqlalchemy.engine.base.Connection` object represents an actively +The :class:`~sqlalchemy.engine.Connection` object represents an actively checked out DBAPI connection resource. Lets feed it our :class:`~sqlalchemy.sql.expression.Insert` object and see what happens: @@ -252,7 +252,7 @@ checked out DBAPI connection resource. Lets feed it our So the INSERT statement was now issued to the database. Although we got positional "qmark" bind parameters instead of "named" bind parameters in the output. How come ? Because when executed, the -:class:`~sqlalchemy.engine.base.Connection` used the SQLite **dialect** to +:class:`~sqlalchemy.engine.Connection` used the SQLite **dialect** to help generate the statement; when we use the ``str()`` function, the statement isn't aware of this dialect, and falls back onto a default which uses named parameters. We can view this manually as follows: @@ -264,9 +264,9 @@ parameters. We can view this manually as follows: 'INSERT INTO users (name, fullname) VALUES (?, ?)' What about the ``result`` variable we got when we called ``execute()`` ? As -the SQLAlchemy :class:`~sqlalchemy.engine.base.Connection` object references a +the SQLAlchemy :class:`~sqlalchemy.engine.Connection` object references a DBAPI connection, the result, known as a -:class:`~sqlalchemy.engine.result.ResultProxy` object, is analogous to the DBAPI +:class:`~sqlalchemy.engine.ResultProxy` object, is analogous to the DBAPI cursor object. In the case of an INSERT, we can get important information from it, such as the primary key values which were generated from our statement: @@ -292,7 +292,7 @@ Our insert example above was intentionally a little drawn out to show some various behaviors of expression language constructs. In the usual case, an :class:`~sqlalchemy.sql.expression.Insert` statement is usually compiled against the parameters sent to the ``execute()`` method on -:class:`~sqlalchemy.engine.base.Connection`, so that there's no need to use +:class:`~sqlalchemy.engine.Connection`, so that there's no need to use the ``values`` keyword with :class:`~sqlalchemy.sql.expression.Insert`. Lets create a generic :class:`~sqlalchemy.sql.expression.Insert` statement again and use it in the "normal" way: @@ -363,10 +363,10 @@ Above, we issued a basic :func:`.select` call, placing the ``users`` table within the COLUMNS clause of the select, and then executing. SQLAlchemy expanded the ``users`` table into the set of each of its columns, and also generated a FROM clause for us. The result returned is again a -:class:`~sqlalchemy.engine.result.ResultProxy` object, which acts much like a +:class:`~sqlalchemy.engine.ResultProxy` object, which acts much like a DBAPI cursor, including methods such as -:func:`~sqlalchemy.engine.result.ResultProxy.fetchone` and -:func:`~sqlalchemy.engine.result.ResultProxy.fetchall`. The easiest way to get +:func:`~sqlalchemy.engine.ResultProxy.fetchone` and +:func:`~sqlalchemy.engine.ResultProxy.fetchall`. The easiest way to get rows from it is to just iterate: .. sourcecode:: pycon+sql @@ -414,7 +414,7 @@ But another way, whose usefulness will become apparent later on, is to use the Result sets which have pending rows remaining should be explicitly closed before discarding. While the cursor and connection resources referenced by the -:class:`~sqlalchemy.engine.result.ResultProxy` will be respectively closed and +:class:`~sqlalchemy.engine.ResultProxy` will be respectively closed and returned to the connection pool when the object is garbage collected, it's better to make it explicit as some database APIs are very picky about such things: diff --git a/doc/build/orm/extensions/mutable.rst b/doc/build/orm/extensions/mutable.rst index 4b217ca4d7..d2a292d905 100644 --- a/doc/build/orm/extensions/mutable.rst +++ b/doc/build/orm/extensions/mutable.rst @@ -12,7 +12,6 @@ API Reference :members: _parents, coerce .. autoclass:: Mutable - :members: .. autoclass:: MutableComposite diff --git a/lib/sqlalchemy/engine/reflection.py b/lib/sqlalchemy/engine/reflection.py index 461f5eb231..1f219e30c1 100644 --- a/lib/sqlalchemy/engine/reflection.py +++ b/lib/sqlalchemy/engine/reflection.py @@ -161,7 +161,7 @@ class Inspector(object): """Return all table names in referred to within a particular schema. The names are expected to be real tables only, not views. - Views are instead returned using the :meth:`.get_view_names` + Views are instead returned using the :meth:`.Inspector.get_view_names` method. diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py index 9051c081e7..0b8a100f12 100644 --- a/lib/sqlalchemy/orm/query.py +++ b/lib/sqlalchemy/orm/query.py @@ -541,7 +541,7 @@ class Query(object): :class:`.Query`, converted to a scalar subquery with a label of the given name. - Analogous to :meth:`sqlalchemy.sql.SelectBaseMixin.label`. + Analogous to :meth:`sqlalchemy.sql.expression.SelectBase.label`. .. versionadded:: 0.6.5 @@ -553,7 +553,7 @@ class Query(object): """Return the full SELECT statement represented by this :class:`.Query`, converted to a scalar subquery. - Analogous to :meth:`sqlalchemy.sql.SelectBaseMixin.as_scalar`. + Analogous to :meth:`sqlalchemy.sql.expression.SelectBase.as_scalar`. .. versionadded:: 0.6.5 -- 2.47.3