diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2013-06-09 14:39:30 -0700 |
---|---|---|
committer | mike bayer <mike_mp@zzzcomputing.com> | 2013-06-09 14:39:30 -0700 |
commit | decf47a770b21da4bc66ad82d077fe069a1519f7 (patch) | |
tree | 3c65939dca50566498d0af1a2092fa51177d046e /lib/sqlalchemy/engine/interfaces.py | |
parent | 65f5887e9a824ee1b50592325fd9f6cf6d1639f8 (diff) | |
parent | c69fe4acf8929856735e5d90adb7f6b6d5ebcd46 (diff) | |
download | sqlalchemy-decf47a770b21da4bc66ad82d077fe069a1519f7.tar.gz |
Merge pull request #4 from malor/reflect_constraints
Add basic support of unique constraints reflection
Diffstat (limited to 'lib/sqlalchemy/engine/interfaces.py')
-rw-r--r-- | lib/sqlalchemy/engine/interfaces.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/sqlalchemy/engine/interfaces.py b/lib/sqlalchemy/engine/interfaces.py index f623a2a61..d5fe5c5e2 100644 --- a/lib/sqlalchemy/engine/interfaces.py +++ b/lib/sqlalchemy/engine/interfaces.py @@ -338,6 +338,25 @@ class Dialect(object): raise NotImplementedError() + def get_unique_constraints(self, table_name, schema=None, **kw): + """Return information about unique constraints in `table_name`. + + Given a string `table_name` and an optional string `schema`, return + unique constraint information as a list of dicts with these keys: + + name + the unique constraint's name + + column_names + list of column names in order + + \**kw + other options passed to the dialect's get_unique_constraints() method. + + """ + + raise NotImplementedError() + def normalize_name(self, name): """convert the given name to lowercase if it is detected as case insensitive. |