sql_type.def
上传用户:dgyhgb
上传日期:2007-01-07
资源大小:676k
文件大小:3k
源码类别:

SQL Server

开发平台:

Unix_Linux

  1. /*
  2.  *  sql_type.def - description of SQL types, processed by GNU SQL compiler
  3.  *
  4.  *  This file is a part of GNU SQL Server
  5.  *
  6.  *  Copyright (c) 1996, 1997, Free Software Foundation, Inc
  7.  *  Developed at the Institute of System Programming, Russia
  8.  *  This file is written by Michael Kimelman
  9.  *
  10.  *  This program is free software; you can redistribute it and/or modify
  11.  *  it under the terms of the GNU General Public License as published by
  12.  *  the Free Software Foundation; either version 2 of the License, or
  13.  *  (at your option) any later version.
  14.  *
  15.  *  This program is distributed in the hope that it will be useful,
  16.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  17.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18.  *  GNU General Public License for more details.
  19.  *
  20.  *  You should have received a copy of the GNU General Public License
  21.  *  along with this program; if not, write to the Free Software
  22.  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  23.  *
  24.  *  Contact:  gss@ispras.ru
  25.  *
  26.  */
  27. /* $Id: sql_type.def,v 1.245 1997/03/31 03:46:38 kml Exp $ */
  28. /*************************************************************************
  29. *     Each used by compiler SQL type has to be described here in the      *
  30. *  following format                                                       *
  31. *                                                                         *
  32. *    DEF_SQLTYPE(CODE,"SQLtypename","Ctypename",dyn_id)                   *
  33. *                                                                         *
  34. * where:                                                                  *
  35. *   CODE         - type code, used as a symbolic constant in compiler     *
  36. *  "SQLtypename" - string, assotiated with defined SQL type in tree dumps *
  37. *  "Ctypename"   - string contains C type, assotiated with defined SQL    *
  38. *                  type                                                   *
  39. *  dyn_id        - identifier of type (number) exactly as in ISO SQL'92   *
  40. *                                                                         *
  41. *************************************************************************/
  42. #ifdef DEF_SQLTYPE
  43.   DEF_SQLTYPE(0       ,"Undef" ,"Unknown_type",0 )
  44.   DEF_SQLTYPE(Char    ,"Char"  ,"char*"       ,1 )
  45.   DEF_SQLTYPE(Short   ,"Short" ,"i2_t"       ,5 )
  46.   DEF_SQLTYPE(Int     ,"Int"   ,"i4_t"         ,4 )
  47.   DEF_SQLTYPE(Long    ,"Long"  ,"i4_t"        ,4 )
  48.   DEF_SQLTYPE(Num     ,"Num"   ,"__"          ,2 )
  49.   DEF_SQLTYPE(Float   ,"Float" ,"__"          ,6 )
  50.   DEF_SQLTYPE(Real    ,"Real"  ,"float"       ,7 )
  51.   DEF_SQLTYPE(Double  ,"Double","double"      ,8 )
  52.   DEF_SQLTYPE(Cstring ,"__"    ,"char*"       ,1 )
  53.   DEF_SQLTYPE(Pstring ,"__"    ,"Pstr"        ,0 )
  54.   DEF_SQLTYPE(Boolean ,"Bool"  ,"i4_t"         ,4 )
  55.   DEF_SQLTYPE(CharVar ,"ChVar" ,"CHARVAR"     ,12)
  56.   DEF_SQLTYPE(Bit     ,"Bit"   ,"i4_t"         ,14)
  57.   DEF_SQLTYPE(BitVar  ,"BitVar","BITVAR"      ,15)
  58.   DEF_SQLTYPE(Dec     ,"Dec"   ,"__"          ,3 )
  59.   DEF_SQLTYPE(DateTime,"DtTime","i4_t"         ,9 )
  60.   DEF_SQLTYPE(Interval,"Range" ,"i4_t"         ,10)
  61. #undef DEF_SQLTYPE
  62. #endif