diff options
| author | Gord Thompson <gord@gordthompson.com> | 2021-04-08 17:22:34 -0600 |
|---|---|---|
| committer | Gord Thompson <gord@gordthompson.com> | 2021-04-09 07:33:36 -0600 |
| commit | a14303639e03fd295edf1f5fabf6d20b05b1870b (patch) | |
| tree | 72626bfe996954a6b30dde205cba97a66402bed1 /lib/sqlalchemy | |
| parent | d868f7914cd0617d529a6067e8ec7843692f8937 (diff) | |
| download | sqlalchemy-a14303639e03fd295edf1f5fabf6d20b05b1870b.tar.gz | |
Make schema support explicit
Add ``supports_schema = True`` to DefaultDialect and modify
requirements.py to use that attribute so third-party dialects
can explicitly indicate that they do *not* support schemas by
specifying ``supports_schema = False`` in their Dialect class.
Change-Id: Idffee82f6668a15ac7148f2a407a17de785d1fb7
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/engine/default.py | 1 | ||||
| -rw-r--r-- | lib/sqlalchemy/testing/requirements.py | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index 0242d9812..d45b6d7a7 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -68,6 +68,7 @@ class DefaultDialect(interfaces.Dialect): # not cx_oracle. execute_sequence_format = tuple + supports_schemas = True supports_views = True supports_sequences = False sequences_optional = False diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index b6381dd57..f82d5f065 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -19,6 +19,7 @@ import platform import sys from . import exclusions +from . import only_on from .. import util from ..pool import QueuePool @@ -473,7 +474,7 @@ class SuiteRequirements(Requirements): """Target database must support external schemas, and have one named 'test_schema'.""" - return exclusions.closed() + return only_on(lambda config: config.db.dialect.supports_schemas) @property def cross_schema_fk_reflection(self): |
