Annotation of win32/sql/oracle/include/oci/ocidfn.h, revision 1.1

1.1     ! parser      1: /*
        !             2:  * $Header: /var/lib/cvsroot/parser3/parser3/src/sql/oracle/oracle32/include/oci/ocidfn.h,v 1.1 2001/08/22 14:02:19 parser Exp $ 
        !             3:  */
        !             4: 
        !             5: /* Copyright (c) 1991, 1997, 1998, 1999 by Oracle Corporation */
        !             6: /* Copyright (c) 1991, 1995, 1996, 1997, 1998, 1999 by Oracle Corporation */
        !             7: /*
        !             8:    NAME
        !             9:      ocidfn.h - OCI Definations
        !            10:    NOTES
        !            11:      Shipped to users.
        !            12:    MODIFIED   (MM/DD/YY)
        !            13:     amangal    07/30/99 - Merge into 8.1.6 : Bug 879031
        !            14:     tnbui      07/28/99 - Remove SQLT_TIMESTAMP_ITZ                            
        !            15:     tnbui      07/21/99 - SQLT_TIMESTAMP_LTZ                                   
        !            16:     tnbui      06/16/99 - TIMESTAMP WITH IMPLICIT TIME ZONE                    
        !            17:     whe        04/07/99 - bug#810075
        !            18:     whe        03/19/99 - lrg 32079 etc.: move HDA def from ocidem.h to ocidfn.
        !            19:     skmishra   05/10/98 -
        !            20:     vyanaman   04/16/98 - update sql92 datatypes
        !            21:     khnguyen   01/16/98 -
        !            22:     khnguyen   12/23/97 - SQLT* for datetimes and intervals
        !            23:     tanguyen   08/19/97 -
        !            24:     dchatter   03/18/97 -  porting exception 390897
        !            25:     dchatter   05/02/97 -   merge porting exception
        !            26:     dalpern    12/04/96 -   SQLCS_LIT_NULL added
        !            27:     cxcheng    11/14/96 -   add SQLT_BFILE/SQLT_CFILE to fix compile prob
        !            28:     cxcheng    11/12/96 -   add SQLT_NCO for named collection
        !            29:     lchidamb   10/17/96 -   add SQLT_VST and SQLT_ODT
        !            30:     sgollapu   10/14/96 -   Mutual exclusion of ocidfn and sqldef
        !            31:     sgollapu   10/07/96 -   OCI Simplification
        !            32:     aroy       09/09/96 -   add SQLCS* definitions
        !            33:     slari      08/07/96 -  add SQLT_RDD, rowid descriptor
        !            34:     slari      06/12/96 -  remove SQLT_TTBL
        !            35:     dchatter   04/21/96 -  prepare for merge into main
        !            36:     slari      08/24/95 -  b299432, define CDA_SIZE
        !            37:     zwalcott   02/28/96 -  add SQLT_BFILEE and SQLT_CFILEE.
        !            38:     lchidamb   02/22/96 -  make dtys consistent with dtydef.h
        !            39:     lchidamb   02/16/96 -  add SQLT_BFILEE and SQLT_CFILEE
        !            40:     lchidamb   01/30/96 -  rename new datatypes for v8
        !            41:     lchidamb   09/06/95 -  add new datatypes
        !            42:     slari      05/11/95 -  add OCI_EV_DEF and OCI_EV_TSF
        !            43:     dchatter   04/06/95 -  add ifdef flags around OCI_flags
        !            44:     dchatter   03/08/95 -  piece values
        !            45:     dchatter   03/06/95 -  merge changes from branch 1.2.720.3
        !            46:     jfbrown    02/17/95 -  merge changes from branch 1.2.720.2
        !            47:     dchatter   02/08/95 -  olog call modes
        !            48:     jfbrown    02/03/95 -  remove non-printable characters
        !            49:     lchidamb   12/06/94 -  merge changes from branch 1.2.720.1
        !            50:     lchidamb   10/04/94 -  added field chk to cda_head, cda_def
        !            51:     dchatter   07/05/94 -  SQLT_CUR added
        !            52:     rkooi2     11/27/92 -  Changing e* datatypes to s* 
        !            53:     rkooi2     10/26/92 -  More portability mods 
        !            54:     rkooi2     10/22/92 -  Added #ifndef ORATYPES ... 
        !            55:     rkooi2     10/18/92 -  Changes to make it portable. 
        !            56:     sjain      03/16/92 -  Creation 
        !            57: */
        !            58: 
        !            59: /*
        !            60:  *  ocidfn.h
        !            61:  *
        !            62:  *  Common header file for OCI C sample programs.
        !            63:  *  This header declares the cursor and logon data area structure.
        !            64:  *  The types used are defined in <oratypes.h>.
        !            65:  *
        !            66:  */
        !            67:  
        !            68: #ifndef OCIDFN
        !            69: #define OCIDFN
        !            70: 
        !            71: #include <oratypes.h>
        !            72: 
        !            73: /* The cda_head struct is strictly PRIVATE.  It is used
        !            74:    internally only. Do not use this struct in OCI programs. */
        !            75: 
        !            76: struct cda_head {
        !            77:     sb2          v2_rc;
        !            78:     ub2          ft;
        !            79:     ub4          rpc;
        !            80:     ub2          peo;
        !            81:     ub1          fc;
        !            82:     ub1          rcs1;
        !            83:     ub2          rc;
        !            84:     ub1          wrn;
        !            85:     ub1          rcs2;
        !            86:     sword        rcs3;
        !            87:     struct {
        !            88:         struct {
        !            89:            ub4    rcs4;
        !            90:            ub2    rcs5;
        !            91:            ub1    rcs6;
        !            92:         } rd;
        !            93:         ub4    rcs7;
        !            94:         ub2    rcs8;
        !            95:     } rid;
        !            96:     sword        ose;
        !            97:     ub1                 chk;
        !            98:     dvoid        *rcsp;
        !            99: };
        !           100: 
        !           101: /*
        !           102: ** Size of HDA area:
        !           103: ** 512 for 64 bit arquitectures
        !           104: ** 256 for 32 bit arquitectures
        !           105: */
        !           106: 
        !           107: #if defined(SS_64BIT_SERVER) || defined(__64BIT__)
        !           108: # define HDA_SIZE 512
        !           109: #else
        !           110: # define HDA_SIZE 256
        !           111: #endif
        !           112: 
        !           113: #if defined(SS_64BIT_SERVER) || defined(__64BIT__)
        !           114: #define CDA_SIZE 88
        !           115: #else
        !           116: # define CDA_SIZE 64
        !           117: #endif
        !           118: 
        !           119: /* the real CDA, padded to CDA_SIZE bytes in size */
        !           120: struct cda_def {
        !           121:     sb2          v2_rc;                                    /* V2 return code */
        !           122:     ub2          ft;                                    /* SQL function type */
        !           123:     ub4          rpc;                                /* rows processed count */
        !           124:     ub2          peo;                                  /* parse error offset */
        !           125:     ub1          fc;                                    /* OCI function code */
        !           126:     ub1          rcs1;                                        /* filler area */
        !           127:     ub2          rc;                                       /* V7 return code */
        !           128:     ub1          wrn;                                       /* warning flags */
        !           129:     ub1          rcs2;                                           /* reserved */
        !           130:     sword        rcs3;                                           /* reserved */
        !           131:     struct {                                              /* rowid structure */
        !           132:         struct {
        !           133:            ub4    rcs4;
        !           134:            ub2    rcs5;
        !           135:            ub1    rcs6;
        !           136:         } rd;
        !           137:         ub4    rcs7;
        !           138:         ub2    rcs8;
        !           139:     } rid;
        !           140:     sword        ose;                                 /* OSD dependent error */
        !           141:     ub1                 chk;
        !           142:     dvoid        *rcsp;                          /* pointer to reserved area */
        !           143:     ub1          rcs9[CDA_SIZE - sizeof (struct cda_head)];        /* filler */
        !           144: };
        !           145: 
        !           146: typedef struct cda_def Cda_Def;
        !           147: 
        !           148: /* the logon data area (LDA)
        !           149:    is the same shape as the CDA */
        !           150: typedef struct cda_def Lda_Def;
        !           151: 
        !           152: /* OCI Environment Modes for opinit call */
        !           153: #define OCI_EV_DEF 0                  /* default single-threaded environment */
        !           154: #define OCI_EV_TSF 1                              /* thread-safe environment */
        !           155: 
        !           156: /* OCI Logon Modes for olog call */
        !           157: #define OCI_LM_DEF 0                                        /* default login */
        !           158: #define OCI_LM_NBL 1                                   /* non-blocking logon */
        !           159: 
        !           160: /* 
        !           161:  * since sqllib uses both ocidef and ocidfn the following defines
        !           162:  * need to be guarded
        !           163:  */
        !           164: #ifndef OCI_FLAGS 
        !           165: #define OCI_FLAGS
        !           166: 
        !           167: /* OCI_*_PIECE defines the piece types that are returned or set
        !           168: */
        !           169: #define OCI_ONE_PIECE   0                 /* there or this is the only piece */
        !           170: #define OCI_FIRST_PIECE 1                        /* the first of many pieces */
        !           171: #define OCI_NEXT_PIECE  2                         /* the next of many pieces */
        !           172: #define OCI_LAST_PIECE  3                   /* the last piece of this column */
        !           173: #endif
        !           174: 
        !           175: #ifndef SQLDEF 
        !           176: 
        !           177: /* input data types */
        !           178: #define SQLT_CHR  1                        /* (ORANET TYPE) character string */
        !           179: #define SQLT_NUM  2                          /* (ORANET TYPE) oracle numeric */
        !           180: #define SQLT_INT  3                                 /* (ORANET TYPE) integer */
        !           181: #define SQLT_FLT  4                   /* (ORANET TYPE) Floating point number */
        !           182: #define SQLT_STR  5                                /* zero terminated string */
        !           183: #define SQLT_VNU  6                        /* NUM with preceding length byte */
        !           184: #define SQLT_PDN  7                  /* (ORANET TYPE) Packed Decimal Numeric */
        !           185: #define SQLT_LNG  8                                                  /* long */
        !           186: #define SQLT_VCS  9                             /* Variable character string */
        !           187: #define SQLT_NON  10                      /* Null/empty PCC Descriptor entry */
        !           188: #define SQLT_RID  11                                                /* rowid */
        !           189: #define SQLT_DAT  12                                /* date in oracle format */
        !           190: #define SQLT_VBI  15                                 /* binary in VCS format */
        !           191: #define SQLT_BIN  23                                  /* binary data(DTYBIN) */
        !           192: #define SQLT_LBI  24                                          /* long binary */
        !           193: #define SQLT_UIN  68                                     /* unsigned integer */
        !           194: #define SQLT_SLS  91                        /* Display sign leading separate */
        !           195: #define SQLT_LVC  94                                  /* Longer longs (char) */
        !           196: #define SQLT_LVB  95                                  /* Longer long binary */ 
        !           197: #define SQLT_AFC  96                                      /* Ansi fixed char */
        !           198: #define SQLT_AVC  97                                        /* Ansi Var char */
        !           199: #define SQLT_CUR  102                                        /* cursor  type */
        !           200: #define SQLT_RDD  104                                    /* rowid descriptor */
        !           201: #define SQLT_LAB  105                                          /* label type */
        !           202: #define SQLT_OSL  106                                        /* oslabel type */
        !           203: 
        !           204: #define SQLT_NTY  108                                   /* named object type */
        !           205: #define SQLT_REF  110                                            /* ref type */
        !           206: #define SQLT_CLOB 112                                       /* character lob */
        !           207: #define SQLT_BLOB 113                                          /* binary lob */
        !           208: #define SQLT_BFILEE 114                                    /* binary file lob */
        !           209: #define SQLT_CFILEE 115                                 /* character file lob */
        !           210: #define SQLT_RSET 116                                     /* result set type */
        !           211: #define SQLT_NCO  122      /* named collection type (varray or nested table) */
        !           212: #define SQLT_VST  155                                      /* OCIString type */
        !           213: #define SQLT_ODT  156                                        /* OCIDate type */
        !           214: 
        !           215: /* datetimes and intervals */
        !           216: #define SQLT_DATE                      184                      /* ANSI Date */
        !           217: #define SQLT_TIME                      185                           /* TIME */
        !           218: #define SQLT_TIME_TZ                   186            /* TIME WITH TIME ZONE */
        !           219: #define SQLT_TIMESTAMP                 187                      /* TIMESTAMP */
        !           220: #define SQLT_TIMESTAMP_TZ              188       /* TIMESTAMP WITH TIME ZONE */
        !           221: #define SQLT_INTERVAL_YM               189         /* INTERVAL YEAR TO MONTH */
        !           222: #define SQLT_INTERVAL_DS               190         /* INTERVAL DAY TO SECOND */
        !           223: #define SQLT_TIMESTAMP_LTZ             232        /* TIMESTAMP WITH LOCAL TZ */
        !           224: 
        !           225: /* cxcheng: this has been added for backward compatibility -
        !           226:    it needs to be here because ocidfn.h can get included ahead of sqldef.h */
        !           227: #define SQLT_FILE SQLT_BFILEE                              /* binary file lob */
        !           228: #define SQLT_CFILE SQLT_CFILEE
        !           229: #define SQLT_BFILE SQLT_BFILEE
        !           230:  
        !           231: /* CHAR/NCHAR/VARCHAR2/NVARCHAR2/CLOB/NCLOB char set "form" information */
        !           232: #define SQLCS_IMPLICIT 1     /* for CHAR, VARCHAR2, CLOB w/o a specified set */
        !           233: #define SQLCS_NCHAR    2                  /* for NCHAR, NCHAR VARYING, NCLOB */
        !           234: #define SQLCS_EXPLICIT 3   /* for CHAR, etc, with "CHARACTER SET ..." syntax */
        !           235: #define SQLCS_FLEXIBLE 4                 /* for PL/SQL "flexible" parameters */
        !           236: #define SQLCS_LIT_NULL 5      /* for typecheck of NULL and empty_clob() lits */
        !           237: 
        !           238: #endif  /* SQLDEF */
        !           239: #endif  /* OCIDFN */

E-mail: