summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/orm')
-rw-r--r--lib/sqlalchemy/orm/__init__.py20
-rw-r--r--lib/sqlalchemy/orm/attributes.py4
-rw-r--r--lib/sqlalchemy/orm/deprecated_interfaces.py2
-rw-r--r--lib/sqlalchemy/orm/descriptor_props.py4
-rw-r--r--lib/sqlalchemy/orm/events.py2
-rw-r--r--lib/sqlalchemy/orm/properties.py2
-rw-r--r--lib/sqlalchemy/orm/query.py8
-rw-r--r--lib/sqlalchemy/orm/session.py4
8 files changed, 23 insertions, 23 deletions
diff --git a/lib/sqlalchemy/orm/__init__.py b/lib/sqlalchemy/orm/__init__.py
index 4de507fa5..6e4a552c9 100644
--- a/lib/sqlalchemy/orm/__init__.py
+++ b/lib/sqlalchemy/orm/__init__.py
@@ -114,7 +114,7 @@ def scoped_session(session_factory, scopefunc=None):
:class:`.ScopedSession`.
:param session_factory: a callable function that produces
- :class:`Session` instances, such as :func:`sessionmaker`.
+ :class:`.Session` instances, such as :func:`sessionmaker`.
:param scopefunc: Optional "scope" function which would be
passed to the :class:`.ScopedRegistry`. If None, the
@@ -153,7 +153,7 @@ def create_session(bind=None, **kwargs):
:class:`~sqlalchemy.orm.session.Session`.
:param \*\*kwargs: optional, passed through to the
- :class:`Session` constructor.
+ :class:`.Session` constructor.
:returns: an :class:`~sqlalchemy.orm.session.Session` instance
@@ -183,7 +183,7 @@ def relationship(argument, secondary=None, **kwargs):
:func:`relation` prior to version 0.6.
This corresponds to a parent-child or associative table relationship. The
- constructed class is an instance of :class:`RelationshipProperty`.
+ constructed class is an instance of :class:`.RelationshipProperty`.
A typical :func:`relationship`::
@@ -192,7 +192,7 @@ def relationship(argument, secondary=None, **kwargs):
})
:param argument:
- a class or :class:`Mapper` instance, representing the target of
+ a class or :class:`.Mapper` instance, representing the target of
the relationship.
:param secondary:
@@ -283,7 +283,7 @@ def relationship(argument, secondary=None, **kwargs):
:ref:`custom_collections`.
:param comparator_factory:
- a class which extends :class:`RelationshipProperty.Comparator` which
+ a class which extends :class:`.RelationshipProperty.Comparator` which
provides custom SQL clause generation for comparison operations.
:param doc:
@@ -539,7 +539,7 @@ def dynamic_loader(argument, secondary=None, primaryjoin=None,
"""Construct a dynamically-loading mapper property.
This property is similar to :func:`relationship`, except read
- operations return an active :class:`Query` object which reads from
+ operations return an active :class:`.Query` object which reads from
the database when accessed. Items may be appended to the
attribute via ``append()``, or removed via ``remove()``; changes
will be persisted to the database during a :meth:`Sesion.flush`.
@@ -550,7 +550,7 @@ def dynamic_loader(argument, secondary=None, primaryjoin=None,
here.
:param argument:
- a class or :class:`Mapper` instance, representing the target of
+ a class or :class:`.Mapper` instance, representing the target of
the relationship.
:param secondary:
@@ -688,7 +688,7 @@ def backref(name, **kwargs):
return (name, kwargs)
def deferred(*columns, **kwargs):
- """Return a :class:`DeferredColumnProperty`, which indicates this
+ """Return a :class:`.DeferredColumnProperty`, which indicates this
object attributes should only be loaded from its corresponding
table column when first accessed.
@@ -777,7 +777,7 @@ def mapper(class_, local_table=None, *args, **params):
condition contains no ForeignKey columns, specify the "foreign"
columns of the join condition in this list. else leave as None.
- :param non_primary: Construct a :class:`Mapper` that will define only
+ :param non_primary: Construct a :class:`.Mapper` that will define only
the selection of instances, not their persistence. Any number of
non_primary mappers may be created for a particular class.
@@ -845,7 +845,7 @@ def mapper(class_, local_table=None, *args, **params):
that will be used to keep a running version id of mapped entities
in the database. this is used during save operations to ensure that
no other thread or process has updated the instance during the
- lifetime of the entity, else a :class:`StaleDataError` exception is
+ lifetime of the entity, else a :class:`.StaleDataError` exception is
thrown.
:param version_id_generator: A callable which defines the algorithm
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py
index 437de685c..ead62d1fe 100644
--- a/lib/sqlalchemy/orm/attributes.py
+++ b/lib/sqlalchemy/orm/attributes.py
@@ -1000,7 +1000,7 @@ class History(tuple):
return self != HISTORY_BLANK
def empty(self):
- """Return True if this :class:`History` has no changes
+ """Return True if this :class:`.History` has no changes
and no existing, unchanged state.
"""
@@ -1030,7 +1030,7 @@ class History(tuple):
(self.deleted or [])
def has_changes(self):
- """Return True if this :class:`History` has changes."""
+ """Return True if this :class:`.History` has changes."""
return bool(self.added or self.deleted)
diff --git a/lib/sqlalchemy/orm/deprecated_interfaces.py b/lib/sqlalchemy/orm/deprecated_interfaces.py
index 9ebf9a57e..d5a9ab9c6 100644
--- a/lib/sqlalchemy/orm/deprecated_interfaces.py
+++ b/lib/sqlalchemy/orm/deprecated_interfaces.py
@@ -521,7 +521,7 @@ class AttributeExtension(object):
'bar':relationship(Bar, extension=MyAttrExt())
})
- Note that the :class:`AttributeExtension` methods
+ Note that the :class:`.AttributeExtension` methods
:meth:`~.AttributeExtension.append` and
:meth:`~.AttributeExtension.set` need to return the
``value`` parameter. The returned value is used as the
diff --git a/lib/sqlalchemy/orm/descriptor_props.py b/lib/sqlalchemy/orm/descriptor_props.py
index 634da34f1..5ad148a7e 100644
--- a/lib/sqlalchemy/orm/descriptor_props.py
+++ b/lib/sqlalchemy/orm/descriptor_props.py
@@ -19,7 +19,7 @@ from sqlalchemy.sql import expression
properties = util.importlater('sqlalchemy.orm', 'properties')
class DescriptorProperty(MapperProperty):
- """:class:`MapperProperty` which proxies access to a
+ """:class:`.MapperProperty` which proxies access to a
user-defined descriptor."""
doc = None
@@ -290,7 +290,7 @@ class CompositeProperty(DescriptorProperty):
return str(self.parent.class_.__name__) + "." + self.key
class ConcreteInheritedProperty(DescriptorProperty):
- """A 'do nothing' :class:`MapperProperty` that disables
+ """A 'do nothing' :class:`.MapperProperty` that disables
an attribute on a concrete subclass that is only present
on the inherited mapper, not the concrete classes' mapper.
diff --git a/lib/sqlalchemy/orm/events.py b/lib/sqlalchemy/orm/events.py
index fdbee98b3..8c12e72b1 100644
--- a/lib/sqlalchemy/orm/events.py
+++ b/lib/sqlalchemy/orm/events.py
@@ -919,7 +919,7 @@ class AttributeEvents(event.Events):
listen(UserContact.phone, 'set', validate_phone, retval=True)
A validation function like the above can also raise an exception
- such as :class:`ValueError` to halt the operation.
+ such as :class:`.ValueError` to halt the operation.
Several modifiers are available to the :func:`~.event.listen` function.
diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py
index 969905641..c73aaeb00 100644
--- a/lib/sqlalchemy/orm/properties.py
+++ b/lib/sqlalchemy/orm/properties.py
@@ -787,7 +787,7 @@ class RelationshipProperty(StrategizedProperty):
Make several attempts to determine if cols are compared using
"=" or other comparators (in which case suggest viewonly),
columns are present but not part of the expected mappings, columns
- don't have any :class:`ForeignKey` information on them, or
+ don't have any :class:`.ForeignKey` information on them, or
the ``foreign_keys`` attribute is being used incorrectly.
"""
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py
index 534985084..dcfbf3b32 100644
--- a/lib/sqlalchemy/orm/query.py
+++ b/lib/sqlalchemy/orm/query.py
@@ -696,7 +696,7 @@ class Query(object):
@_generative()
def populate_existing(self):
- """Return a :class:`Query` that will expire and refresh all instances
+ """Return a :class:`.Query` that will expire and refresh all instances
as they are loaded, or reused from the current :class:`.Session`.
:meth:`.populate_existing` does not improve behavior when
@@ -900,12 +900,12 @@ class Query(object):
@_generative()
def with_hint(self, selectable, text, dialect_name='*'):
"""Add an indexing hint for the given entity or selectable to
- this :class:`Query`.
+ this :class:`.Query`.
Functionality is passed straight through to
:meth:`~sqlalchemy.sql.expression.Select.with_hint`,
with the addition that ``selectable`` can be a
- :class:`Table`, :class:`Alias`, or ORM entity / mapped class
+ :class:`.Table`, :class:`.Alias`, or ORM entity / mapped class
/etc.
"""
mapper, selectable, is_aliased_class = _entity_info(selectable)
@@ -1755,7 +1755,7 @@ class Query(object):
@property
def column_descriptions(self):
"""Return metadata about the columns which would be
- returned by this :class:`Query`.
+ returned by this :class:`.Query`.
Format is a list of dictionaries::
diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py
index eb148bc78..baf3b6d42 100644
--- a/lib/sqlalchemy/orm/session.py
+++ b/lib/sqlalchemy/orm/session.py
@@ -961,7 +961,7 @@ class Session(object):
To expire individual objects and individual attributes
on those objects, use :meth:`Session.expire`.
- The :class:`Session` object's default behavior is to
+ The :class:`.Session` object's default behavior is to
expire all state whenever the :meth:`Session.rollback`
or :meth:`Session.commit` methods are called, so that new
state can be loaded for the new transaction. For this reason,
@@ -986,7 +986,7 @@ class Session(object):
To expire all objects in the :class:`.Session` simultaneously,
use :meth:`Session.expire_all`.
- The :class:`Session` object's default behavior is to
+ The :class:`.Session` object's default behavior is to
expire all state whenever the :meth:`Session.rollback`
or :meth:`Session.commit` methods are called, so that new
state can be loaded for the new transaction. For this reason,