summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/interfaces.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-10-11 12:48:46 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-10-11 12:48:46 -0400
commit5f0b864ad02409cf668fa7db5cbac99ac6ffc329 (patch)
treeb5f695e1fe739f65c38245a4ee83b48df0464591 /lib/sqlalchemy/engine/interfaces.py
parente74627f827542044c1d2087be95e41d4b1b46f24 (diff)
downloadsqlalchemy-5f0b864ad02409cf668fa7db5cbac99ac6ffc329.tar.gz
- The method signature of :meth:`.Dialect.reflecttable`, which in
all known cases is provided by :class:`.DefaultDialect`, has been tightened to expect ``include_columns`` and ``exclude_columns`` arguments without any kw option, reducing ambiguity - previously ``exclude_columns`` was missing. [ticket:2748]
Diffstat (limited to 'lib/sqlalchemy/engine/interfaces.py')
-rw-r--r--lib/sqlalchemy/engine/interfaces.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/sqlalchemy/engine/interfaces.py b/lib/sqlalchemy/engine/interfaces.py
index c94af5b1c..06c4fca62 100644
--- a/lib/sqlalchemy/engine/interfaces.py
+++ b/lib/sqlalchemy/engine/interfaces.py
@@ -193,19 +193,21 @@ class Dialect(object):
pass
- def reflecttable(self, connection, table, include_columns=None):
+ def reflecttable(self, connection, table, include_columns, exclude_columns):
"""Load table description from the database.
Given a :class:`.Connection` and a
:class:`~sqlalchemy.schema.Table` object, reflect its columns and
- properties from the database. If include_columns (a list or
- set) is specified, limit the autoload to the given column
- names.
+ properties from the database.
- The default implementation uses the
- :class:`~sqlalchemy.engine.reflection.Inspector` interface to
- provide the output, building upon the granular table/column/
- constraint etc. methods of :class:`.Dialect`.
+ The implementation of this method is provided by
+ :meth:`.DefaultDialect.reflecttable`, which makes use of
+ :class:`.Inspector` to retrieve column information.
+
+ Dialects should **not** seek to implement this method, and should
+ instead implement individual schema inspection operations such as
+ :meth:`.Dialect.get_columns`, :meth:`.Dialect.get_pk_constraint`,
+ etc.
"""
@@ -248,7 +250,7 @@ class Dialect(object):
Deprecated. This method is only called by the default
implementation of :meth:`.Dialect.get_pk_constraint`. Dialects should
- instead implement this method directly.
+ instead implement the :meth:`.Dialect.get_pk_constraint` method directly.
"""