home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 6 / 06.iso / a / a610 / 4.ddi / INCL / SQLTYPES.H < prev   
Encoding:
C/C++ Source or Header  |  1989-12-08  |  2.1 KB  |  82 lines

  1. /***************************************************************************
  2.  *
  3.  *                    RELATIONAL DATABASE SYSTEMS, INC.
  4.  *
  5.  *  COPYRIGHT (c) 1981-1986 RELATIONAL DATABASE SYSTEMS, INC., PALO ALTO, 
  6.  *  CALIFORNIA.  All rights reserved.  No part of this work covered by the 
  7.  *  copyright hereon may be reproduced or used in any form or by any means 
  8.  *  -- graphic, electronic, or mechanical, including photocopying, 
  9.  *     recording, taping, or information storage and retrieval systems --
  10.  *  without permission of RDS.
  11.  *
  12.  *  Title:    sqltypes.h
  13.  *  Sccsid:    @(#)sqltypes.h    4.5    11/24/86  15:41:43
  14.  *  Description:
  15.  *        type definition
  16.  *
  17.  ***************************************************************************
  18.  */
  19.  
  20. #ifndef CCHARTYPE
  21.  /* C language types */
  22.  
  23. #define CCHARTYPE    100
  24. #define CSHORTTYPE    101
  25. #define CINTTYPE    102
  26. #define CLONGTYPE    103
  27. #define CFLOATTYPE    104
  28. #define CDOUBLETYPE    105
  29. #define CDECIMALTYPE    107
  30. #define CFIXCHARTYPE    108
  31. #define CSTRINGTYPE    109
  32. #define CDATETYPE    110
  33. #define CMONEYTYPE    111
  34.  
  35.  
  36. #define USERCOLL(x)    ((x))
  37.  
  38.  
  39. /*
  40.  * Define all possible database types
  41.  *   include C-ISAM types here as well as in isam.h
  42.  */
  43.  
  44. #define SQLCHAR        0
  45. #define SQLSMINT    1
  46. #define SQLINT        2
  47. #define SQLFLOAT    3
  48. #define SQLSMFLOAT    4
  49. #define SQLDECIMAL    5
  50. #define SQLSERIAL    6
  51. #define SQLDATE        7
  52. #define SQLMONEY    8
  53. #define SQLNULL        9
  54. #define SQLTYPE        0xF    /* type mask        */
  55. #define SQLNONULL    0400    /* disallow nulls    */
  56.  
  57. /* this is not a real type but a flag to show that the
  58.  * value is from a host variable
  59.  */
  60. #define SQLHOST        01000
  61.  
  62. #define SIZCHAR        1
  63. #define SIZSMINT    2
  64. #define SIZINT        4
  65. #define SIZFLOAT    (sizeof(double))
  66. #define SIZSMFLOAT    (sizeof(float))
  67. #define SIZDECIMAL    17    /* decimal(32) */
  68. #define SIZSERIAL    4
  69. #define SIZDATE        4
  70. #define SIZMONEY    17    /* decimal(32) */
  71.  
  72. #define ISDECTYPE(t)    (((t)&SQLTYPE)==SQLDECIMAL || ((t)&SQLTYPE)==SQLMONEY)
  73.  
  74. #define DEFDECIMAL    9    /* default decimal(16) size */
  75. #define DEFMONEY    9    /* default decimal(16) size */
  76. #define DATENULL    0x80000000L
  77.  
  78. #define SYSPUBLIC    "public"
  79.  
  80.  
  81. #endif /* CCHARTYPE */
  82.