Skip to content
sql_type_mapping.xml 6.81 KiB
Newer Older
<?xml version="1.0" encoding="UTF-8"?>
<!--
_____________________________________________________________________________

INAF - OATS National Institute for Astrophysics - Astronomical Observatory of
Trieste INAF - IA2 Italian Center for Astronomical Archives
_____________________________________________________________________________

Copyright (C) 2017 Istituto Nazionale di Astrofisica

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License Version 3 as published by the
Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.

You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 51
Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-->
<sql_type_mapping>

    <type>
        <adql>VARCHAR</adql>
        <votable>char</votable>
        <mysql inverse="true">
            <type>VARCHAR</type>
        </mysql>
        <pgsql inverse="true">
            <type>character varying</type>
            <type>varchar</type>
        </pgsql>
        <java>java.lang.String</java>
    </type>
    <type>
        <adql>CHAR</adql>
        <votable>char</votable>
        <mysql inverse="true">
            <type>CHAR</type>
        </mysql>
        <pgsql inverse="true">
            <type>character</type>
            <type>char</type>
        </pgsql>
        <java>java.lang.String</java>
    </type>
    
    <type>
        <adql>SMALLINT</adql>
        <votable>short</votable>
        <mysql inverse="true">
            <type>SMALLINT</type>
            <type>TINYINT</type>
        </mysql>
        <pgsql inverse="true">
            <type>smallint</type>
        </pgsql>
        <java>java.lang.Short</java>
    </type>
    
    <type>
        <adql>INTEGER</adql>
        <votable>int</votable>
        <mysql inverse="true">
            <type>INT</type>
            <type>MEDIUMINT</type>
        </mysql>
        <pgsql inverse="true">
            <type>integer</type>
            <type>serial</type>
        </pgsql>
        <java>java.lang.Integer</java>
    </type>
    <type>
        <adql>BIGINT</adql>
        <votable>long</votable>
        <mysql inverse="true">
            <type>BIGINT</type>
        </mysql>
        <pgsql inverse="true">
            <type>bigint</type>
            <type>bigserial</type>
        </pgsql>
        <java>java.lang.Long</java>
    </type>
    <type>
        <adql>REAL</adql>
        <votable>float</votable>
        <mysql inverse="true">
            <type>FLOAT</type>
        </mysql>
        <pgsql inverse="true">
            <type>real</type>
        </pgsql>
        <java>java.lang.Float</java>
    </type>
    <type>
        <adql>DOUBLE</adql>
        <votable>double</votable>
        <mysql inverse="true">
            <type>DOUBLE</type>
            <type>DECIMAL</type>
        </mysql>
        <pgsql inverse="true">
            <type>double precision</type>
            <type>decimal</type>
            <type>numeric</type>
        </pgsql>
        <java>java.lang.Double</java>
    </type>
    <type>
        <adql>BOOLEAN</adql>
        <votable>boolean</votable>
        <mysql inverse="true">
            <type>BIT</type>
            <type>BOOL</type>
            <type>BOOLEAN</type>
        </mysql>
        <pgsql inverse="true">
            <type>boolean</type>
        </pgsql>
        <java>java.lang.Boolean</java>
    </type>
    <type>
        <adql>CLOB</adql>
        <xtype>adql:clob</xtype>
        <mysql inverse="true">
            <type>LONGTEXT</type>
            <type>MEDIUMTEXT</type>
            <type>TEXT</type>
        </mysql>
        <pgsql inverse="true">
            <type>text</type>
        </pgsql>
        <java>java.lang.String</java>
    </type>
    
    <type>
        <adql>BLOB</adql>
        <votable>unsignedByte</votable>
        <xtype>adql:blob</xtype>
        <mysql inverse="true">
            <type>BLOB</type>
        </mysql>
        <pgsql>
            <type>bytea</type>
        </pgsql>
        <java>java.lang.String</java>
    </type>
        <xtype>timestamp</xtype>
        <mysql inverse="true">
            <type>DATETIME</type>
            <type>DATE</type>
            <type>YEAR</type>
            <!--
            <type>TIMESTAMP</type>
            <type>TIME</type>
            -->
        </mysql>
        <pgsql inverse="true">
            <type>timestamp</type>
            <type>time</type>
            <type>date</type>
        </pgsql>
        <java>java.lang.String</java>
    </type>
    
    <type>
        <adql>BINARY</adql>
        <votable>unsignedByte</votable>
        <mysql inverse="true">
            <type>BINARY</type>
        </mysql>
        <pgsql>
            <type>bytea</type>
        </pgsql>
        <java>java.lang.String</java>
    </type>
    
    <type>
        <adql>VARBINARY</adql>
        <votable>unsignedByte</votable>
        <mysql inverse="true">
            <type>VARBINARY</type>
        </mysql>
        <pgsql inverse="true">
            <type>bytea</type>
        </pgsql>
        <java>java.lang.String</java>
    </type>
    
    <type>
        <adql>REGION</adql>
        <votable>char</votable>
        <xtype>adql:region</xtype>
            <type>TEXT</type>
        </mysql>
        <pgsql>
            <type>character varying</type>
        </pgsql>
        <java>java.lang.String</java>
    </type>
    
    <type>
        <adql>POINT</adql>
        <votable>double</votable>
        <!--<votable>float</votable>-->
        <xtype>point</xtype>
        <arraysize>2</arraysize>
        <pgsql inverse="true">
            <type>spoint</type>
        </pgsql>
        <java>java.lang.String</java>
    </type>
    
    <type>
        <adql>CIRCLE</adql>
        <votable>double</votable>
        <!--<votable>float</votable>-->
        <xtype>circle</xtype>
        <arraysize>3</arraysize>
        <mysql>
            <type>VARCHAR</type>
        </mysql>
        <pgsql inverse="true">
            <type>scircle</type>
        </pgsql>
        <java>java.lang.String</java>
    </type>
    
    <type>
        <adql>POLYGON</adql>
        <votable>double</votable>
        <!--<votable>float</votable>-->
        <xtype>polygon</xtype>
        <arraysize>*</arraysize>
        <mysql>
            <type>VARCHAR</type>
        </mysql>
        <pgsql inverse="true">
            <type>spoly</type>
    
</sql_type_mapping>