summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVraj Mohan <r.vrajmohan@gmail.com>2013-11-11 15:04:52 -0500
committerVraj Mohan <r.vrajmohan@gmail.com>2013-11-12 20:23:05 -0500
commit631eb841084a50518af90e2e728bd1efd31228f7 (patch)
tree3ecf72cc369486df85aca7d0736e2360e4c7a71c
parentf429032ac202a29cb674be461d5fd5fa76a8f0ad (diff)
downloadsqlalchemy-631eb841084a50518af90e2e728bd1efd31228f7.tar.gz
Fix cross references
-rw-r--r--doc/build/core/types.rst4
-rw-r--r--doc/build/orm/query.rst2
-rw-r--r--doc/build/orm/tutorial.rst6
-rw-r--r--lib/sqlalchemy/engine/interfaces.py6
-rw-r--r--lib/sqlalchemy/ext/compiler.py2
-rw-r--r--lib/sqlalchemy/orm/query.py10
-rw-r--r--lib/sqlalchemy/sql/compiler.py3
-rw-r--r--lib/sqlalchemy/sql/selectable.py9
8 files changed, 23 insertions, 19 deletions
diff --git a/doc/build/core/types.rst b/doc/build/core/types.rst
index a40363135..47145837f 100644
--- a/doc/build/core/types.rst
+++ b/doc/build/core/types.rst
@@ -9,7 +9,7 @@ SQLAlchemy provides abstractions for most common database data types,
and a mechanism for specifying your own custom data types.
The methods and attributes of type objects are rarely used directly.
-Type objects are supplied to :class:`~sqlalchemy.Table` definitions
+Type objects are supplied to :class:`~sqlalchemy.schema.Table` definitions
and can be supplied as type hints to `functions` for occasions where
the database driver returns an incorrect type.
@@ -24,7 +24,7 @@ the database driver returns an incorrect type.
SQLAlchemy will use the ``Integer`` and ``String(32)`` type
information when issuing a ``CREATE TABLE`` statement and will use it
again when reading back rows ``SELECTed`` from the database.
-Functions that accept a type (such as :func:`~sqlalchemy.Column`) will
+Functions that accept a type (such as :func:`~sqlalchemy.schema.Column`) will
typically accept a type class or instance; ``Integer`` is equivalent
to ``Integer()`` with no construction arguments in this case.
diff --git a/doc/build/orm/query.rst b/doc/build/orm/query.rst
index d83bdb6ae..5e31d710f 100644
--- a/doc/build/orm/query.rst
+++ b/doc/build/orm/query.rst
@@ -13,7 +13,7 @@ For an in-depth introduction to querying with the SQLAlchemy ORM, please see the
The Query Object
----------------
-:class:`~.Query` is produced in terms of a given :class:`~.Session`, using the :func:`~.Query.query` function::
+:class:`~.Query` is produced in terms of a given :class:`~.Session`, using the :meth:`~.Session.query` method::
q = session.query(SomeMappedClass)
diff --git a/doc/build/orm/tutorial.rst b/doc/build/orm/tutorial.rst
index 7289d5783..04c677cde 100644
--- a/doc/build/orm/tutorial.rst
+++ b/doc/build/orm/tutorial.rst
@@ -328,7 +328,7 @@ connect it to the :class:`~sqlalchemy.orm.session.Session` using
This custom-made :class:`~sqlalchemy.orm.session.Session` class will create
new :class:`~sqlalchemy.orm.session.Session` objects which are bound to our
database. Other transactional characteristics may be defined when calling
-:func:`~.sessionmaker` as well; these are described in a later
+:class:`~.sessionmaker` as well; these are described in a later
chapter. Then, whenever you need to have a conversation with the database, you
instantiate a :class:`~sqlalchemy.orm.session.Session`::
@@ -628,7 +628,7 @@ class:
<User(name='fred', fullname='Fred Flinstone', password='blah')> fred
You can control the names of individual column expressions using the
-:meth:`~.CompareMixin.label` construct, which is available from
+:meth:`~.ColumnElement.label` construct, which is available from
any :class:`.ColumnElement`-derived object, as well as any class attribute which
is mapped to one (such as ``User.name``):
@@ -646,7 +646,7 @@ is mapped to one (such as ``User.name``):
The name given to a full entity such as ``User``, assuming that multiple
entities are present in the call to :meth:`~.Session.query`, can be controlled using
-:class:`~.orm.aliased` :
+:func:`~.sqlalchemy.orm.aliased` :
.. sourcecode:: python+sql
diff --git a/lib/sqlalchemy/engine/interfaces.py b/lib/sqlalchemy/engine/interfaces.py
index 06c4fca62..386cd7621 100644
--- a/lib/sqlalchemy/engine/interfaces.py
+++ b/lib/sqlalchemy/engine/interfaces.py
@@ -812,7 +812,8 @@ class Connectable(object):
"object directly, i.e. :meth:`.Table.create`, "
":meth:`.Index.create`, :meth:`.MetaData.create_all`")
def create(self, entity, **kwargs):
- """Emit CREATE statements for the given schema entity."""
+ """Emit CREATE statements for the given schema entity.
+ """
raise NotImplementedError()
@@ -821,7 +822,8 @@ class Connectable(object):
"object directly, i.e. :meth:`.Table.drop`, "
":meth:`.Index.drop`, :meth:`.MetaData.drop_all`")
def drop(self, entity, **kwargs):
- """Emit DROP statements for the given schema entity."""
+ """Emit DROP statements for the given schema entity.
+ """
raise NotImplementedError()
diff --git a/lib/sqlalchemy/ext/compiler.py b/lib/sqlalchemy/ext/compiler.py
index 703475de7..6d97351ca 100644
--- a/lib/sqlalchemy/ext/compiler.py
+++ b/lib/sqlalchemy/ext/compiler.py
@@ -238,7 +238,7 @@ A synopsis is as follows:
class timestamp(ColumnElement):
type = TIMESTAMP()
-* :class:`~sqlalchemy.sql.expression.FunctionElement` - This is a hybrid of a
+* :class:`~sqlalchemy.sql.functions.FunctionElement` - This is a hybrid of a
``ColumnElement`` and a "from clause" like object, and represents a SQL
function or stored procedure type of call. Since most databases support
statements along the line of "SELECT FROM <some function>"
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py
index c9e7d444b..1b83f3fb8 100644
--- a/lib/sqlalchemy/orm/query.py
+++ b/lib/sqlalchemy/orm/query.py
@@ -921,7 +921,7 @@ class Query(object):
@_generative()
def with_session(self, session):
- """Return a :class:`Query` that will use the given :class:`.Session`.
+ """Return a :class:`.Query` that will use the given :class:`.Session`.
"""
@@ -1285,7 +1285,7 @@ class Query(object):
"""apply a HAVING criterion to the query and return the
newly resulting :class:`.Query`.
- :meth:`having` is used in conjunction with :meth:`group_by`.
+ :meth:`~.Query.having` is used in conjunction with :meth:`~.Query.group_by`.
HAVING criterion makes it possible to use filters on aggregate
functions like COUNT, SUM, AVG, MAX, and MIN, eg.::
@@ -1463,7 +1463,7 @@ class Query(object):
q = session.query(User).join(Address)
- The above calling form of :meth:`.join` will raise an error if
+ The above calling form of :meth:`~.Query.join` will raise an error if
either there are no foreign keys between the two entities, or if
there are multiple foreign key linkages between them. In the
above calling form, :meth:`~.Query.join` is called upon to
@@ -1632,7 +1632,7 @@ class Query(object):
A special two-argument calling form of the form ``target, onclause``
is also accepted.
:param aliased=False: If True, indicate that the JOIN target should be
- anonymously aliased. Subsequent calls to :class:`~.Query.filter`
+ anonymously aliased. Subsequent calls to :meth:`~.Query.filter`
and similar will adapt the incoming criterion to the target
alias, until :meth:`~.Query.reset_joinpoint` is called.
:param from_joinpoint=False: When using ``aliased=True``, a setting
@@ -2573,7 +2573,7 @@ class Query(object):
which normally occurs upon :meth:`.Session.commit` or can be forced
by using :meth:`.Session.expire_all`. Accessing an expired object
whose row has been deleted will invoke a SELECT to locate the
- row; when the row is not found, an :class:`.ObjectDeletedError`
+ row; when the row is not found, an :class:`~sqlalchemy.orm.exc.ObjectDeletedError`
is raised.
* The :meth:`.MapperEvents.before_delete` and
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index 4f3dbba36..59506edea 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -198,7 +198,8 @@ class Compiled(object):
@util.deprecated("0.7", ":class:`.Compiled` objects now compile "
"within the constructor.")
def compile(self):
- """Produce the internal string representation of this element."""
+ """Produce the internal string representation of this element.
+ """
pass
def _execute_on_connection(self, connection, multiparams, params):
diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py
index 550e250f1..f83cdf692 100644
--- a/lib/sqlalchemy/sql/selectable.py
+++ b/lib/sqlalchemy/sql/selectable.py
@@ -246,8 +246,8 @@ class FromClause(Selectable):
:param column: the target :class:`.ColumnElement` to be matched
:param require_embedded: only return corresponding columns for
- the given :class:`.ColumnElement`, if the given
- :class:`.ColumnElement` is actually present within a sub-element
+ the given :class:`.ColumnElement`, if the given :class:`.ColumnElement`
+ is actually present within a sub-element
of this :class:`.FromClause`. Normally the column will match if
it merely shares a common ancestor with one of the exported
columns of this :class:`.FromClause`.
@@ -756,7 +756,7 @@ class Join(FromClause):
ON table_b_1.id = table_c_1.b_id
) ON table_a_1.id = table_b_1.a_id
- The standalone :func:`experssion.alias` function as well as the
+ The standalone :func:`~.expression.alias` function as well as the
base :meth:`.FromClause.alias` method also support the ``flat=True``
argument as a no-op, so that the argument can be passed to the
``alias()`` method of any selectable.
@@ -1352,7 +1352,8 @@ class SelectBase(Executable, FromClause):
"'autocommit' flag.")
def autocommit(self):
"""return a new selectable with the 'autocommit' flag set to
- True."""
+ True.
+ """
self._execution_options = \
self._execution_options.union({'autocommit': True})