OCILIB (C Driver for Oracle) 3.9.2
D:/Perso/dev/ocilib/ocilib/src/oci_defs.h
00001 /*
00002     +-----------------------------------------------------------------------------------------+
00003     |                                                                                         |
00004     |                               OCILIB - C Driver for Oracle                              |
00005     |                                                                                         |
00006     |                                (C Wrapper for Oracle OCI)                               |
00007     |                                                                                         |
00008     |                              Website : http://www.ocilib.net                            |
00009     |                                                                                         |
00010     |             Copyright (c) 2007-2011 Vincent ROGIER <vince.rogier@ocilib.net>            |
00011     |                                                                                         |
00012     +-----------------------------------------------------------------------------------------+
00013     |                                                                                         |
00014     |             This library is free software; you can redistribute it and/or               |
00015     |             modify it under the terms of the GNU Lesser General Public                  |
00016     |             License as published by the Free Software Foundation; either                |
00017     |             version 2 of the License, or (at your option) any later version.            |
00018     |                                                                                         |
00019     |             This library is distributed in the hope that it will be useful,             |
00020     |             but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00021     |             MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU           |
00022     |             Lesser General Public License for more details.                             |
00023     |                                                                                         |
00024     |             You should have received a copy of the GNU Lesser General Public            |
00025     |             License along with this library; if not, write to the Free                  |
00026     |             Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.          |
00027     |                                                                                         |
00028     +-----------------------------------------------------------------------------------------+
00029 
00030     +-----------------------------------------------------------------------------------------+
00031     |                                                                                         |
00032     |                                       IMPORTANT NOTICE                                  |
00033     |                                                                                         |
00034     +-----------------------------------------------------------------------------------------+
00035     |                                                                                         |
00036     |             THIS FILE CONTAINS CONSTANTS AND STRUCTURES DECLARATIONS THAT WERE          |
00037     |             PICKED UP FROM ORACLE PUBLIC HEADER FILES.                                  |
00038     |                                                                                         |
00039     |             SO THE CONTENT OF THIS FILE IS UNDER ORACLE COPYRIGHT AND THE               |
00040     |             DECLARATIONS REPRODUCED HERE ARE ORIGINALLY WRITTEN BY ORACLE               |
00041     |             CORPORATION.                                                                |
00042     |                                                                                         |
00043     |             THE AUTHOR OF OCILIB LIBRARY HAS NOT WRITTEN THE CONTENT OF THIS            |
00044     |             FILE AND HAS PARTIALLY INTEGRATED SOME ORACLE OCI DEFINITONS TO             |
00045     |             ALLOW COMPILATION OF THIS OPEN SOURCE LIBRARY WITHOUT HAVING                |
00046     |             ORACLE PRODUCTS INSTALLED ON DEVELOPMENT ENVIRONMENTS                       |
00047     |                                                                                         |
00048     +-----------------------------------------------------------------------------------------+
00049 */
00050 
00051 /* --------------------------------------------------------------------------------------------- *
00052  * $Id: oci_defs.h, v 3.9.2 2011-07-13 00:00 Vincent Rogier $
00053  * --------------------------------------------------------------------------------------------- */
00054 
00055 #ifndef OCILIB_OCI_DEFS_H_INCLUDED
00056 #define OCILIB_OCI_DEFS_H_INCLUDED
00057 
00058 #include "oci_types.h"
00059 
00060 /*---------------------------------------------------------------------------
00061                      PUBLIC TYPES AND CONSTANTS
00062   ---------------------------------------------------------------------------*/
00063 
00064 /* input data types */
00065 
00066 #define SQLT_CHR  1                        /* (ORANET TYPE) character string */
00067 #define SQLT_NUM  2                          /* (ORANET TYPE) oracle numeric */
00068 #define SQLT_INT  3                                 /* (ORANET TYPE) integer */
00069 #define SQLT_FLT  4                   /* (ORANET TYPE) Floating point number */
00070 #define SQLT_STR  5                                /* zero terminated string */
00071 #define SQLT_VNU  6                        /* NUM with preceding length byte */
00072 #define SQLT_PDN  7                  /* (ORANET TYPE) Packed Decimal Numeric */
00073 #define SQLT_LNG  8                                                  /* long */
00074 #define SQLT_VCS  9                             /* Variable character string */
00075 #define SQLT_NON  10                      /* Null/empty PCC Descriptor entry */
00076 #define SQLT_RID  11                                                /* rowid */
00077 #define SQLT_DAT  12                                /* date in oracle format */
00078 #define SQLT_VBI  15                                 /* binary in VCS format */
00079 #define SQLT_BFLOAT 21                                /* Native Binary float*/
00080 #define SQLT_BDOUBLE 22                             /* NAtive binary double */
00081 #define SQLT_BIN  23                                  /* binary data(DTYBIN) */
00082 #define SQLT_LBI  24                                          /* long binary */
00083 #define SQLT_UIN  68                                     /* unsigned integer */
00084 #define SQLT_SLS  91                        /* Display sign leading separate */
00085 #define SQLT_LVC  94                                  /* Longer longs (char) */
00086 #define SQLT_LVB  95                                   /* Longer long binary */
00087 #define SQLT_AFC  96                                      /* Ansi fixed char */
00088 #define SQLT_AVC  97                                        /* Ansi Var char */
00089 #define SQLT_IBFLOAT  100                          /* binary float canonical */
00090 #define SQLT_IBDOUBLE 101                         /* binary double canonical */
00091 #define SQLT_CUR  102                                        /* cursor  type */
00092 #define SQLT_RDD  104                                    /* rowid descriptor */
00093 #define SQLT_LAB  105                                          /* label type */
00094 #define SQLT_OSL  106                                        /* oslabel type */
00095 
00096 #define SQLT_NTY  108                                   /* named object type */
00097 #define SQLT_REF  110                                            /* ref type */
00098 #define SQLT_CLOB 112                                       /* character lob */
00099 #define SQLT_BLOB 113                                          /* binary lob */
00100 #define SQLT_BFILEE 114                                   /* binary file lob */
00101 #define SQLT_CFILEE 115                                /* character file lob */
00102 #define SQLT_RSET 116                                     /* result set type */
00103 #define SQLT_NCO  122      /* named collection type (varray or nested table) */
00104 #define SQLT_VST  155                                      /* OCIString type */
00105 #define SQLT_ODT  156                                        /* OCIDate type */
00106 
00107 /* datetimes and intervals */
00108 #define SQLT_DATE                      184                      /* ANSI Date */
00109 #define SQLT_TIME                      185                           /* TIME */
00110 #define SQLT_TIME_TZ                   186            /* TIME WITH TIME ZONE */
00111 #define SQLT_TIMESTAMP                 187                      /* TIMESTAMP */
00112 #define SQLT_TIMESTAMP_TZ              188       /* TIMESTAMP WITH TIME ZONE */
00113 #define SQLT_INTERVAL_YM               189         /* INTERVAL YEAR TO MONTH */
00114 #define SQLT_INTERVAL_DS               190         /* INTERVAL DAY TO SECOND */
00115 #define SQLT_TIMESTAMP_LTZ             232        /* TIMESTAMP WITH LOCAL TZ */
00116 
00117 /* cxcheng: this has been added for backward compatibility -
00118    it needs to be here because ocidfn.h can get included ahead of sqldef.h */
00119 #define SQLT_FILE SQLT_BFILEE                              /* binary file lob */
00120 #define SQLT_CFILE SQLT_CFILEE
00121 #define SQLT_BFILE SQLT_BFILEE
00122 
00123 #define SQLT_PNTY   241               /* pl/sql representation of named types */
00124 
00125 /* CHAR/NCHAR/VARCHAR2/NVARCHAR2/CLOB/NCLOB char set "form" information */
00126 #define SQLCS_IMPLICIT 1     /* for CHAR, VARCHAR2, CLOB w/o a specified set */
00127 #define SQLCS_NCHAR    2                  /* for NCHAR, NCHAR VARYING, NCLOB */
00128 #define SQLCS_EXPLICIT 3   /* for CHAR, etc, with "CHARACTER SET ..." syntax */
00129 #define SQLCS_FLEXIBLE 4                 /* for PL/SQL "flexible" parameters */
00130 #define SQLCS_LIT_NULL 5      /* for typecheck of NULL and empty_clob() lits */
00131 
00132 /*-----------------------------Handle Types----------------------------------*/
00133 /* handle types range from 1 - 49 */
00134 #define OCI_HTYPE_FIRST          1             /* start value of handle type */
00135 #define OCI_HTYPE_ENV            1                     /* environment handle */
00136 #define OCI_HTYPE_ERROR          2                           /* error handle */
00137 #define OCI_HTYPE_SVCCTX         3                         /* service handle */
00138 #define OCI_HTYPE_STMT           4                       /* statement handle */
00139 #define OCI_HTYPE_BIND           5                            /* bind handle */
00140 #define OCI_HTYPE_DEFINE         6                          /* define handle */
00141 #define OCI_HTYPE_DESCRIBE       7                        /* describe handle */
00142 #define OCI_HTYPE_SERVER         8                          /* server handle */
00143 #define OCI_HTYPE_SESSION        9                  /* authentication handle */
00144 #define OCI_HTYPE_AUTHINFO      OCI_HTYPE_SESSION  /* SessionGet auth handle */
00145 #define OCI_HTYPE_SUBSCRIPTION  13                    /* subscription handle */
00146 #define OCI_HTYPE_DIRPATH_CTX   14                    /* direct path context */
00147 #define OCI_HTYPE_DIRPATH_COLUMN_ARRAY 15        /* direct path column array */
00148 #define OCI_HTYPE_DIRPATH_STREAM       16              /* direct path stream */
00149 #define OCI_HTYPE_TRANS         10                     /* transaction handle */
00150 #define OCI_HTYPE_CPOOL         26                 /* connection pool handle */
00151 #define OCI_HTYPE_SPOOL         27                    /* session pool handle */
00152 #define OCI_HTYPE_ADMIN         28                           /* admin handle */
00153 
00154 /*-------------------------Descriptor Types----------------------------------*/
00155 
00156 #define OCI_DTYPE_LOB 50                                     /* lob  locator */
00157 #define OCI_DTYPE_PARAM 53  /* a parameter descriptor obtained from ocigparm */
00158 #define OCI_DTYPE_FILE 56                                /* File Lob locator */
00159 #define OCI_DTYPE_AQENQ_OPTIONS 57                        /* enqueue options */
00160 #define OCI_DTYPE_AQDEQ_OPTIONS 58                        /* dequeue options */
00161 #define OCI_DTYPE_AQMSG_PROPERTIES 59                  /* message properties */
00162 #define OCI_DTYPE_AQAGENT 60                                     /* aq agent */
00163 #define OCI_DTYPE_INTERVAL_YM 62                      /* Interval year month */
00164 #define OCI_DTYPE_INTERVAL_DS 63                      /* Interval day second */
00165 #define OCI_DTYPE_DATE 65                                            /* Date */
00166 #define OCI_DTYPE_TIME 66                                            /* Time */
00167 #define OCI_DTYPE_TIME_TZ 67                           /* Time with timezone */
00168 #define OCI_DTYPE_TIMESTAMP 68                                  /* Timestamp */
00169 #define OCI_DTYPE_TIMESTAMP_TZ 69                 /* Timestamp with timezone */
00170 #define OCI_DTYPE_TIMESTAMP_LTZ 70                /* Timestamp with local tz */
00171 #define OCI_DTYPE_CHDES         77          /* Top level change notification
00172                                              *desc */
00173 #define OCI_DTYPE_TABLE_CHDES   78          /* Table change descriptor
00174                                              *          */
00175 #define OCI_DTYPE_ROW_CHDES     79          /* Row change descriptor
00176                                              *           */
00177 
00178 /*---------------------------------------------------------------------------*/
00179 
00180 /*--------------------------------LOB types ---------------------------------*/
00181 #define OCI_TEMP_BLOB 1                /* LOB type - BLOB ------------------ */
00182 #define OCI_TEMP_CLOB 2                /* LOB type - CLOB ------------------ */
00183 /*---------------------------------------------------------------------------*/
00184 
00185 /*--------------------------Attribute Types----------------------------------*/
00186 
00187 #define OCI_ATTR_OBJECT   2 /* is the environment initialized in object mode */
00188 #define OCI_ATTR_SQLCODE  4                                  /* the SQL verb */
00189 #define OCI_ATTR_ENV  5                            /* the environment handle */
00190 #define OCI_ATTR_SERVER 6                               /* the server handle */
00191 #define OCI_ATTR_SESSION 7                        /* the user session handle */
00192 #define OCI_ATTR_TRANS   8                         /* the transaction handle */
00193 #define OCI_ATTR_ROW_COUNT   9                  /* the rows processed so far */
00194 #define OCI_ATTR_SQLFNCODE 10               /* the SQL verb of the statement */
00195 #define OCI_ATTR_PREFETCH_ROWS  11    /* sets the number of rows to prefetch */
00196 #define OCI_ATTR_NESTED_PREFETCH_ROWS 12 /* the prefetch rows of nested table*/
00197 #define OCI_ATTR_PREFETCH_MEMORY 13         /* memory limit for rows fetched */
00198 #define OCI_ATTR_NESTED_PREFETCH_MEMORY 14   /* memory limit for nested rows */
00199 #define OCI_ATTR_PDSCL          16                   /* packed decimal scale */
00200 #define OCI_ATTR_FSPRECISION OCI_ATTR_PDSCL
00201 
00202 /* fs prec for datetime data types */
00203 #define OCI_ATTR_PDPRC          17                  /* packed decimal format */
00204 #define OCI_ATTR_LFPRECISION OCI_ATTR_PDPRC
00205 
00206 /* fs prec for datetime data types */
00207 
00208 #define OCI_ATTR_PARAM_COUNT 18       /* number of column in the select list */
00209 #define OCI_ATTR_ROWID   19                                     /* the rowid */
00210 #define OCI_ATTR_CHARSET  20                      /* the character set value */
00211 #define OCI_ATTR_USERNAME 22                           /* username attribute */
00212 #define OCI_ATTR_PASSWORD 23                           /* password attribute */
00213 #define OCI_ATTR_STMT_TYPE   24                            /* statement type */
00214 #define OCI_ATTR_XID     27           /* XOPEN defined global transaction id */
00215 #define OCI_ATTR_CHARSET_ID 31                           /* Character Set ID */
00216 #define OCI_ATTR_CHARSET_FORM 32                       /* Character Set Form */
00217 #define OCI_ATTR_MAXDATA_SIZE 33       /* Maximumsize of data on the server  */
00218 #define OCI_ATTR_ROWS_RETURNED 42
00219 
00220 #define OCI_ATTR_FOCBK        43              /* Failover Callback attribute */
00221 
00222 
00223 /* Number of rows returned in current iter - for Bind handles */
00224 
00225 #define OCI_ATTR_LOBEMPTY               45                    /* empty lob ? */
00226 
00227 #define OCI_ATTR_VISIBILITY             47                     /* visibility */
00228 #define OCI_ATTR_RELATIVE_MSGID         48            /* relative message id */
00229 #define OCI_ATTR_SEQUENCE_DEVIATION     49             /* sequence deviation */
00230 
00231 #define OCI_ATTR_CONSUMER_NAME          50                  /* consumer name */
00232 #define OCI_ATTR_DEQ_MODE               51                   /* dequeue mode */
00233 #define OCI_ATTR_NAVIGATION             52                     /* navigation */
00234 #define OCI_ATTR_WAIT                   53                           /* wait */
00235 #define OCI_ATTR_DEQ_MSGID              54             /* dequeue message id */
00236 
00237 #define OCI_ATTR_PRIORITY               55                       /* priority */
00238 #define OCI_ATTR_DELAY                  56                          /* delay */
00239 #define OCI_ATTR_EXPIRATION             57                     /* expiration */
00240 #define OCI_ATTR_CORRELATION            58                 /* correlation id */
00241 #define OCI_ATTR_ATTEMPTS               59                  /* # of attempts */
00242 #define OCI_ATTR_RECIPIENT_LIST         60                 /* recipient list */
00243 #define OCI_ATTR_EXCEPTION_QUEUE        61           /* exception queue name */
00244 #define OCI_ATTR_ENQ_TIME               62 /* enqueue time (only OCIAttrGet) */
00245 #define OCI_ATTR_MSG_STATE              63 /* message state (only OCIAttrGet) */
00246 /* NOTE: 64-66 used below */
00247 #define OCI_ATTR_AGENT_NAME             64                     /* agent name */
00248 #define OCI_ATTR_AGENT_ADDRESS          65                  /* agent address */
00249 #define OCI_ATTR_AGENT_PROTOCOL         66                 /* agent protocol */
00250 #define OCI_ATTR_USER_PROPERTY          67                  /* user property */
00251 #define OCI_ATTR_SENDER_ID              68                      /* sender id */
00252 #define OCI_ATTR_ORIGINAL_MSGID         69            /* original message id */
00253 
00254 #define OCI_ATTR_NUM_DML_ERRORS         73       /* num of errs in array DML */
00255 #define OCI_ATTR_DML_ROW_OFFSET         74        /* row offset in the array */
00256 
00257 #define OCI_ATTR_DATEFORMAT             75     /* default date format string */
00258 #define OCI_ATTR_BUF_ADDR               76                 /* buffer address */
00259 #define OCI_ATTR_BUF_SIZE               77                    /* buffer size */
00260 #define OCI_ATTR_NUM_ROWS               81 /* number of rows in column array */
00261 #define OCI_ATTR_COL_COUNT              82 /* columns of column array
00262                                                      processed so far.       */
00263 
00264 #define OCI_ATTR_SUBSCR_NAME            94           /* name of subscription */
00265 #define OCI_ATTR_SUBSCR_CALLBACK        95            /* associated callback */
00266 #define OCI_ATTR_SUBSCR_CTX             96    /* associated callback context */
00267 #define OCI_ATTR_SUBSCR_PAYLOAD         97             /* associated payload */
00268 #define OCI_ATTR_SUBSCR_NAMESPACE       98           /* associated namespace */
00269 
00270 #define OCI_ATTR_NUM_COLS              102              /* number of columns */
00271 #define OCI_ATTR_LIST_COLUMNS          103   /* parameter of the column list */
00272 
00273 #define OCI_ATTR_PARAM                 124           /* parameter descriptor */
00274 #define OCI_ATTR_PARSE_ERROR_OFFSET    129             /* Parse Error offset */
00275 
00276 #define OCI_ATTR_SERVER_STATUS         143        /* state of the server hdl */
00277 
00278 #define OCI_ATTR_CURRENT_POSITION      164      /* for scrollable result sets*/
00279 #define OCI_ATTR_STMTCACHESIZE         176         /* size of the stmt cache */
00280 
00281 #define OCI_ATTR_CONN_NOWAIT           178
00282 #define OCI_ATTR_CONN_BUSY_COUNT       179
00283 #define OCI_ATTR_CONN_OPEN_COUNT       180
00284 #define OCI_ATTR_CONN_TIMEOUT          181
00285 #define OCI_ATTR_STMT_STATE            182
00286 #define OCI_ATTR_CONN_MIN              183
00287 #define OCI_ATTR_CONN_MAX              184
00288 #define OCI_ATTR_CONN_INCR             185
00289 #define OCI_ATTR_ROWS_FETCHED          197      /* rows fetched in last call */
00290 #define OCI_ATTR_SPOOL_STMTCACHESIZE   208        /*Stmt cache size of pool  */
00291 
00292 #define OCI_ATTR_TYPECODE              216           /* object or collection */
00293 #define OCI_ATTR_COLLECTION_TYPECODE   217         /* varray or nested table */
00294 #define OCI_ATTR_IS_PREDEFINED_TYPE    221              /* a predefined type */
00295 
00296 #define OCI_ATTR_SUBSCR_TIMEOUT        227                        /* Timeout */
00297 
00298 #define OCI_ATTR_COLLECTION_ELEMENT    227     /* has a collection attribute */
00299 #define OCI_ATTR_NUM_TYPE_ATTRS        228      /* number of attribute types */
00300 #define OCI_ATTR_LIST_TYPE_ATTRS       229        /* list of type attributes */
00301 
00302 #define OCI_ATTR_CLIENT_IDENTIFIER     278       /* value of client id to set*/
00303 
00304 #define OCI_ATTR_CHAR_USED             285          /* char length semantics */
00305 #define OCI_ATTR_CHAR_SIZE             286                    /* char length */
00306 
00307 #define OCI_ATTR_EVTCBK                304                    /* ha callback */
00308 #define OCI_ATTR_EVTCTX                305            /* ctx for ha callback */
00309 
00310 #define OCI_ATTR_SPOOL_TIMEOUT         308                /* session timeout */
00311 #define OCI_ATTR_SPOOL_GETMODE         309               /* session get mode */
00312 #define OCI_ATTR_SPOOL_BUSY_COUNT      310             /* busy session count */
00313 #define OCI_ATTR_SPOOL_OPEN_COUNT      311             /* open session count */
00314 #define OCI_ATTR_SPOOL_MIN             312              /* min session count */
00315 #define OCI_ATTR_SPOOL_MAX             313              /* max session count */
00316 #define OCI_ATTR_SPOOL_INCR            314        /* session increment count */
00317 
00318 #define OCI_ATTR_TRANSACTION_NO        365              /* AQ enq txn number */
00319 
00320 #define OCI_ATTR_MODULE                366             /* module for tracing */
00321 #define OCI_ATTR_ACTION                367             /* action for tracing */
00322 #define OCI_ATTR_CLIENT_INFO           368                    /* client info */
00323 
00324 #define OCI_ATTR_ADMIN_PFILE           389         /* client-side param file */
00325 
00326 #define OCI_ATTR_SUBSCR_PORTNO         390       /* port no to listen        */
00327 
00328 #define OCI_ATTR_HOSTNAME              390           /* SYS_CONTEXT hostname */
00329 #define OCI_ATTR_DBNAME                391             /* SYS_CONTEXT dbname */
00330 #define OCI_ATTR_INSTNAME              392      /* SYS_CONTEXT instance name */
00331 #define OCI_ATTR_SERVICENAME           393       /* SYS_CONTEXT service name */
00332 #define OCI_ATTR_INSTSTARTTIME         394 /* v$instance instance start time */
00333 #define OCI_ATTR_HA_TIMESTAMP          395                     /* event time */
00334 #define OCI_ATTR_DBDOMAIN              399                      /* db domain */
00335 #define OCI_ATTR_EVENTTYPE               400                     /* event type */
00336 #define OCI_ATTR_HA_SOURCE               401
00337 #define OCI_ATTR_HA_STATUS               402
00338 #define OCI_ATTR_HA_SRVFIRST           403
00339 #define OCI_ATTR_HA_SRVNEXT            404
00340 #define OCI_ATTR_TAF_ENABLED           405
00341 #define OCI_ATTR_DRIVER_NAME           424                    /* Driver Name */
00342 
00343 /*------- Temporary attribute value for UCS2/UTF16 character set ID -------- */
00344 
00345 #define OCI_UCS2ID                     1000               /* UCS2 charset ID */
00346 #define OCI_UTF16ID                    1000              /* UTF16 charset ID */
00347 
00348 /*-------------------------Credential Types----------------------------------*/
00349 
00350 #define OCI_CRED_RDBMS      1                  /* database username/password */
00351 #define OCI_CRED_EXT        2             /* externally provided credentials */
00352 #define OCI_CRED_PROXY      3                        /* proxy authentication */
00353 
00354 /*------------------------Error Return Values--------------------------------*/
00355 
00356 #define OCI_SUCCESS 0                      /* maps to SQL_SUCCESS of SAG CLI */
00357 #define OCI_SUCCESS_WITH_INFO 1             /* maps to SQL_SUCCESS_WITH_INFO */
00358 #define OCI_NO_DATA 100                               /* maps to SQL_NO_DATA */
00359 #define OCI_ERROR -1                                    /* maps to SQL_ERROR */
00360 #define OCI_INVALID_HANDLE -2                  /* maps to SQL_INVALID_HANDLE */
00361 #define OCI_NEED_DATA 99                            /* maps to SQL_NEED_DATA */
00362 #define OCI_STILL_EXECUTING -3123                   /* OCI would block error */
00363 
00364 /*---------------- Server Handle Attribute Values ---------------------------*/
00365 
00366 #define OCI_SERVER_NOT_CONNECTED    0x0
00367 #define OCI_SERVER_NORMAL           0x1
00368 
00369 /*--------------------- User Callback Return Values -------------------------*/
00370 #define OCI_CONTINUE -24200    /* Continue with the body of the OCI function */
00371 
00372 /*------------------------Attach Modes---------------------------------------*/
00373 
00374 #define OCI_CPOOL            0x0200  /* Attach using server handle from pool */
00375 
00376 /*------------------DateTime and Interval check Error codes------------------*/
00377 
00378 #define   OCI_DT_INVALID_DAY         0x1                          /* Bad day */
00379 #define   OCI_DT_DAY_BELOW_VALID     0x2      /* Bad DAy Low/high bit (1=low)*/
00380 #define   OCI_DT_INVALID_MONTH       0x4                       /*  Bad MOnth */
00381 #define   OCI_DT_MONTH_BELOW_VALID   0x8   /* Bad MOnth Low/high bit (1=low) */
00382 #define   OCI_DT_INVALID_YEAR        0x10                        /* Bad YeaR */
00383 #define   OCI_DT_YEAR_BELOW_VALID    0x20  /*  Bad YeaR Low/high bit (1=low) */
00384 #define   OCI_DT_INVALID_HOUR        0x40                       /*  Bad HouR */
00385 #define   OCI_DT_HOUR_BELOW_VALID    0x80   /* Bad HouR Low/high bit (1=low) */
00386 #define   OCI_DT_INVALID_MINUTE      0x100                     /* Bad MiNute */
00387 #define   OCI_DT_MINUTE_BELOW_VALID  0x200 /*Bad MiNute Low/high bit (1=low) */
00388 #define   OCI_DT_INVALID_SECOND      0x400                    /*  Bad SeCond */
00389 #define   OCI_DT_SECOND_BELOW_VALID  0x800  /*bad second Low/high bit (1=low)*/
00390 #define   OCI_DT_DAY_MISSING_FROM_1582 0x1000
00391 
00392 /*  Day is one of those "missing" from 1582 */
00393 #define   OCI_DT_YEAR_ZERO           0x2000       /* Year may not equal zero */
00394 #define   OCI_DT_INVALID_TIMEZONE    0x4000                 /*  Bad Timezone */
00395 #define   OCI_DT_INVALID_FORMAT      0x8000         /* Bad date format input */
00396 
00397 /*------------------------Scrollable Cursor Fetch Options-------------------
00398  * For non-scrollable cursor, the only valid (and default) orientation is
00399  * OCI_FETCH_NEXT
00400  */
00401 #define OCI_FETCH_CURRENT     0x01           /* refetching current position  */
00402 #define OCI_FETCH_NEXT        0x02                               /* next row */
00403 #define OCI_FETCH_FIRST       0x04            /* first row of the result set */
00404 #define OCI_FETCH_LAST        0x08         /* the last row of the result set */
00405 #define OCI_FETCH_PRIOR       0x10   /* the previous row relative to current */
00406 #define OCI_FETCH_ABSOLUTE    0x20             /* absolute offset from first */
00407 #define OCI_FETCH_RELATIVE    0x40             /* offset relative to current */
00408 #define OCI_FETCH_RESERVED_1  0x80                               /* reserved */
00409 
00410 /*------------------------Parse mode ----------------------------------------*/
00411 
00412 #define OCI_NTV_SYNTAX 1    /* Use what so ever is the native lang of server */
00413 
00414 /*------------------------Bind and Define Options----------------------------*/
00415 
00416 #define OCI_DATA_AT_EXEC      0x00000002             /* data at execute time */
00417 #define OCI_DYNAMIC_FETCH     0x00000002                /* fetch dynamically */
00418 #define OCI_PIECEWISE         0x00000004          /* piecewise DMLs or fetch */
00419 #define OCI_BIND_SOFT         0x00000040              /* soft bind or define */
00420 #define OCI_DEFINE_SOFT       0x00000080              /* soft bind or define */
00421 
00422 /*----------------------- Execution Modes -----------------------------------*/
00423 
00424 #define OCI_BATCH_MODE             0x00000001 /* batch the oci stmt for exec */
00425 #define OCI_STMT_SCROLLABLE_READONLY \
00426                                    0x00000008 /* if result set is scrollable */
00427 #define OCI_DESCRIBE_ONLY          0x00000010 /* only describe the statement */
00428 #define OCI_BATCH_ERRORS           0x00000080  /* batch errors in array dmls */
00429 #define OCI_PARSE_ONLY             0x00000100    /* only parse the statement */
00430 
00431 /*-----------------------------  Various Modes ------------------------------*/
00432 #define OCI_DEFAULT         0x00000000
00433 #define OCI_THREADED        0x00000001      /* appl. in threaded environment */
00434 #define OCI_OBJECT          0x00000002  /* application in object environment */
00435 #define OCI_EVENTS          0x00000004  /* application is enabled for events */
00436 #define OCI_UTF16           0x00004000        /* mode for all UTF16 metadata */
00437 
00438 /*------------------------Authentication Modes-------------------------------*/
00439 #define OCI_SYSDBA          0x00000002           /* for SYSDBA authorization */
00440 #define OCI_SYSOPER         0x00000004          /* for SYSOPER authorization */
00441 #define OCI_PRELIM_AUTH     0x00000008      /* for preliminary authorization */
00442 #define OCI_STMT_CACHE      0x00000040            /* enable OCI Stmt Caching */
00443 
00444 /*------------------------ Transaction Start Flags --------------------------*/
00445 
00446 #define OCI_TRANS_NEW          0x00000001 /* starts a new transaction branch */
00447 #define OCI_TRANS_JOIN         0x00000002    /* join an existing transaction */
00448 #define OCI_TRANS_RESUME       0x00000004         /* resume this transaction */
00449 #define OCI_TRANS_STARTMASK    0x000000ff
00450 
00451 #define OCI_TRANS_READONLY     0x00000100   /* starts a readonly transaction */
00452 #define OCI_TRANS_READWRITE    0x00000200 /* starts a read-write transaction */
00453 #define OCI_TRANS_SERIALIZABLE 0x00000400
00454 
00455 /* starts a serializable transaction */
00456 #define OCI_TRANS_ISOLMASK     0x0000ff00
00457 
00458 #define OCI_TRANS_LOOSE        0x00010000        /* a loosely coupled branch */
00459 #define OCI_TRANS_TIGHT        0x00020000        /* a tightly coupled branch */
00460 #define OCI_TRANS_TYPEMASK     0x000f0000
00461 
00462 #define OCI_TRANS_NOMIGRATE    0x00100000      /* non migratable transaction */
00463 #define OCI_TRANS_SEPARABLE    0x00200000  /* separable transaction (8.1.6+) */
00464 #define OCI_TRANS_OTSRESUME    0x00400000      /* OTS resuming a transaction */
00465 
00466 /*------------------------ Transaction End Flags ----------------------------*/
00467 
00468 #define OCI_TRANS_TWOPHASE      0x01000000           /* use two phase commit */
00469 #define OCI_TRANS_WRITEBATCH    0x00000001  /* force cmt-redo for local txns */
00470 #define OCI_TRANS_WRITEIMMED    0x00000002              /* no force cmt-redo */
00471 #define OCI_TRANS_WRITEWAIT     0x00000004               /* no sync cmt-redo */
00472 #define OCI_TRANS_WRITENOWAIT   0x00000008   /* sync cmt-redo for local txns */
00473 
00474 /*------------------------Describe Handle Parameter Attributes --------------*/
00475 
00476 #define OCI_ATTR_DATA_SIZE      1                /* maximum size of the data */
00477 #define OCI_ATTR_DATA_TYPE      2     /* the SQL type of the column/argument */
00478 #define OCI_ATTR_DISP_SIZE      3                        /* the display size */
00479 #define OCI_ATTR_NAME           4         /* the name of the column/argument */
00480 #define OCI_ATTR_PRECISION      5                /* precision if number type */
00481 #define OCI_ATTR_SCALE          6                    /* scale if number type */
00482 #define OCI_ATTR_IS_NULL        7                            /* is it null ? */
00483 #define OCI_ATTR_TYPE_NAME      8             /* name of the named data type */
00484 #define OCI_ATTR_SCHEMA_NAME    9                         /* the schema name */
00485 #define OCI_ATTR_SUB_NAME       10      /* type name if package private type */
00486 
00487 /*------------------------Other Constants------------------------------------*/
00488 
00489 #define OCI_ERROR_MAXMSG_SIZE   1024         /* max size of an error message */
00490 #define OCI_LOBMAXSIZE          MINUB4MAXVAL        /* maximum lob data size */
00491 #define OCI_ROWID_LEN           23
00492 
00493 /*-----------------------Handle Definitions----------------------------------*/
00494 typedef struct OCIEnv OCIEnv;                      /* OCI environment handle */
00495 typedef struct OCIError OCIError;                        /* OCI error handle */
00496 typedef struct OCISvcCtx OCISvcCtx;                    /* OCI service handle */
00497 typedef struct OCIStmt OCIStmt;                      /* OCI statement handle */
00498 typedef struct OCIBind OCIBind;                           /* OCI bind handle */
00499 typedef struct OCIDefine OCIDefine;                     /* OCI Define handle */
00500 typedef struct OCIDescribe OCIDescribe;               /* OCI Describe handle */
00501 typedef struct OCIServer OCIServer;                     /* OCI Server handle */
00502 typedef struct OCISession OCISession;           /* OCI Authentication handle */
00503 typedef struct OCIComplexObject OCIComplexObject;          /* OCI COR handle */
00504 typedef struct OCITrans OCITrans;                  /* OCI Transaction handle */
00505 typedef struct OCISecurity OCISecurity;               /* OCI Security handle */
00506 typedef struct OCISubscription OCISubscription;       /* subscription handle */
00507 
00508 typedef struct OCICPool OCICPool;                  /* connection pool handle */
00509 typedef struct OCISPool OCISPool;                     /* session pool handle */
00510 typedef struct OCIAuthInfo OCIAuthInfo;                       /* auth handle */
00511 typedef struct OCIAdmin OCIAdmin;                            /* admin handle */
00512 typedef struct OCIEvent OCIEvent;                         /* HA event handle */
00513 
00514 typedef struct OCIDirPathCtx OCIDirPathCtx;                    /* DP context */
00515 typedef struct OCIDirPathColArray OCIDirPathColArray;     /* DP column array */
00516 typedef struct OCIDirPathStream OCIDirPathStream;               /* DP stream */
00517 
00518 typedef struct OCIAQEnqOptions OCIAQEnqOptions;    /* AQ Enqueue Options hdl */
00519 typedef struct OCIAQDeqOptions OCIAQDeqOptions;    /* AQ Dequeue Options hdl */
00520 typedef struct OCIAQMsgProperties OCIAQMsgProperties;  /* AQ Mesg Properties */
00521 typedef struct OCIAQAgent OCIAQAgent;                 /* AQ Agent descriptor */
00522 typedef struct OCIAQNfyDescriptor OCIAQNfyDescriptor;   /* AQ Nfy descriptor */
00523 typedef struct OCIAQSignature OCIAQSignature;                /* AQ Siganture */
00524 typedef struct OCIAQListenOpts OCIAQListenOpts;         /* AQ listen options */
00525 typedef struct OCIAQLisMsgProps OCIAQLisMsgProps;     /* AQ listen msg props */
00526 
00527 /*---------------------------------------------------------------------------*/
00528 /*------------------------- OCISessionPoolCreate Modes ----------------------*/
00529 
00530 #define OCI_SPC_REINITIALIZE 0x0001   /* Reinitialize the session pool */
00531 #define OCI_SPC_HOMOGENEOUS  0x0002   /* Session pool is homogeneneous */
00532 #define OCI_SPC_STMTCACHE    0x0004   /* Session pool has stmt cache */
00533 
00534 /*---------------------------------------------------------------------------*/
00535 /*--------------------------- OCISessionGet Modes ---------------------------*/
00536 
00537 #define OCI_SESSGET_SPOOL      0x0001     /* SessionGet called in SPOOL mode */
00538 #define OCI_SESSGET_CPOOL      OCI_CPOOL  /* SessionGet called in CPOOL mode */
00539 #define OCI_SESSGET_STMTCACHE  0x0004                 /* Use statement cache */
00540 #define OCI_SESSGET_CREDPROXY  0x0008     /* SessionGet called in proxy mode */
00541 #define OCI_SESSGET_CREDEXT    0x0010
00542 #define OCI_SESSGET_SPOOL_MATCHANY 0x0020
00543 
00544 /*---------------------------------------------------------------------------*/
00545 /*------------------------ATTR Values for Session Pool-----------------------*/
00546 /* Attribute values for OCI_ATTR_SPOOL_GETMODE */
00547 #define OCI_SPOOL_ATTRVAL_WAIT     0         /* block till you get a session */
00548 #define OCI_SPOOL_ATTRVAL_NOWAIT   1    /* error out if no session avaliable */
00549 #define OCI_SPOOL_ATTRVAL_FORCEGET 2  /* get session even if max is exceeded */
00550 
00551 /*---------------------------------------------------------------------------*/
00552 /*--------------------------- OCISessionRelease Modes -----------------------*/
00553 
00554 #define OCI_SESSRLS_DROPSESS 0x0001                    /* Drop the Session */
00555 #define OCI_SESSRLS_RETAG    0x0002                   /* Retag the session */
00556 
00557 /*---------------------------------------------------------------------------*/
00558 /*----------------------- OCISessionPoolDestroy Modes -----------------------*/
00559 
00560 #define OCI_SPD_FORCE        0x0001       /* Force the sessions to terminate.
00561                                              Even if there are some busy
00562                                              sessions close them */
00563 
00564 /*------------------------ Fail Over Events ---------------------------------*/
00565 #define OCI_FO_END          0x00000001
00566 #define OCI_FO_ABORT        0x00000002
00567 #define OCI_FO_REAUTH       0x00000004
00568 #define OCI_FO_BEGIN        0x00000008
00569 #define OCI_FO_ERROR        0x00000010
00570 /*---------------------------------------------------------------------------*/
00571 
00572 /*------------------------ Fail Over Callback Return Codes ------------------*/
00573 #define OCI_FO_RETRY        25410
00574 /*---------------------------------------------------------------------------*/
00575 
00576 /*------------------------- Fail Over Types ---------------------------------*/
00577 #define OCI_FO_NONE           0x00000001
00578 #define OCI_FO_SESSION        0x00000002
00579 #define OCI_FO_SELECT         0x00000004
00580 #define OCI_FO_TXNAL          0x00000008
00581 
00582 /*--------------------------Failover Callback Structure ---------------------*/
00583 typedef sb4 (*OCICallbackFailover)(dvoid *svcctx, dvoid *envctx,
00584                                    dvoid *fo_ctx, ub4 fo_type,
00585                                    ub4 fo_event);
00586 
00587 typedef struct
00588 {
00589   OCICallbackFailover callback_function;
00590   dvoid *fo_ctx;
00591 }
00592 OCIFocbkStruct;
00593 
00594 /*--------------------- OCI Thread Object Definitions------------------------*/
00595 
00596 /* OCIThread Context */
00597 typedef struct OCIThreadContext OCIThreadContext;
00598 
00599 /* OCIThread Mutual Exclusion Lock */
00600 typedef struct OCIThreadMutex OCIThreadMutex;
00601 
00602 /* OCIThread Key for Thread-Specific Data */
00603 typedef struct OCIThreadKey OCIThreadKey;
00604 
00605 /* OCIThread Thread ID */
00606 typedef struct OCIThreadId OCIThreadId;
00607 
00608 /* OCIThread Thread Handle */
00609 typedef struct OCIThreadHandle OCIThreadHandle;
00610 
00611 /*--------------------- OCI Collection Object Definitions--------------------*/
00612 
00613 /* OCIColl - generic collection type */
00614 typedef struct OCIColl OCIColl;
00615 
00616 /* OCIArray - varray collection type */
00617 typedef OCIColl OCIArray;
00618 
00619 /* OCITable - nested table collection type */
00620 typedef OCIColl OCITable;
00621 
00622 /* OCIIter - collection iterator */
00623 typedef struct OCIIter OCIIter;
00624 
00625 /*-----------------------Descriptor Definitions------------------------------*/
00626 
00627 typedef struct OCISnapshot OCISnapshot;           /* OCI snapshot descriptor */
00628 typedef struct OCIResult OCIResult;             /* OCI Result Set Descriptor */
00629 typedef struct OCILobLocator OCILobLocator;    /* OCI Lob Locator descriptor */
00630 typedef struct OCIParam OCIParam;                /* OCI PARameter descriptor */
00631 typedef struct OCIDateTime OCIDateTime;           /* OCI DateTime descriptor */
00632 typedef struct OCIInterval OCIInterval;           /* OCI Interval descriptor */
00633 typedef struct OCIRowid OCIRowid;                    /* OCI ROWID descriptor */
00634 
00635 /*----------------------------- OBJECT FREE OPTION --------------------------*/
00636 
00637 #define OCI_OBJECTFREE_FORCE      (ub2)0x0001
00638 #define OCI_OBJECTFREE_NONULL     (ub2)0x0002
00639 
00640 /*-------------------------- OCINumber --------------------------------------*/
00641 
00642 #define OCI_NUMBER_UNSIGNED 0                        /* Unsigned type -- ubX */
00643 #define OCI_NUMBER_SIGNED   2                          /* Signed type -- sbX */
00644 #define OCI_NUMBER_SIZE     22
00645 
00646 struct OCINumber
00647 {
00648     ub1 OCINumberPart[OCI_NUMBER_SIZE];
00649 };
00650 
00651 /*-----------------------Objects Definitions---------------------------------*/
00652 
00653 typedef struct OCIString OCIString;
00654 typedef struct OCIRaw OCIRaw;
00655 typedef struct OCIType OCIType;
00656 typedef struct OCINumber OCINumber;
00657 typedef struct OCIRef OCIRef;
00658 
00659 /*--------------------------- OBJECT INDICATOR ------------------------------*/
00660 
00661 typedef sb2 OCIInd;
00662 
00663 /*
00664  * OCIInd -- a variable of this type contains (null) indicator information
00665  */
00666 
00667 #define OCI_IND_NOTNULL (OCIInd)0                                /* not NULL */
00668 #define OCI_IND_NULL (OCIInd)(-1)                                    /* NULL */
00669 #define OCI_IND_BADNULL (OCIInd)(-2)                             /* BAD NULL */
00670 #define OCI_IND_NOTNULLABLE (OCIInd)(-3)                     /* not NULLable */
00671 
00672 /*-------------------------Object Ptr Types----------------------------------*/
00673 #define OCI_OTYPE_NAME 1                                      /* object name */
00674 #define OCI_OTYPE_REF  2                                       /* REF to TDO */
00675 #define OCI_OTYPE_PTR  3                                       /* PTR to TDO */
00676 
00677 /*------------------------ Lob-specific Definitions -------------------------*/
00678 
00679 typedef ub4 OCILobOffset;
00680 typedef ub4 OCILobLength;
00681 
00682 /*----------------------------Piece Definitions------------------------------*/
00683 
00684 #define OCI_ONE_PIECE 0                                         /* one piece */
00685 #define OCI_FIRST_PIECE 1                                 /* the first piece */
00686 #define OCI_NEXT_PIECE 2                          /* the next of many pieces */
00687 #define OCI_LAST_PIECE 3                                   /* the last piece */
00688 
00689 /*----------------------- GET OPTIONS FOR TDO  ------------------------------*/
00690 
00691 enum OCITypeGetOpt
00692 {
00693     OCI_TYPEGET_HEADER, /* load only the header portion of the TDO           */
00694     OCI_TYPEGET_ALL     /* load all attribute and method descriptors as well */
00695 };
00696 typedef enum OCITypeGetOpt OCITypeGetOpt;
00697 
00698 /*--------------------------- OBJECT PIN OPTION -----------------------------*/
00699 
00700 enum OCIPinOpt
00701 {
00702     /* 0 = uninitialized */
00703     OCI_PIN_DEFAULT = 1,                               /* default pin option */
00704     OCI_PIN_ANY     = 3,                       /* pin any copy of the object */
00705     OCI_PIN_RECENT  = 4,                    /* pin recent copy of the object */
00706     OCI_PIN_LATEST  = 5                     /* pin latest copy of the object */
00707 };
00708 typedef enum OCIPinOpt OCIPinOpt;
00709 
00710 /*--------------------------- OBJECT LOCK OPTION ----------------------------*/
00711 
00712 enum OCILockOpt
00713 {
00714     /* 0 = uninitialized */
00715     OCI_LOCK_NONE     = 1,                         /* null (same as no lock) */
00716     OCI_LOCK_X        = 2,                                 /* exclusive lock */
00717     OCI_LOCK_X_NOWAIT = 3                    /* exclusive lock, do not wait  */
00718 };
00719 typedef enum OCILockOpt OCILockOpt;
00720 
00721 /*------------------------- OBJECT MODIFYING OPTION -------------------------*/
00722 
00723 enum OCIMarkOpt
00724 {
00725     /* 0 = uninitialized */
00726     OCI_MARK_DEFAULT = 1,             /* default (the same as OCI_MARK_NONE) */
00727     OCI_MARK_NONE    = OCI_MARK_DEFAULT,     /* object has not been modified */
00728     OCI_MARK_UPDATE                               /* object is to be updated */
00729 };
00730 typedef enum OCIMarkOpt OCIMarkOpt;
00731 
00732 /*------------------------------ TYPE CODE ----------------------------------*/
00733 
00734 /* The OCITypeCode type is interchangeable with the existing SQLT type
00735    which is a ub2 */
00736 typedef ub2 OCITypeCode;
00737 
00738 /*---------------------------  ORACLE DATE TYPE  ----------------------------*/
00739 
00740 struct OCITime
00741 {
00742     ub1 OCITimeHH;                        /* hours; range is 0 <= hours <=23 */
00743     ub1 OCITimeMI;                   /* minutes; range is 0 <= minutes <= 59 */
00744     ub1 OCITimeSS;                   /* seconds; range is 0 <= seconds <= 59 */
00745 };
00746 typedef struct OCITime OCITime;
00747 
00748 struct OCIDate
00749 {
00750     sb2     OCIDateYYYY;   /* gregorian year; range is -4712 <= year <= 9999 */
00751     ub1     OCIDateMM;                    /* month; range is 1 <= month < 12 */
00752     ub1     OCIDateDD;                       /* day; range is 1 <= day <= 31 */
00753     OCITime OCIDateTime;                                             /* time */
00754 };
00755 typedef struct OCIDate OCIDate;
00756 
00757 /*-------------------------- OBJECT Duration --------------------------------*/
00758 
00759 typedef ub2 OCIDuration;
00760 
00761 #define  OCI_DURATION_BEGIN (OCIDuration)10
00762 
00763 /* beginning sequence of duration */
00764 #define  OCI_DURATION_NULL (OCIDuration)(OCI_DURATION_BEGIN-1)
00765 
00766 /* null duration */
00767 #define  OCI_DURATION_DEFAULT (OCIDuration)(OCI_DURATION_BEGIN-2) /* default */
00768 #define  OCI_DURATION_NEXT (OCIDuration)(OCI_DURATION_BEGIN-3)
00769 
00770 /* next special duration */
00771 #define  OCI_DURATION_SESSION (OCIDuration)(OCI_DURATION_BEGIN)
00772 
00773 /* the end of user session */
00774 #define  OCI_DURATION_TRANS (OCIDuration)(OCI_DURATION_BEGIN+1)
00775 
00776 /* the end of user transaction */
00777 
00778 /*-------------------------Object Ptr Types----------------------------------*/
00779 #define OCI_OTYPE_NAME 1                                      /* object name */
00780 
00781 /*--------------------------- OCI Parameter Types ---------------------------*/
00782 #define OCI_PTYPE_UNK                 0                         /* unknown   */
00783 #define OCI_PTYPE_TABLE               1                         /* table     */
00784 #define OCI_PTYPE_VIEW                2                         /* view      */
00785 #define OCI_PTYPE_PROC                3                         /* procedure */
00786 #define OCI_PTYPE_FUNC                4                         /* function  */
00787 #define OCI_PTYPE_PKG                 5                         /* package   */
00788 #define OCI_PTYPE_TYPE                6                 /* user-defined type */
00789 #define OCI_PTYPE_SYN                 7                         /* synonym   */
00790 #define OCI_PTYPE_SEQ                 8                         /* sequence  */
00791 #define OCI_PTYPE_COL                 9                         /* column    */
00792 #define OCI_PTYPE_ARG                 10                        /* argument  */
00793 #define OCI_PTYPE_LIST                11                        /* list      */
00794 #define OCI_PTYPE_TYPE_ATTR           12    /* user-defined type's attribute */
00795 #define OCI_PTYPE_TYPE_COLL           13        /* collection type's element */
00796 #define OCI_PTYPE_TYPE_METHOD         14       /* user-defined type's method */
00797 #define OCI_PTYPE_TYPE_ARG            15   /* user-defined type method's arg */
00798 #define OCI_PTYPE_TYPE_RESULT         16 /* user-defined type method's result */
00799 #define OCI_PTYPE_SCHEMA              17                           /* schema */
00800 #define OCI_PTYPE_DATABASE            18                         /* database */
00801 #define OCI_PTYPE_RULE                19                             /* rule */
00802 #define OCI_PTYPE_RULE_SET            20                         /* rule set */
00803 #define OCI_PTYPE_EVALUATION_CONTEXT  21               /* evaluation context */
00804 #define OCI_PTYPE_TABLE_ALIAS         22                      /* table alias */
00805 #define OCI_PTYPE_VARIABLE_TYPE       23                    /* variable type */
00806 #define OCI_PTYPE_NAME_VALUE          24                  /* name value pair */
00807 
00808 /*------------------------------ TYPE CODE ----------------------------------*/
00809 
00810 #define OCI_TYPECODE_VARRAY      247         /* SQL VARRAY  OTS PAGED VARRAY */
00811 #define OCI_TYPECODE_TABLE       248              /* SQL TABLE  OTS MULTISET */
00812 
00813 /*------------------------Piece Information----------------------------------*/
00814 #define OCI_PARAM_IN 0x01                                    /* in parameter */
00815 #define OCI_PARAM_OUT 0x02                                  /* out parameter */
00816 
00817 /*----------------------- OBJECT PROPERTY ID -------------------------------*/
00818 
00819 typedef ub1 OCIObjectPropId;
00820 #define OCI_OBJECTPROP_LIFETIME 1       /* persistent or transient or value */
00821 #define OCI_OBJECTPROP_SCHEMA 2   /* schema name of table containing object */
00822 #define OCI_OBJECTPROP_TABLE 3     /* table name of table containing object */
00823 #define OCI_OBJECTPROP_PIN_DURATION 4             /* pin duartion of object */
00824 #define OCI_OBJECTPROP_ALLOC_DURATION 5         /* alloc duartion of object */
00825 #define OCI_OBJECTPROP_LOCK 6                      /* lock status of object */
00826 #define OCI_OBJECTPROP_MARKSTATUS 7                /* mark status of object */
00827 #define OCI_OBJECTPROP_VIEW 8            /* is object a view object or not? */
00828 
00829 /*----------------------- OBJECT LIFETIME ----------------------------------*/
00830 
00831 enum OCIObjectLifetime
00832 {
00833     /* 0 = uninitialized */
00834     OCI_OBJECT_PERSISTENT = 1,                         /* persistent object */
00835     OCI_OBJECT_TRANSIENT,                               /* transient object */
00836     OCI_OBJECT_VALUE                                        /* value object */
00837 };
00838 typedef enum OCIObjectLifetime OCIObjectLifetime;
00839 
00840 /*----------------------- OBJECT MARK STATUS -------------------------------*/
00841 
00842 typedef uword OCIObjectMarkStatus;
00843 #define OCI_OBJECT_NEW     0x0001                             /* new object */
00844 #define OCI_OBJECT_DELETED 0x0002                  /* object marked deleted */
00845 #define OCI_OBJECT_UPDATED 0x0004                  /* object marked updated */
00846 
00847 /*----- values for cflg argument to OCIDirpathColArrayEntrySet --------------*/
00848 
00849 #define OCI_DIRPATH_COL_COMPLETE 0                /* column data is complete */
00850 #define OCI_DIRPATH_COL_NULL     1                         /* column is null */
00851 #define OCI_DIRPATH_COL_PARTIAL  2                 /* column data is partial */
00852 #define OCI_DIRPATH_COL_ERROR    3               /* column error, ignore row */
00853 
00854 /*----- values for action parameter to OCIDirPathDataSave -------------------*/
00855 #define OCI_DIRPATH_DATASAVE_SAVEONLY 0              /* data save point only */
00856 
00857 /*------------- Supported Values for Direct Path Date cache -----------------*/
00858 #define OCI_ATTR_DIRPATH_DCACHE_NUM         303        /* date cache entries */
00859 #define OCI_ATTR_DIRPATH_DCACHE_SIZE        304          /* date cache limit */
00860 #define OCI_ATTR_DIRPATH_DCACHE_MISSES      305         /* date cache misses */
00861 #define OCI_ATTR_DIRPATH_DCACHE_HITS        306           /* date cache hits */
00862 #define OCI_ATTR_DIRPATH_DCACHE_DISABLE     307 /* on set: disable datecache */
00863 
00864 /*------------- Supported Values for Direct Path Stream Version -------------*/
00865 
00866 #define OCI_ATTR_DIRPATH_NOLOG          79               /* nologging option */
00867 #define OCI_ATTR_DIRPATH_PARALLEL       80     /* parallel (temp seg) option */
00868 
00869 /*------------------------- Database Startup Flags --------------------------*/
00870 #define OCI_DBSTARTUPFLAG_FORCE 0x00000001  /* Abort running instance, start */
00871 #define OCI_DBSTARTUPFLAG_RESTRICT 0x00000002      /* Restrict access to DBA */
00872 
00873 /*------------------------- Database Shutdown Modes -------------------------*/
00874 #define OCI_DBSHUTDOWN_TRANSACTIONAL      1 /* Wait for all the transactions */
00875 #define OCI_DBSHUTDOWN_TRANSACTIONAL_LOCAL 2  /* Wait for local transactions */
00876 #define OCI_DBSHUTDOWN_IMMEDIATE           3      /* Terminate and roll back */
00877 #define OCI_DBSHUTDOWN_ABORT              4 /* Terminate and don't roll back */
00878 #define OCI_DBSHUTDOWN_FINAL              5              /* Orderly shutdown */
00879 
00880 /*---------------------------OCIPasswordChange-------------------------------*/
00881 #define OCI_AUTH         0x08        /* Change the password but do not login */
00882 
00883 /* ------------- DB Change Notification reg handle attributes ---------------*/
00884 #define OCI_ATTR_CHNF_TABLENAMES          401     /* out: array of table names
00885                                                    *    */
00886 #define OCI_ATTR_CHNF_ROWIDS              402     /* in: rowids needed */
00887 #define OCI_ATTR_CHNF_OPERATIONS          403  /* in: notification operation
00888                                                 *filter*/
00889 #define OCI_ATTR_CHNF_CHANGELAG           404  /* txn lag between notifications
00890                                                 * */
00891 
00892 /* DB Change: Notification Descriptor attributes -----------------------*/
00893 #define OCI_ATTR_CHDES_DBNAME            405    /* source database    */
00894 #define OCI_ATTR_CHDES_NFYTYPE           406    /* notification type flags */
00895 #define OCI_ATTR_CHDES_XID               407    /* XID  of the transaction */
00896 #define OCI_ATTR_CHDES_TABLE_CHANGES     408    /* array of table chg
00897                                                  *descriptors */
00898 
00899 #define OCI_ATTR_CHDES_TABLE_NAME        409    /* table name */
00900 #define OCI_ATTR_CHDES_TABLE_OPFLAGS     410    /* table operation flags */
00901 #define OCI_ATTR_CHDES_TABLE_ROW_CHANGES 411   /* array of changed rows   */
00902 #define OCI_ATTR_CHDES_ROW_ROWID         412   /* rowid of changed row    */
00903 #define OCI_ATTR_CHDES_ROW_OPFLAGS       413   /* row operation flags     */
00904 
00905 /* Statement handle attribute for db change notification */
00906 #define OCI_ATTR_CHNF_REGHANDLE          414   /* IN: subscription handle  */
00907 
00908 /* DB Change: Event types ---------------*/
00909 #define OCI_EVENT_NONE 0x0                      /* None */
00910 #define OCI_EVENT_STARTUP 0x1                   /* Startup database */
00911 #define OCI_EVENT_SHUTDOWN 0x2                  /* Shutdown database */
00912 #define OCI_EVENT_SHUTDOWN_ANY 0x3              /* Startup instance */
00913 #define OCI_EVENT_DROP_DB 0x4                   /* Drop database    */
00914 #define OCI_EVENT_DEREG 0x5                     /* Subscription deregistered */
00915 #define OCI_EVENT_OBJCHANGE 0x6                 /* Object change notification */
00916 
00917 /* DB Change: Operation types -----------*/
00918 #define OCI_OPCODE_ALLROWS 0x1                 /* all rows invalidated  */
00919 #define OCI_OPCODE_ALLOPS 0x0                  /* interested in all operations
00920                                                 **/
00921 #define OCI_OPCODE_INSERT 0x2                 /*  INSERT */
00922 #define OCI_OPCODE_UPDATE 0x4                 /*  UPDATE */
00923 #define OCI_OPCODE_DELETE 0x8                 /* DELETE */
00924 #define OCI_OPCODE_ALTER 0x10                 /* ALTER */
00925 #define OCI_OPCODE_DROP 0x20                  /* DROP TABLE */
00926 #define OCI_OPCODE_UNKNOWN 0x40               /* GENERIC/ UNKNOWN*/
00927 
00928 /*------------------------- Supported Namespaces  ---------------------------*/
00929 #define OCI_SUBSCR_NAMESPACE_ANONYMOUS   0            /* Anonymous Namespace */
00930 #define OCI_SUBSCR_NAMESPACE_AQ          1                /* Advanced Queues */
00931 #define OCI_SUBSCR_NAMESPACE_DBCHANGE    2            /* change notification */
00932 #define OCI_SUBSCR_NAMESPACE_MAX         3          /* Max Name Space Number */
00933 
00934 
00935 
00936 /* -------------------- HA Event Handle Attributes values------------------- */
00937 #define OCI_EVENTTYPE_HA            0  /* valid value for OCI_ATTR_EVENTTYPE */
00938 
00939 /* valid values for OCI_ATTR_HA_SOURCE */
00940 #define OCI_HA_SOURCE_INSTANCE            0 
00941 #define OCI_HA_SOURCE_DATABASE            1
00942 #define OCI_HA_SOURCE_NODE                2
00943 #define OCI_HA_SOURCE_SERVICE             3
00944 #define OCI_HA_SOURCE_SERVICE_MEMBER      4
00945 #define OCI_HA_SOURCE_ASM_INSTANCE        5
00946 #define OCI_HA_SOURCE_SERVICE_PRECONNECT  6
00947 
00948 #define OCI_HA_STATUS_DOWN          0 /* valid values for OCI_ATTR_HA_STATUS */
00949 #define OCI_HA_STATUS_UP            1
00950 
00951 #endif /* OCILIB_OCI_DEFS_H_INCLUDED */
00952