A collection of :class:`_schema.Table` objects and their associated schema constructs. Holds a collection of :class:`_schema.Table` objects as well as an optional binding to an :class:`_engine.Engine` or :class:`_engine.Connection`. If bound, the :class:`_schema.Table` objects
| 5387 | |
| 5388 | |
| 5389 | class MetaData(HasSchemaAttr): |
| 5390 | """A collection of :class:`_schema.Table` |
| 5391 | objects and their associated schema |
| 5392 | constructs. |
| 5393 | |
| 5394 | Holds a collection of :class:`_schema.Table` objects as well as |
| 5395 | an optional binding to an :class:`_engine.Engine` or |
| 5396 | :class:`_engine.Connection`. If bound, the :class:`_schema.Table` objects |
| 5397 | in the collection and their columns may participate in implicit SQL |
| 5398 | execution. |
| 5399 | |
| 5400 | The :class:`_schema.Table` objects themselves are stored in the |
| 5401 | :attr:`_schema.MetaData.tables` dictionary. |
| 5402 | |
| 5403 | :class:`_schema.MetaData` is a thread-safe object for read operations. |
| 5404 | Construction of new tables within a single :class:`_schema.MetaData` |
| 5405 | object, |
| 5406 | either explicitly or via reflection, may not be completely thread-safe. |
| 5407 | |
| 5408 | .. seealso:: |
| 5409 | |
| 5410 | :ref:`metadata_describing` - Introduction to database metadata |
| 5411 | |
| 5412 | """ |
| 5413 | |
| 5414 | __visit_name__ = "metadata" |
| 5415 | |
| 5416 | def __init__( |
| 5417 | self, |
| 5418 | schema: Optional[str] = None, |
| 5419 | quote_schema: Optional[bool] = None, |
| 5420 | naming_convention: Optional[_NamingSchemaParameter] = None, |
| 5421 | info: Optional[_InfoType] = None, |
| 5422 | ) -> None: |
| 5423 | """Create a new MetaData object. |
| 5424 | |
| 5425 | :param schema: |
| 5426 | The default schema to use for the :class:`_schema.Table`, |
| 5427 | :class:`.Sequence`, and potentially other objects associated with |
| 5428 | this :class:`_schema.MetaData`. Defaults to ``None``. |
| 5429 | |
| 5430 | .. seealso:: |
| 5431 | |
| 5432 | :ref:`schema_metadata_schema_name` - details on how the |
| 5433 | :paramref:`_schema.MetaData.schema` parameter is used. |
| 5434 | |
| 5435 | :paramref:`_schema.Table.schema` |
| 5436 | |
| 5437 | :paramref:`.Sequence.schema` |
| 5438 | |
| 5439 | :param quote_schema: |
| 5440 | Sets the ``quote_schema`` flag for those :class:`_schema.Table`, |
| 5441 | :class:`.Sequence`, and other objects which make usage of the |
| 5442 | local ``schema`` name. |
| 5443 | |
| 5444 | :param info: Optional data dictionary which will be populated into the |
| 5445 | :attr:`.SchemaItem.info` attribute of this object. |
| 5446 |
no outgoing calls