.. _metadata_toplevel:
.. _metadata_describing_toplevel:
.. _metadata_describing:
-.. module:: sqlalchemy.schema
==================================
Describing Databases with MetaData
==================================
+.. module:: sqlalchemy.schema
+
This section discusses the fundamental :class:`.Table`, :class:`.Column`
and :class:`.MetaData` objects.
a second time will return the *same* :class:`.Table` object - in this way
the :class:`.Table` constructor acts as a registry function.
- See also:
+ .. seealso::
- :ref:`metadata_describing` - Introduction to database metadata
+ :ref:`metadata_describing` - Introduction to database metadata
Constructor arguments are as follows:
:class:`.Table`, using the given :class:`.Connectable`
for connectivity.
- See also :meth:`.MetaData.create_all`.
+ .. seealso::
+
+ :meth:`.MetaData.create_all`.
"""
:class:`.Table`, using the given :class:`.Connectable`
for connectivity.
- See also :meth:`.MetaData.drop_all`.
+ .. seealso::
+
+ :meth:`.MetaData.drop_all`.
"""
if bind is None:
be emitted as well. For platforms that don't support sequences,
the :class:`.Sequence` construct is ignored.
- See also: :class:`.CreateSequence` :class:`.DropSequence`
+ .. seealso::
+
+ :class:`.CreateSequence`
+
+ :class:`.DropSequence`
"""
:class:`.Index`, using the given :class:`.Connectable`
for connectivity.
- See also :meth:`.MetaData.create_all`.
+ .. seealso::
+
+ :meth:`.MetaData.create_all`.
"""
if bind is None:
:class:`.Index`, using the given :class:`.Connectable`
for connectivity.
- See also :meth:`.MetaData.drop_all`.
+ .. seealso::
+
+ :meth:`.MetaData.drop_all`.
"""
if bind is None:
MetaData is a thread-safe object after tables have been explicitly defined
or loaded via reflection.
- See also:
-
- :ref:`metadata_describing` - Introduction to database metadata
+ .. seealso::
- .. index::
- single: thread safety; MetaData
+ :ref:`metadata_describing` - Introduction to database metadata
"""
AddConstraint(constraint).execute_if(dialect='postgresql')
)
- See also:
+ .. seealso::
:class:`.DDL`
:param state: any value which will be passed to the callable_
as the ``state`` keyword argument.
- See also:
+ .. seealso::
:class:`.DDLEvents`
default when ``execute()`` is invoked without a bind argument.
- See also:
+ .. seealso::
:class:`.DDLEvents`
+
:mod:`sqlalchemy.event`
"""