diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-08-02 12:34:16 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-08-06 18:05:45 -0400 |
commit | 00b5c10846e800304caa86549ab9da373b42fa5d (patch) | |
tree | 0832401deebeaad5fd6edc99158d0b10f958e716 /lib/sqlalchemy/engine/interfaces.py | |
parent | e091775f1c4c817093e9a936a3abc79b5e311f93 (diff) | |
download | sqlalchemy-00b5c10846e800304caa86549ab9da373b42fa5d.tar.gz |
Modernize internal reflection
- Deprecated remaining engine-level introspection and utility methods
including :meth:`.Engine.run_callable`, :meth:`.Engine.transaction`,
:meth:`.Engine.table_names`, :meth:`.Engine.has_table`. The utility
methods are superseded by modern context-manager patterns, and the table
introspection tasks are suited by the :class:`.Inspector` object.
- The internal dialect method ``Dialect.reflecttable`` has been removed. A
review of third party dialects has not found any making use of this method,
as it was already documented as one that should not be used by external
dialects. Additionally, the private ``Engine._run_visitor`` method
is also removed.
- The long-deprecated ``Inspector.get_table_names.order_by`` parameter has
been removed.
- The :paramref:`.Table.autoload_with` parameter now accepts an :class:`.Inspector` object
directly, as well as any :class:`.Engine` or :class:`.Connection` as was the case before.
Fixes: #4755
Change-Id: Iec3a8b0f3e298ba87d532b16fac1e1132f464e21
Diffstat (limited to 'lib/sqlalchemy/engine/interfaces.py')
-rw-r--r-- | lib/sqlalchemy/engine/interfaces.py | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/lib/sqlalchemy/engine/interfaces.py b/lib/sqlalchemy/engine/interfaces.py index 4a63e3d84..5bd3b1d3e 100644 --- a/lib/sqlalchemy/engine/interfaces.py +++ b/lib/sqlalchemy/engine/interfaces.py @@ -196,28 +196,6 @@ class Dialect(object): pass - def reflecttable( - self, connection, table, include_columns, exclude_columns, resolve_fks - ): - """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. - - 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. - - """ - - raise NotImplementedError() - def get_columns(self, connection, table_name, schema=None, **kw): """Return information about columns in `table_name`. @@ -450,7 +428,7 @@ class Dialect(object): """ raise NotImplementedError() - def has_table(self, connection, table_name, schema=None): + def has_table(self, connection, table_name, schema=None, **kw): """Check the existence of a particular table in the database. Given a :class:`.Connection` object and a string @@ -461,7 +439,7 @@ class Dialect(object): raise NotImplementedError() - def has_sequence(self, connection, sequence_name, schema=None): + def has_sequence(self, connection, sequence_name, schema=None, **kw): """Check the existence of a particular sequence in the database. Given a :class:`.Connection` object and a string |