summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2020-12-01 00:41:09 +0000
committerGerrit Code Review <gerrit@bbpush.zzzcomputing.com>2020-12-01 00:41:09 +0000
commit1de02c9f3f5085e125a6f79230ee7b98f0e30ddb (patch)
tree7128d9cbde33fd1871a62d082004bab4cbbecb94 /lib/sqlalchemy/sql
parent5b05041a80f7276298f612d3b1a434c2ae577000 (diff)
parent0c8c7b6656ccec25dff7be03f82d873b6a09c3ec (diff)
downloadsqlalchemy-1de02c9f3f5085e125a6f79230ee7b98f0e30ddb.tar.gz
Merge "improve cross-linking between Core /ORM for schema arg"
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r--lib/sqlalchemy/sql/schema.py44
1 files changed, 3 insertions, 41 deletions
diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py
index b7e5dac31..4b19ff02a 100644
--- a/lib/sqlalchemy/sql/schema.py
+++ b/lib/sqlalchemy/sql/schema.py
@@ -3982,49 +3982,11 @@ class MetaData(SchemaItem):
:class:`.Sequence`, and potentially other objects associated with
this :class:`_schema.MetaData`. Defaults to ``None``.
- When this value is set, any :class:`_schema.Table` or
- :class:`.Sequence`
- which specifies ``None`` for the schema parameter will instead
- have this schema name defined. To build a :class:`_schema.Table`
- or :class:`.Sequence` that still has ``None`` for the schema
- even when this parameter is present, use the :attr:`.BLANK_SCHEMA`
- symbol.
-
- .. note::
-
- As referred above, the :paramref:`_schema.MetaData.schema`
- parameter
- only refers to the **default value** that will be applied to
- the :paramref:`_schema.Table.schema` parameter of an incoming
- :class:`_schema.Table` object. It does not refer to how the
- :class:`_schema.Table` is catalogued within the
- :class:`_schema.MetaData`,
- which remains consistent vs. a :class:`_schema.MetaData`
- collection
- that does not define this parameter. The
- :class:`_schema.Table`
- within the :class:`_schema.MetaData`
- will still be keyed based on its
- schema-qualified name, e.g.
- ``my_metadata.tables["some_schema.my_table"]``.
-
- The current behavior of the :class:`_schema.ForeignKey`
- object is to
- circumvent this restriction, where it can locate a table given
- the table name alone, where the schema will be assumed to be
- present from this value as specified on the owning
- :class:`_schema.MetaData` collection. However,
- this implies that a
- table qualified with BLANK_SCHEMA cannot currently be referred
- to by string name from :class:`_schema.ForeignKey`.
- Other parts of
- SQLAlchemy such as Declarative may not have similar behaviors
- built in, however may do so in a future release, along with a
- consistent method of referring to a table in BLANK_SCHEMA.
-
-
.. seealso::
+ :ref:`schema_metadata_schema_name` - details on how the
+ :paramref:`_schema.MetaData.schema` parameter is used.
+
:paramref:`_schema.Table.schema`
:paramref:`.Sequence.schema`