summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-01-17 18:00:01 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2010-01-17 18:00:01 +0000
commit943259264f2e8aea2ab40d52ba5f3235269f9c09 (patch)
treebe9a74bac66f0a63105c745511ba6e016eefc7ce /lib/sqlalchemy/engine/base.py
parentabccc0624228def744b0382e84f01cf95e0d3aed (diff)
downloadsqlalchemy-943259264f2e8aea2ab40d52ba5f3235269f9c09.tar.gz
doc updates partially from [ticket:1651]
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
-rw-r--r--lib/sqlalchemy/engine/base.py26
1 files changed, 19 insertions, 7 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py
index 564fa50a9..2210ba408 100644
--- a/lib/sqlalchemy/engine/base.py
+++ b/lib/sqlalchemy/engine/base.py
@@ -173,7 +173,7 @@ class Dialect(object):
"""Transform a generic type to a dialect-specific type.
Dialect classes will usually use the
- :func:`~sqlalchemy.types.adapt_type` method in the types module to
+ :func:`~sqlalchemy.types.adapt_type` function in the types module to
make this job easy.
The returned result is cached *per dialect class* so can
@@ -581,6 +581,19 @@ class ExecutionContext(object):
raise NotImplementedError()
+ def get_rowcount(self):
+ """Return the number of rows produced (by a SELECT query)
+ or affected (by an INSERT/UPDATE/DELETE statement).
+
+ Note that this row count may not be properly implemented
+ in some dialects; this is indicated by the
+ ``supports_sane_rowcount`` and ``supports_sane_multi_rowcount``
+ dialect attributes.
+
+ """
+
+ raise NotImplementedError()
+
class Compiled(object):
"""Represent a compiled SQL or DDL expression.
@@ -1767,13 +1780,12 @@ class ResultProxy(object):
uses and is not intended to provide the number of rows
present from a SELECT.
- Additionally, this value is only meaningful if the
- dialect's supports_sane_rowcount flag is True for
- single-parameter executions, or supports_sane_multi_rowcount
- is true for multiple parameter executions - otherwise
- results are undefined.
+ Note that this row count may not be properly implemented
+ in some dialects; this is indicated by
+ :meth:`~sqlalchemy.engine.base.ResultProxy.supports_sane_rowcount()` and
+ :meth:`~sqlalchemy.engine.base.ResultProxy.supports_sane_multi_rowcount()`.
- rowcount may not work at this time for a statement
+ ``rowcount()`` also may not work at this time for a statement
that uses ``returning()``.
"""