<commit_before>Schema-Manager
==============

A Schema Manager instance helps you with the abstraction of the
generation of SQL assets such as Tables, Sequences, Foreign Keys
and Indexes.

To retrieve the ``SchemaManager`` for your connection you can use
the ``getSchemaManager()`` method:

.. code-block:: php

    <?php
    $sm = $conn->getSchemaManager();

Now with the ``SchemaManager`` instance in ``$em`` you can use the
available methods to learn about your database schema:

.. note::

    Parameters containing identifiers passed to the SchemaManager
    methods are *NOT* quoted automatically! Identifier quoting is
    really difficult to do manually in a consistent way across
    different databases. You have to manually quote the identifiers
    when you accept data from user- or other sources not under your
    control.


listDatabases()
---------------

Retrieve an array of databases on the configured connection:

.. code-block:: php

    <?php
    $databases = $sm->listDatabases();

listSequences()
-------------------------------

Retrieve an array of ``Doctrine\DBAL\Schema\Sequence`` instances
that exist for a database:

.. code-block:: php<commit_msg>Fix a Typo<commit_after>Schema-Manager
==============

A Schema Manager instance helps you with the abstraction of the
generation of SQL assets such as Tables, Sequences, Foreign Keys
and Indexes.

To retrieve the ``SchemaManager`` for your connection you can use
the ``getSchemaManager()`` method:

.. code-block:: php

    <?php
    $sm = $conn->getSchemaManager();

Now with the ``SchemaManager`` instance in ``$sm`` you can use the
available methods to learn about your database schema:

.. note::

    Parameters containing identifiers passed to the SchemaManager
    methods are *NOT* quoted automatically! Identifier quoting is
    really difficult to do manually in a consistent way across
    different databases. You have to manually quote the identifiers
    when you accept data from user- or other sources not under your
    control.


listDatabases()
---------------

Retrieve an array of databases on the configured connection:

.. code-block:: php

    <?php
    $databases = $sm->listDatabases();

listSequences()
-------------------------------

Retrieve an array of ``Doctrine\DBAL\Schema\Sequence`` instances
that exist for a database:

.. code-block:: php
{'fraction_non_alphanumeric': 0.12399150743099788, 'fraction_numerical': 0.0, 'mean_word_length': 3.3710575139146566, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5269164', 'n_tokens_mistral': 606, 'n_tokens_neox': 569, 'n_words': 277}