diff options
author | Diana Clarke <diana.joan.clarke@gmail.com> | 2012-04-02 21:07:37 -0400 |
---|---|---|
committer | Diana Clarke <diana.joan.clarke@gmail.com> | 2012-04-02 21:07:37 -0400 |
commit | 3cbe90efbebd38c570a137d2801753e3aa55823b (patch) | |
tree | ffdde3e783fc511d9f71c24afa69038b9177413d /lib/sqlalchemy/engine/base.py | |
parent | 47a799ecd5d03b78e5d67918302c0da2950d27b8 (diff) | |
download | sqlalchemy-3cbe90efbebd38c570a137d2801753e3aa55823b.tar.gz |
deprecate inspector.get_primary_keys() in favor of inspector.get_pk_constraint()
- see #2422
Diffstat (limited to 'lib/sqlalchemy/engine/base.py')
-rw-r--r-- | lib/sqlalchemy/engine/base.py | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index 1f28501f7..10ce6d819 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -259,22 +259,13 @@ class Dialect(object): raise NotImplementedError() - def get_primary_keys(self, connection, table_name, schema=None, **kw): - """Return information about primary keys in `table_name`. - - Given a :class:`.Connection`, a string - `table_name`, and an optional string `schema`, return primary - key information as a list of column names. - - """ - raise NotImplementedError() - - def get_pk_constraint(self, table_name, schema=None, **kw): + def get_pk_constraint(self, connection, table_name, schema=None, **kw): """Return information about the primary key constraint on table_name`. - Given a string `table_name`, and an optional string `schema`, return - primary key information as a dictionary with these keys: + Given a :class:`.Connection`, a string + `table_name`, and an optional string `schema`, return primary + key information as a dictionary with these keys: constrained_columns a list of column names that make up the primary key |