summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sqlalchemy/dialects/mysql/base.py4
-rw-r--r--lib/sqlalchemy/dialects/oracle/base.py7
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py6
-rw-r--r--lib/sqlalchemy/ext/declarative/extensions.py2
4 files changed, 9 insertions, 10 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py
index b5fb0933b..e4cfa79df 100644
--- a/lib/sqlalchemy/dialects/mysql/base.py
+++ b/lib/sqlalchemy/dialects/mysql/base.py
@@ -723,7 +723,7 @@ reflection will not include foreign keys. For these tables, you may supply a
Table('mytable', metadata,
ForeignKeyConstraint(['other_id'], ['othertable.other_id']),
- autoload=True
+ autoload_with=engine
)
.. seealso::
@@ -748,7 +748,7 @@ When reflecting these constructs, the
and the :meth:`_reflection.Inspector.get_unique_constraints`
methods will **both**
return an entry for a UNIQUE index in MySQL / MariaDB. However, when performing
-full table reflection using ``Table(..., autoload=True)``,
+full table reflection using ``Table(..., autoload_with=engine)``,
the :class:`.UniqueConstraint` construct is
**not** part of the fully reflected :class:`_schema.Table` construct under any
circumstances; this construct is always represented by a :class:`.Index`
diff --git a/lib/sqlalchemy/dialects/oracle/base.py b/lib/sqlalchemy/dialects/oracle/base.py
index 4e195d9ce..3ead97faf 100644
--- a/lib/sqlalchemy/dialects/oracle/base.py
+++ b/lib/sqlalchemy/dialects/oracle/base.py
@@ -68,11 +68,11 @@ to a Column construct::
Column(...), ...
)
-This step is also required when using table reflection, i.e. autoload=True::
+This step is also required when using table reflection, i.e. autoload_with=engine::
t = Table('mytable', metadata,
Column('id', Integer, Sequence('id_seq'), primary_key=True),
- autoload=True
+ autoload_with=engine
)
.. versionchanged:: 1.4 Added :class:`_schema.Identity` construct
@@ -345,8 +345,7 @@ for tables indicated by synonyms, either in local or remote schemas or
accessed over DBLINK, by passing the flag ``oracle_resolve_synonyms=True`` as
a keyword argument to the :class:`_schema.Table` construct::
- some_table = Table('some_table', autoload=True,
- autoload_with=some_engine,
+ some_table = Table('some_table', autoload_with=some_engine,
oracle_resolve_synonyms=True)
When this flag is set, the given name (such as ``some_table`` above) will
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index e41e489c0..8f2653c74 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -349,7 +349,7 @@ reflection process as follows::
... conn.execute(text("SET search_path TO test_schema, public"))
... meta = MetaData()
... referring = Table('referring', meta,
- ... autoload=True, autoload_with=conn)
+ ... autoload_with=conn)
...
<sqlalchemy.engine.result.CursorResult object at 0x101612ed0>
@@ -369,7 +369,7 @@ dialect-specific argument to both :class:`_schema.Table` as well as
>>> with engine.connect() as conn:
... conn.execute(text("SET search_path TO test_schema, public"))
... meta = MetaData()
- ... referring = Table('referring', meta, autoload=True,
+ ... referring = Table('referring', meta,
... autoload_with=conn,
... postgresql_ignore_search_path=True)
...
@@ -963,7 +963,7 @@ will report on these
two constructs distinctly; in the case of the index, the key
``duplicates_constraint`` will be present in the index entry if it is
detected as mirroring a constraint. When performing reflection using
-``Table(..., autoload=True)``, the UNIQUE INDEX is **not** returned
+``Table(..., autoload_with=engine)``, the UNIQUE INDEX is **not** returned
in :attr:`_schema.Table.indexes` when it is detected as mirroring a
:class:`.UniqueConstraint` in the :attr:`_schema.Table.constraints` collection
.
diff --git a/lib/sqlalchemy/ext/declarative/extensions.py b/lib/sqlalchemy/ext/declarative/extensions.py
index 1f0c82471..32344d538 100644
--- a/lib/sqlalchemy/ext/declarative/extensions.py
+++ b/lib/sqlalchemy/ext/declarative/extensions.py
@@ -316,7 +316,7 @@ class DeferredReflection(object):
a deferred reflection step.
Normally, declarative can be used with reflection by
- setting a :class:`_schema.Table` object using autoload=True
+ setting a :class:`_schema.Table` object using autoload_with=engine
as the ``__table__`` attribute on a declarative class.
The caveat is that the :class:`_schema.Table` must be fully
reflected, or at the very least have a primary key column,