diff options
author | Alex Grönholm <alex.gronholm@nextday.fi> | 2016-04-11 17:01:42 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-06-01 12:57:36 -0400 |
commit | a8e7bb8782ca8fd858ac036082104b4ac2991cfc (patch) | |
tree | c3b2a3c1e68b364e33feacd91221b405c6ad737f /lib/sqlalchemy/engine/interfaces.py | |
parent | 3f55039e7f15efafacc3e8e0fbf0ba38fa612b09 (diff) | |
download | sqlalchemy-a8e7bb8782ca8fd858ac036082104b4ac2991cfc.tar.gz |
Implemented CHECK constraint reflection for SQLite and PostgreSQL
Co-Authored-By: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: Ie6cf2d2958d1c567324db9e08fef2d3186e97350
Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/80
Diffstat (limited to 'lib/sqlalchemy/engine/interfaces.py')
-rw-r--r-- | lib/sqlalchemy/engine/interfaces.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/sqlalchemy/engine/interfaces.py b/lib/sqlalchemy/engine/interfaces.py index 26731f9a5..13e8bf1f4 100644 --- a/lib/sqlalchemy/engine/interfaces.py +++ b/lib/sqlalchemy/engine/interfaces.py @@ -399,6 +399,29 @@ class Dialect(object): raise NotImplementedError() + def get_check_constraints( + self, connection, table_name, schema=None, **kw): + """Return information about check constraints in `table_name`. + + Given a string `table_name` and an optional string `schema`, return + check constraint information as a list of dicts with these keys: + + name + the check constraint's name + + sqltext + the check constraint's SQL expression + + \**kw + other options passed to the dialect's get_check_constraints() + method. + + .. versionadded:: 1.1.0 + + """ + + raise NotImplementedError() + def normalize_name(self, name): """convert the given name to lowercase if it is detected as case insensitive. |