======================
CrateDialect Internals
======================

The initialize method sets the default schema name and version info::

    >>> connection = engine.connect()
    >>> dialect = CrateDialect()
    >>> dialect.initialize(connection)

    >>> dialect.default_schema_name
    'doc'

    >>> dialect.server_version_info >= (0, 54, 6)
    True

Check if table exists::

    >>> dialect.has_table(connection, 'locations')
    True

List all tables::

    >>> dialect.get_table_names(connection)
    ['characters', 'locations']

    >>> dialect.get_table_names(connection, schema='sys')[:4]
    ['checks', 'cluster', 'jobs', 'jobs_log']

Check if schema exists::

    >>> dialect.has_schema(connection, 'doc')
    True

List all schemas::

    >>> dialect.get_schema_names(connection)
    [u'blob', u'doc', u'information_schema', u'sys']

.. Hidden: close connection

    >>> connection.close()

