summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-04-14 16:39:42 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-04-14 16:39:42 -0400
commit447c0750e1f739c4db1d0d20de182c297dc86e36 (patch)
treef3fc94e0871fb34205fc5695f82d882bea554839 /lib/sqlalchemy/ext
parentd9b230e78c70c17a6856f4ff3b8380b9ce510702 (diff)
downloadsqlalchemy-447c0750e1f739c4db1d0d20de182c297dc86e36.tar.gz
Set up absolute references for create_engine and related
includes more replacements for create_engine(), Connection, disambiguation of Result from future/baked Change-Id: Icb60a79ee7a6c45ea9056c211ffd1be110da3b5e
Diffstat (limited to 'lib/sqlalchemy/ext')
-rw-r--r--lib/sqlalchemy/ext/baked.py11
-rw-r--r--lib/sqlalchemy/ext/horizontal_shard.py8
2 files changed, 12 insertions, 7 deletions
diff --git a/lib/sqlalchemy/ext/baked.py b/lib/sqlalchemy/ext/baked.py
index 839aae730..e5e31c1f9 100644
--- a/lib/sqlalchemy/ext/baked.py
+++ b/lib/sqlalchemy/ext/baked.py
@@ -112,7 +112,8 @@ class BakedQuery(object):
return self
def with_criteria(self, fn, *args):
- """Add a criteria function to a :class:`.BakedQuery` cloned from this one.
+ """Add a criteria function to a :class:`.BakedQuery` cloned from this
+ one.
This is equivalent to using the ``+`` operator to
produce a new :class:`.BakedQuery` with modifications.
@@ -121,7 +122,8 @@ class BakedQuery(object):
return self._clone().add_criteria(fn, *args)
def for_session(self, session):
- """Return a :class:`.Result` object for this :class:`.BakedQuery`.
+ """Return a :class:`_baked.Result` object for this
+ :class:`.BakedQuery`.
This is equivalent to calling the :class:`.BakedQuery` as a
Python callable, e.g. ``result = my_baked_query(session)``.
@@ -358,7 +360,7 @@ class BakedQuery(object):
class Result(object):
"""Invokes a :class:`.BakedQuery` against a :class:`.Session`.
- The :class:`.Result` object is where the actual :class:`.query.Query`
+ The :class:`_baked.Result` object is where the actual :class:`.query.Query`
object gets created, or retrieved from the cache,
against a target :class:`.Session`, and is then invoked for results.
@@ -399,7 +401,8 @@ class Result(object):
that **do not affect the SQL output**, such as execution options
and shard identifiers (when using a shard-enabled query object)
- .. warning:: :meth:`.Result.with_post_criteria` functions are applied
+ .. warning:: :meth:`_baked.Result.with_post_criteria`
+ functions are applied
to the :class:`_query.Query`
object **after** the query's SQL statement
object has been retrieved from the cache. Any operations here
diff --git a/lib/sqlalchemy/ext/horizontal_shard.py b/lib/sqlalchemy/ext/horizontal_shard.py
index cfb2fd687..04491911e 100644
--- a/lib/sqlalchemy/ext/horizontal_shard.py
+++ b/lib/sqlalchemy/ext/horizontal_shard.py
@@ -120,13 +120,15 @@ class ShardedQuery(Query):
class ShardedResult(object):
- """A value object that represents multiple :class:`.ResultProxy` objects.
+ """A value object that represents multiple :class:`_engine.ResultProxy`
+ objects.
This is used by the :meth:`.ShardedQuery._execute_crud` hook to return
- an object that takes the place of the single :class:`.ResultProxy`.
+ an object that takes the place of the single :class:`_engine.ResultProxy`.
Attribute include ``result_proxies``, which is a sequence of the
- actual :class:`.ResultProxy` objects, as well as ``aggregate_rowcount``
+ actual :class:`_engine.ResultProxy` objects,
+ as well as ``aggregate_rowcount``
or ``rowcount``, which is the sum of all the individual rowcount values.
.. versionadded:: 1.3