#!
#  @file           TypeInfoAscii.pm
#  @author         ThomasS
#  @ingroup        dbd::MaxDB
#  @brief          
#
#\if EMIT_LICENCE
#
#    ========== licence begin  GPL
#    Copyright (c) 2001-2005 SAP AG
#
#    This program is free software; you can redistribute it and/or
#    modify it under the terms of the GNU General Public License
#    as published by the Free Software Foundation; either version 2
#    of the License, or (at your option) any later version.
#
#    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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#    ========== licence end

#\endif
#*/

require 5.004;

# Experimantal implementation. If a SQLDBC metadata object is available, this
# module should not be used anymore.

# The %type_info_all hash was automatically generated by
# DBI::DBD::Metadata::write_typeinfo v.

package DBD::MaxDB::TypeInfoAscii;

{
    require Exporter;
    require DynaLoader;
    @ISA = qw(Exporter DynaLoader);
    @EXPORT = qw(type_info_all);
    use DBI qw(:sql_types);

    $type_info_all = [
        {
            TYPE_NAME          =>  0,
            DATA_TYPE          =>  1,
            COLUMN_SIZE        =>  2,
            LITERAL_PREFIX     =>  3,
            LITERAL_SUFFIX     =>  4,
            CREATE_PARAMS      =>  5,
            NULLABLE           =>  6,
            CASE_SENSITIVE     =>  7,
            SEARCHABLE         =>  8,
            UNSIGNED_ATTRIBUTE =>  9,
            FIXED_PREC_SCALE   => 10,
            AUTO_UNIQUE_VALUE  => 11,
            LOCAL_TYPE_NAME    => 12,
            MINIMUM_SCALE      => 13,
            MAXIMUM_SCALE      => 14,
            SQL_DATA_TYPE      => 15,
            SQL_DATETIME_SUB   => 16,
            NUM_PREC_RADIX     => 17,
            INTERVAL_PRECISION => 18,
        },
        [ "BOOLEAN",         SQL_BIT,           1,         undef,undef,undef,            1,0,2,undef,0,undef,"BOOLEAN",         undef,undef,SQL_BIT,          undef,undef,undef, ],
        [ "LONG BYTE",       SQL_LONGVARBINARY, 2147483647,"X'", "'",  undef,            1,0,0,undef,0,undef,"LONG BYTE",       undef,undef,SQL_LONGVARBINARY,undef,undef,undef, ],
        [ "VARCHAR() BYTE",  SQL_VARBINARY,     4000,      "X'", "'",  "length",         1,0,2,undef,0,undef,"VARBINARY",       undef,undef,SQL_VARBINARY,    undef,undef,undef, ],
        [ "CHAR() BYTE",     SQL_BINARY,        254,       "X'", "'",  "length",         1,0,2,undef,0,undef,"BINARY",          undef,undef,SQL_BINARY,       undef,undef,undef, ],
        [ "LONG",            SQL_LONGVARCHAR,   2147483647,"'",  "'",  undef,            1,1,0,undef,0,undef,"LONG",            undef,undef,SQL_LONGVARCHAR,  undef,undef,undef, ],
        [ "CHAR",            SQL_CHAR,          254,       "'",  "'",  "length",         1,1,3,undef,0,undef,"CHAR",            undef,undef,SQL_CHAR,         undef,undef,undef, ],
        [ "DECIMAL",         SQL_NUMERIC,       38,        undef,undef,"precision,scale",1,0,2,0,    0,undef,"NUMERIC",         0,    38,   SQL_NUMERIC,      undef,10,   undef, ],
        [ "FIXED",           SQL_DECIMAL,       38,        undef,undef,"precision,scale",1,0,2,0,    0,undef,"DECIMAL",         0,    38,   SQL_DECIMAL,      undef,10,   undef, ],
        [ "INTEGER",         SQL_INTEGER,       10,        undef,undef,undef,            1,0,2,0,    0,undef,"INTEGER",         undef,undef,SQL_INTEGER,      undef,10,   undef, ],
        [ "SMALLINT",        SQL_SMALLINT,      5,         undef,undef,undef,            1,0,2,0,    0,undef,"SMALLINT",        undef,undef,SQL_SMALLINT,     undef,10,   undef, ],
        [ "FLOAT",           SQL_FLOAT,         15,        undef,undef,undef,            1,0,2,0,    0,undef,"FLOAT",           undef,undef,SQL_FLOAT,        undef,2,    undef, ],
        [ "REAL",            SQL_REAL,          15,        undef,undef,undef,            1,0,2,0,    0,undef,"REAL",            undef,undef,SQL_REAL,         undef,2,    undef, ],
        [ "DOUBLE PRECISION",SQL_DOUBLE,        16,        undef,undef,undef,            1,0,2,0,    0,undef,"DOUBLE PRECISION",undef,undef,SQL_DOUBLE,       undef,2,    undef, ],
        [ "VARCHAR",         SQL_VARCHAR,       4000,      "'",  "'",  "length",         1,1,3,undef,0,undef,"VARCHAR",         undef,undef,SQL_VARCHAR,      undef,undef,undef, ],
        [ "DATE",            SQL_TYPE_DATE,     10,        "'",  "'",  undef,            1,0,2,undef,0,undef,"DATE",            undef,undef,SQL_DATE,         1,    undef,undef, ],
        [ "TIME",            SQL_TYPE_TIME,     8,         "'",  "'",  undef,            1,0,2,undef,0,undef,"TIME",            undef,undef,SQL_DATE,         2,    undef,undef, ],
        [ "TIMESTAMP",       SQL_TYPE_TIMESTAMP,26,        "'",  "'",  undef,            1,0,2,undef,0,undef,"TIMESTAMP",       undef,undef,SQL_DATE,         3,    undef,undef, ],
    ];

    1;
}

__END__
