summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2016-06-02 17:48:13 -0400
committerGerrit Code Review <gerrit2@ln3.zzzcomputing.com>2016-06-02 17:48:13 -0400
commit59d90c95a133ee6b4a4db8ed61c699956eb33e9f (patch)
treed5736a8e7fe727973300ef773d7ba79ecfed295a /lib/sqlalchemy
parentad09d28e809357da9435ca2b17d5e9198d4266bf (diff)
parentcafebe160434973d07b1fa3412064c2870d781f2 (diff)
downloadsqlalchemy-59d90c95a133ee6b4a4db8ed61c699956eb33e9f.tar.gz
Merge "Add schema argument to AutomapBase.prepare()"
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/ext/automap.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/sqlalchemy/ext/automap.py b/lib/sqlalchemy/ext/automap.py
index bb1c5da3d..23ad56b76 100644
--- a/lib/sqlalchemy/ext/automap.py
+++ b/lib/sqlalchemy/ext/automap.py
@@ -695,6 +695,7 @@ class AutomapBase(object):
cls,
engine=None,
reflect=False,
+ schema=None,
classname_for_table=classname_for_table,
collection_class=list,
name_for_scalar_relationship=name_for_scalar_relationship,
@@ -735,10 +736,19 @@ class AutomapBase(object):
when a new :func:`.relationship` object is created that represents a
collection. Defaults to ``list``.
+ :param schema: When present in conjunction with the
+ :paramref:`.AutomapBase.prepare.reflect` flag, is passed to
+ :meth:`.MetaData.reflect` to indicate the primary schema where tables
+ should be reflected from. When omitted, the default schema in use
+ by the database connection is used.
+
+ .. versionadded:: 1.1
+
"""
if reflect:
cls.metadata.reflect(
engine,
+ schema=schema,
extend_existing=True,
autoload_replace=False
)