diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-01-08 22:11:09 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-01-08 22:12:25 -0500 |
commit | 89facbed8855d1443dbe37919ff0645aea640ed0 (patch) | |
tree | 33e7ab15470a5f3a76b748418e6be0c62aa1eaba /lib/sqlalchemy/engine/strategies.py | |
parent | 777e25694f1567ff61655d86a91be6264186c13e (diff) | |
download | sqlalchemy-89facbed8855d1443dbe37919ff0645aea640ed0.tar.gz |
- Multi-tenancy schema translation for :class:`.Table` objects is added.
This supports the use case of an application that uses the same set of
:class:`.Table` objects in many schemas, such as schema-per-user.
A new execution option
:paramref:`.Connection.execution_options.schema_translate_map` is
added. fixes #2685
- latest tox doesn't like the {posargs} in the profile rerunner
Diffstat (limited to 'lib/sqlalchemy/engine/strategies.py')
-rw-r--r-- | lib/sqlalchemy/engine/strategies.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/engine/strategies.py b/lib/sqlalchemy/engine/strategies.py index 0d0414ed1..cb3e6fa8a 100644 --- a/lib/sqlalchemy/engine/strategies.py +++ b/lib/sqlalchemy/engine/strategies.py @@ -233,6 +233,9 @@ class MockEngineStrategy(EngineStrategy): dialect = property(attrgetter('_dialect')) name = property(lambda s: s._dialect.name) + def _get_effective_schema(self, table): + return table.schema + def contextual_connect(self, **kwargs): return self |