<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://www.jooq.org/xsd/jooq-meta-3.11.0.xsd"
    targetNamespace="http://www.jooq.org/xsd/jooq-meta-3.11.0.xsd"
    elementFormDefault="qualified">

    <element name="information_schema">
        <complexType>
            <all>
                <element name="catalogs" type="tns:Catalogs" minOccurs="0" maxOccurs="1" />
                <element name="schemata" type="tns:Schemata" minOccurs="0" maxOccurs="1" />
                <element name="sequences" type="tns:Sequences" minOccurs="0" maxOccurs="1" />
                <element name="tables" type="tns:Tables" minOccurs="0" maxOccurs="1" />
                <element name="columns" type="tns:Columns" minOccurs="0" maxOccurs="1" />
                <element name="table_constraints" type="tns:TableConstraints" minOccurs="0" maxOccurs="1" />
                <element name="key_column_usages" type="tns:KeyColumnUsages" minOccurs="0" maxOccurs="1" />
                <element name="referential_constraints" type="tns:ReferentialConstraints" minOccurs="0" maxOccurs="1" />
                <element name="indexes" type="tns:Indexes" minOccurs="0" maxOccurs="1" />
                <element name="index_column_usages" type="tns:IndexColumnUsages" minOccurs="0" maxOccurs="1" />
                <element name="routines" type="tns:Routines" minOccurs="0" maxOccurs="1" />
                <element name="parameters" type="tns:Parameters" minOccurs="0" maxOccurs="1" />
            </all>
        </complexType>
    </element>

    <complexType name="Catalogs">
        <sequence>
            <element name="catalog" type="tns:Catalog" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
    </complexType>

    <complexType name="Catalog">
        <all>
            <element name="catalog_name" type="string" minOccurs="0" maxOccurs="1" />
            <element name="comment" type="string" minOccurs="0" maxOccurs="1" />
        </all>
    </complexType>

    <complexType name="Schemata">
        <sequence>
            <element name="schema" type="tns:Schema" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
    </complexType>

    <complexType name="Schema">
        <all>
            <element name="catalog_name" type="string" minOccurs="0" maxOccurs="1" />
            <element name="schema_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="comment" type="string" minOccurs="0" maxOccurs="1" />
        </all>
    </complexType>

    <complexType name="Sequences">
        <sequence>
            <element name="sequence" type="tns:Sequence" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
    </complexType>

    <complexType name="Sequence">
        <all>
            <element name="sequence_catalog" type="string" minOccurs="0" maxOccurs="1" />
            <element name="sequence_schema" type="string" minOccurs="0" maxOccurs="1" />
            <element name="sequence_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="data_type" type="string" minOccurs="1" maxOccurs="1" />
            <element name="character_maximum_length" type="int" minOccurs="0" maxOccurs="1" />
            <element name="numeric_precision" type="int" minOccurs="0" maxOccurs="1" />
            <element name="numeric_scale" type="int" minOccurs="0" maxOccurs="1" />
            <element name="comment" type="string" minOccurs="0" maxOccurs="1" />
        </all>
    </complexType>

    <complexType name="Tables">
        <sequence>
            <element name="table" type="tns:Table" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
    </complexType>

    <complexType name="Table">
        <all>
            <element name="table_catalog" type="string" minOccurs="0" maxOccurs="1" />
            <element name="table_schema" type="string" minOccurs="0" maxOccurs="1" />
            <element name="table_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="comment" type="string" minOccurs="0" maxOccurs="1" />
        </all>
    </complexType>

    <complexType name="Columns">
        <sequence>
            <element name="column" type="tns:Column" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
    </complexType>

    <complexType name="Column">
        <all>
            <element name="table_catalog" type="string" minOccurs="0" maxOccurs="1" />
            <element name="table_schema" type="string" minOccurs="0" maxOccurs="1" />
            <element name="table_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="column_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="data_type" type="string" minOccurs="1" maxOccurs="1" />
            <element name="character_maximum_length" type="int" minOccurs="0" maxOccurs="1" />
            <element name="numeric_precision" type="int" minOccurs="0" maxOccurs="1" />
            <element name="numeric_scale" type="int" minOccurs="0" maxOccurs="1" />
            <element name="ordinal_position" type="int" minOccurs="0" maxOccurs="1" />
            <element name="identity_generation" type="string" minOccurs="0" maxOccurs="1" />
            <element name="is_nullable" type="boolean" minOccurs="0" maxOccurs="1" />
            <element name="column_default" type="string" minOccurs="0" maxOccurs="1" />
            <element name="comment" type="string" minOccurs="0" maxOccurs="1" />
        </all>
    </complexType>

    <complexType name="TableConstraints">
        <sequence>
            <element name="table_constraint" type="tns:TableConstraint" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
    </complexType>

    <complexType name="TableConstraint">
        <all>
            <element name="constraint_catalog" type="string" minOccurs="0" maxOccurs="1" />
            <element name="constraint_schema" type="string" minOccurs="0" maxOccurs="1" />
            <element name="constraint_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="constraint_type" type="tns:TableConstraintType" minOccurs="1" maxOccurs="1" />
            <element name="table_catalog" type="string" minOccurs="0" maxOccurs="1" />
            <element name="table_schema" type="string" minOccurs="0" maxOccurs="1" />
            <element name="table_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="comment" type="string" minOccurs="0" maxOccurs="1" />
        </all>
    </complexType>

    <simpleType name="TableConstraintType">
        <restriction base="string">
            <enumeration value="PRIMARY KEY"/>
            <enumeration value="UNIQUE"/>
            <enumeration value="CHECK"/>
            <enumeration value="FOREIGN KEY"/>
        </restriction>
    </simpleType>

    <complexType name="KeyColumnUsages">
        <sequence>
            <element name="key_column_usage" type="tns:KeyColumnUsage" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
    </complexType>

    <complexType name="KeyColumnUsage">
        <all>
            <element name="column_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="constraint_catalog" type="string" minOccurs="0" maxOccurs="1" />
            <element name="constraint_schema" type="string" minOccurs="0" maxOccurs="1" />
            <element name="constraint_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="ordinal_position" type="int" minOccurs="1" maxOccurs="1" />
            <element name="table_catalog" type="string" minOccurs="0" maxOccurs="1" />
            <element name="table_schema" type="string" minOccurs="0" maxOccurs="1" />
            <element name="table_name" type="string" minOccurs="1" maxOccurs="1" />
        </all>
    </complexType>

    <complexType name="ReferentialConstraints">
        <sequence>
            <element name="referential_constraint" type="tns:ReferentialConstraint" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
    </complexType>

    <complexType name="ReferentialConstraint">
        <all>
            <element name="constraint_catalog" type="string" minOccurs="0" maxOccurs="1" />
            <element name="constraint_schema" type="string" minOccurs="0" maxOccurs="1" />
            <element name="constraint_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="unique_constraint_catalog" type="string" minOccurs="0" maxOccurs="1" />
            <element name="unique_constraint_schema" type="string" minOccurs="0" maxOccurs="1" />
            <element name="unique_constraint_name" type="string" minOccurs="1" maxOccurs="1" />
        </all>
    </complexType>

    <complexType name="Indexes">
        <sequence>
            <element name="index" type="tns:Index" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
    </complexType>

    <complexType name="Index">
        <all>
            <element name="index_catalog" type="string" minOccurs="0" maxOccurs="1" />
            <element name="index_schema" type="string" minOccurs="0" maxOccurs="1" />
            <element name="index_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="table_catalog" type="string" minOccurs="0" maxOccurs="1" />
            <element name="table_schema" type="string" minOccurs="0" maxOccurs="1" />
            <element name="table_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="is_unique" type="boolean" minOccurs="0" maxOccurs="1" />
            <element name="comment" type="string" minOccurs="0" maxOccurs="1" />
        </all>
    </complexType>

    <complexType name="IndexColumnUsages">
        <sequence>
            <element name="index_column_usage" type="tns:IndexColumnUsage" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
    </complexType>

    <complexType name="IndexColumnUsage">
        <all>
            <element name="index_catalog" type="string" minOccurs="0" maxOccurs="1" />
            <element name="index_schema" type="string" minOccurs="0" maxOccurs="1" />
            <element name="index_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="table_catalog" type="string" minOccurs="0" maxOccurs="1" />
            <element name="table_schema" type="string" minOccurs="0" maxOccurs="1" />
            <element name="table_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="column_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="ordinal_position" type="int" minOccurs="1" maxOccurs="1" />
            <element name="is_descending" type="boolean" minOccurs="0" maxOccurs="1"/>
        </all>
    </complexType>

    <complexType name="Routines">
        <sequence>
            <element name="routine" type="tns:Routine" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
    </complexType>

    <complexType name="Routine">
        <all>
            <element name="specific_catalog" type="string" minOccurs="0" maxOccurs="1" />
            <element name="specific_schema" type="string" minOccurs="0" maxOccurs="1" />
            <element name="specific_package" type="string" minOccurs="0" maxOccurs="1" />
            <element name="specific_name" type="string" minOccurs="0" maxOccurs="1" />
            <element name="routine_catalog" type="string" minOccurs="0" maxOccurs="1" />
            <element name="routine_schema" type="string" minOccurs="0" maxOccurs="1" />
            <element name="routine_package" type="string" minOccurs="0" maxOccurs="1" />
            <element name="routine_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="routine_type" type="tns:RoutineType" minOccurs="1" maxOccurs="1" />
            <element name="data_type" type="string" minOccurs="0" maxOccurs="1" />
            <element name="character_maximum_length" type="int" minOccurs="0" maxOccurs="1" />
            <element name="numeric_precision" type="int" minOccurs="0" maxOccurs="1" />
            <element name="numeric_scale" type="int" minOccurs="0" maxOccurs="1" />
            <element name="comment" type="string" minOccurs="0" maxOccurs="1" />
        </all>
    </complexType>

    <simpleType name="RoutineType">
        <restriction base="string">
            <enumeration value="FUNCTION"/>
            <enumeration value="PROCEDURE"/>
        </restriction>
    </simpleType>

    <complexType name="Parameters">
        <sequence>
            <element name="parameter" type="tns:Parameter" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
    </complexType>

    <complexType name="Parameter">
        <all>
            <element name="specific_catalog" type="string" minOccurs="0" maxOccurs="1" />
            <element name="specific_schema" type="string" minOccurs="0" maxOccurs="1" />
            <element name="specific_package" type="string" minOccurs="0" maxOccurs="1" />
            <element name="specific_name" type="string" minOccurs="1" maxOccurs="1" />
            <element name="ordinal_position" type="int" minOccurs="1" maxOccurs="1" />
            <element name="parameter_mode" type="tns:ParameterMode" minOccurs="1" maxOccurs="1" />
            <element name="parameter_name" type="string" minOccurs="0" maxOccurs="1" />
            <element name="data_type" type="string" minOccurs="0" maxOccurs="1" />
            <element name="character_maximum_length" type="int" minOccurs="0" maxOccurs="1" />
            <element name="numeric_precision" type="int" minOccurs="0" maxOccurs="1" />
            <element name="numeric_scale" type="int" minOccurs="0" maxOccurs="1" />
            <element name="parameter_default" type="string" minOccurs="0" maxOccurs="1" />
            <element name="comment" type="string" minOccurs="0" maxOccurs="1" />
        </all>
    </complexType>

    <simpleType name="ParameterMode">
        <restriction base="string">
            <enumeration value="IN"/>
            <enumeration value="INOUT"/>
            <enumeration value="OUT"/>
        </restriction>
    </simpleType>
</schema>
