summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-09-22 23:48:17 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-09-22 23:48:17 -0400
commit30e4b186f2f9ec00eb9b9fbab4463894a730f57f (patch)
treeb9aa6a5fe76ea4e45e6b5abb53c57c1c1bf42701 /lib/sqlalchemy/orm
parenteae4de02a9b9bcf070a12607ada4098fb63e26f2 (diff)
downloadsqlalchemy-30e4b186f2f9ec00eb9b9fbab4463894a730f57f.tar.gz
doc edits
Diffstat (limited to 'lib/sqlalchemy/orm')
-rw-r--r--lib/sqlalchemy/orm/query.py13
-rw-r--r--lib/sqlalchemy/orm/session.py9
2 files changed, 13 insertions, 9 deletions
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py
index cba3e7619..2d3f61da7 100644
--- a/lib/sqlalchemy/orm/query.py
+++ b/lib/sqlalchemy/orm/query.py
@@ -498,7 +498,12 @@ class Query(object):
@property
def whereclause(self):
- """The WHERE criterion for this Query."""
+ """A readonly attribute which returns the current WHERE criterion for this Query.
+
+ This returned value is a SQL expression construct, or ``None`` if no
+ criterion has been established.
+
+ """
return self._criterion
@_generative()
@@ -2028,8 +2033,7 @@ class Query(object):
Also, the ``before_delete()`` and ``after_delete()``
:class:`~sqlalchemy.orm.interfaces.MapperExtension` methods are not
called from this method. For a delete hook here, use the
- ``after_bulk_delete()``
- :class:`~sqlalchemy.orm.interfaces.MapperExtension` method.
+ :meth:`.SessionExtension.after_bulk_delete()` event hook.
"""
#TODO: lots of duplication and ifs - probably needs to be
@@ -2154,8 +2158,7 @@ class Query(object):
Also, the ``before_update()`` and ``after_update()``
:class:`~sqlalchemy.orm.interfaces.MapperExtension` methods are not
called from this method. For an update hook here, use the
- ``after_bulk_update()``
- :class:`~sqlalchemy.orm.interfaces.SessionExtension` method.
+ :meth:`.SessionExtension.after_bulk_update()` event hook.
"""
diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py
index d97ef87e7..95d29812e 100644
--- a/lib/sqlalchemy/orm/session.py
+++ b/lib/sqlalchemy/orm/session.py
@@ -106,13 +106,13 @@ def sessionmaker(bind=None, class_=None, autoflush=True, autocommit=False,
The full resolution is described in the ``get_bind()`` method of
``Session``. Usage looks like::
- sess = Session(binds={
+ Session = sessionmaker(binds={
SomeMappedClass: create_engine('postgresql://engine1'),
somemapper: create_engine('postgresql://engine2'),
some_table: create_engine('postgresql://engine3'),
})
- Also see the ``bind_mapper()`` and ``bind_table()`` methods.
+ Also see the :meth:`.Session.bind_mapper` and :meth:`.Session.bind_table` methods.
:param \class_: Specify an alternate class other than
``sqlalchemy.orm.session.Session`` which should be used by the returned
@@ -143,8 +143,9 @@ def sessionmaker(bind=None, class_=None, autoflush=True, autocommit=False,
as returned by the ``query()`` method. Defaults to
:class:`~sqlalchemy.orm.query.Query`.
- :param twophase: When ``True``, all transactions will be started using
- :mod:`~sqlalchemy.engine_TwoPhaseTransaction`. During a ``commit()``,
+ :param twophase: When ``True``, all transactions will be started as
+ a "two phase" transaction, i.e. using the "two phase" semantics
+ of the database in use along with an XID. During a ``commit()``,
after ``flush()`` has been issued for all attached databases, the
``prepare()`` method on each database's ``TwoPhaseTransaction`` will
be called. This allows each database to roll back the entire