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-2010 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.8.0 2010-10-24 21:53 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 /* Number of rows returned in current iter - for Bind handles */ 00221 00222 #define OCI_ATTR_LOBEMPTY 45 /* empty lob ? */ 00223 00224 #define OCI_ATTR_VISIBILITY 47 /* visibility */ 00225 #define OCI_ATTR_RELATIVE_MSGID 48 /* relative message id */ 00226 #define OCI_ATTR_SEQUENCE_DEVIATION 49 /* sequence deviation */ 00227 00228 #define OCI_ATTR_CONSUMER_NAME 50 /* consumer name */ 00229 #define OCI_ATTR_DEQ_MODE 51 /* dequeue mode */ 00230 #define OCI_ATTR_NAVIGATION 52 /* navigation */ 00231 #define OCI_ATTR_WAIT 53 /* wait */ 00232 #define OCI_ATTR_DEQ_MSGID 54 /* dequeue message id */ 00233 00234 #define OCI_ATTR_PRIORITY 55 /* priority */ 00235 #define OCI_ATTR_DELAY 56 /* delay */ 00236 #define OCI_ATTR_EXPIRATION 57 /* expiration */ 00237 #define OCI_ATTR_CORRELATION 58 /* correlation id */ 00238 #define OCI_ATTR_ATTEMPTS 59 /* # of attempts */ 00239 #define OCI_ATTR_RECIPIENT_LIST 60 /* recipient list */ 00240 #define OCI_ATTR_EXCEPTION_QUEUE 61 /* exception queue name */ 00241 #define OCI_ATTR_ENQ_TIME 62 /* enqueue time (only OCIAttrGet) */ 00242 #define OCI_ATTR_MSG_STATE 63 /* message state (only OCIAttrGet) */ 00243 /* NOTE: 64-66 used below */ 00244 #define OCI_ATTR_AGENT_NAME 64 /* agent name */ 00245 #define OCI_ATTR_AGENT_ADDRESS 65 /* agent address */ 00246 #define OCI_ATTR_AGENT_PROTOCOL 66 /* agent protocol */ 00247 #define OCI_ATTR_USER_PROPERTY 67 /* user property */ 00248 #define OCI_ATTR_SENDER_ID 68 /* sender id */ 00249 #define OCI_ATTR_ORIGINAL_MSGID 69 /* original message id */ 00250 00251 #define OCI_ATTR_NUM_DML_ERRORS 73 /* num of errs in array DML */ 00252 #define OCI_ATTR_DML_ROW_OFFSET 74 /* row offset in the array */ 00253 00254 #define OCI_ATTR_DATEFORMAT 75 /* default date format string */ 00255 #define OCI_ATTR_BUF_ADDR 76 /* buffer address */ 00256 #define OCI_ATTR_BUF_SIZE 77 /* buffer size */ 00257 #define OCI_ATTR_NUM_ROWS 81 /* number of rows in column array */ 00258 #define OCI_ATTR_COL_COUNT 82 /* columns of column array 00259 processed so far. */ 00260 00261 #define OCI_ATTR_SUBSCR_NAME 94 /* name of subscription */ 00262 #define OCI_ATTR_SUBSCR_CALLBACK 95 /* associated callback */ 00263 #define OCI_ATTR_SUBSCR_CTX 96 /* associated callback context */ 00264 #define OCI_ATTR_SUBSCR_PAYLOAD 97 /* associated payload */ 00265 #define OCI_ATTR_SUBSCR_NAMESPACE 98 /* associated namespace */ 00266 00267 #define OCI_ATTR_NUM_COLS 102 /* number of columns */ 00268 #define OCI_ATTR_LIST_COLUMNS 103 /* parameter of the column list */ 00269 00270 #define OCI_ATTR_PARAM 124 /* parameter descriptor */ 00271 #define OCI_ATTR_PARSE_ERROR_OFFSET 129 /* Parse Error offset */ 00272 00273 #define OCI_ATTR_SERVER_STATUS 143 /* state of the server hdl */ 00274 00275 #define OCI_ATTR_CURRENT_POSITION 164 /* for scrollable result sets*/ 00276 #define OCI_ATTR_STMTCACHESIZE 176 /* size of the stmt cache */ 00277 00278 #define OCI_ATTR_CONN_NOWAIT 178 00279 #define OCI_ATTR_CONN_BUSY_COUNT 179 00280 #define OCI_ATTR_CONN_OPEN_COUNT 180 00281 #define OCI_ATTR_CONN_TIMEOUT 181 00282 #define OCI_ATTR_STMT_STATE 182 00283 #define OCI_ATTR_CONN_MIN 183 00284 #define OCI_ATTR_CONN_MAX 184 00285 #define OCI_ATTR_CONN_INCR 185 00286 #define OCI_ATTR_ROWS_FETCHED 197 /* rows fetched in last call */ 00287 00288 #define OCI_ATTR_TYPECODE 216 /* object or collection */ 00289 #define OCI_ATTR_COLLECTION_TYPECODE 217 /* varray or nested table */ 00290 00291 #define OCI_ATTR_SUBSCR_TIMEOUT 227 /* Timeout */ 00292 00293 #define OCI_ATTR_COLLECTION_ELEMENT 227 /* has a collection attribute */ 00294 #define OCI_ATTR_NUM_TYPE_ATTRS 228 /* number of attribute types */ 00295 #define OCI_ATTR_LIST_TYPE_ATTRS 229 /* list of type attributes */ 00296 00297 #define OCI_ATTR_CLIENT_IDENTIFIER 278 /* value of client id to set*/ 00298 00299 #define OCI_ATTR_CHAR_USED 285 /* char length semantics */ 00300 #define OCI_ATTR_CHAR_SIZE 286 /* char length */ 00301 00302 #define OCI_ATTR_CQ_QUERYID 304 00303 00304 #define OCI_ATTR_SPOOL_TIMEOUT 308 /* session timeout */ 00305 #define OCI_ATTR_SPOOL_GETMODE 309 /* session get mode */ 00306 #define OCI_ATTR_SPOOL_BUSY_COUNT 310 /* busy session count */ 00307 #define OCI_ATTR_SPOOL_OPEN_COUNT 311 /* open session count */ 00308 #define OCI_ATTR_SPOOL_MIN 312 /* min session count */ 00309 #define OCI_ATTR_SPOOL_MAX 313 /* max session count */ 00310 #define OCI_ATTR_SPOOL_INCR 314 /* session increment count */ 00311 00312 #define OCI_ATTR_TRANSACTION_NO 365 /* AQ enq txn number */ 00313 00314 #define OCI_ATTR_ADMIN_PFILE 389 /* client-side param file */ 00315 00316 #define OCI_ATTR_MODULE 366 /* module for tracing */ 00317 #define OCI_ATTR_ACTION 367 /* action for tracing */ 00318 #define OCI_ATTR_CLIENT_INFO 368 /* client info */ 00319 00320 #define OCI_ATTR_SUBSCR_PORTNO 390 /* port no to listen */ 00321 00322 #define OCI_ATTR_DRIVER_NAME 424 /* Driver Name */ 00323 00324 /*------- Temporary attribute value for UCS2/UTF16 character set ID -------- */ 00325 00326 #define OCI_UCS2ID 1000 /* UCS2 charset ID */ 00327 #define OCI_UTF16ID 1000 /* UTF16 charset ID */ 00328 00329 /*-------------------------Credential Types----------------------------------*/ 00330 00331 #define OCI_CRED_RDBMS 1 /* database username/password */ 00332 #define OCI_CRED_EXT 2 /* externally provided credentials */ 00333 #define OCI_CRED_PROXY 3 /* proxy authentication */ 00334 00335 /*------------------------Error Return Values--------------------------------*/ 00336 00337 #define OCI_SUCCESS 0 /* maps to SQL_SUCCESS of SAG CLI */ 00338 #define OCI_SUCCESS_WITH_INFO 1 /* maps to SQL_SUCCESS_WITH_INFO */ 00339 #define OCI_NO_DATA 100 /* maps to SQL_NO_DATA */ 00340 #define OCI_ERROR -1 /* maps to SQL_ERROR */ 00341 #define OCI_INVALID_HANDLE -2 /* maps to SQL_INVALID_HANDLE */ 00342 #define OCI_NEED_DATA 99 /* maps to SQL_NEED_DATA */ 00343 #define OCI_STILL_EXECUTING -3123 /* OCI would block error */ 00344 00345 /*---------------- Server Handle Attribute Values ---------------------------*/ 00346 00347 #define OCI_SERVER_NOT_CONNECTED 0x0 00348 #define OCI_SERVER_NORMAL 0x1 00349 00350 /*--------------------- User Callback Return Values -------------------------*/ 00351 #define OCI_CONTINUE -24200 /* Continue with the body of the OCI function */ 00352 00353 /*------------------------Attach Modes---------------------------------------*/ 00354 00355 #define OCI_CPOOL 0x0200 /* Attach using server handle from pool */ 00356 00357 /*------------------DateTime and Interval check Error codes------------------*/ 00358 00359 #define OCI_DT_INVALID_DAY 0x1 /* Bad day */ 00360 #define OCI_DT_DAY_BELOW_VALID 0x2 /* Bad DAy Low/high bit (1=low)*/ 00361 #define OCI_DT_INVALID_MONTH 0x4 /* Bad MOnth */ 00362 #define OCI_DT_MONTH_BELOW_VALID 0x8 /* Bad MOnth Low/high bit (1=low) */ 00363 #define OCI_DT_INVALID_YEAR 0x10 /* Bad YeaR */ 00364 #define OCI_DT_YEAR_BELOW_VALID 0x20 /* Bad YeaR Low/high bit (1=low) */ 00365 #define OCI_DT_INVALID_HOUR 0x40 /* Bad HouR */ 00366 #define OCI_DT_HOUR_BELOW_VALID 0x80 /* Bad HouR Low/high bit (1=low) */ 00367 #define OCI_DT_INVALID_MINUTE 0x100 /* Bad MiNute */ 00368 #define OCI_DT_MINUTE_BELOW_VALID 0x200 /*Bad MiNute Low/high bit (1=low) */ 00369 #define OCI_DT_INVALID_SECOND 0x400 /* Bad SeCond */ 00370 #define OCI_DT_SECOND_BELOW_VALID 0x800 /*bad second Low/high bit (1=low)*/ 00371 #define OCI_DT_DAY_MISSING_FROM_1582 0x1000 00372 00373 /* Day is one of those "missing" from 1582 */ 00374 #define OCI_DT_YEAR_ZERO 0x2000 /* Year may not equal zero */ 00375 #define OCI_DT_INVALID_TIMEZONE 0x4000 /* Bad Timezone */ 00376 #define OCI_DT_INVALID_FORMAT 0x8000 /* Bad date format input */ 00377 00378 /*------------------------Scrollable Cursor Fetch Options------------------- 00379 * For non-scrollable cursor, the only valid (and default) orientation is 00380 * OCI_FETCH_NEXT 00381 */ 00382 #define OCI_FETCH_CURRENT 0x01 /* refetching current position */ 00383 #define OCI_FETCH_NEXT 0x02 /* next row */ 00384 #define OCI_FETCH_FIRST 0x04 /* first row of the result set */ 00385 #define OCI_FETCH_LAST 0x08 /* the last row of the result set */ 00386 #define OCI_FETCH_PRIOR 0x10 /* the previous row relative to current */ 00387 #define OCI_FETCH_ABSOLUTE 0x20 /* absolute offset from first */ 00388 #define OCI_FETCH_RELATIVE 0x40 /* offset relative to current */ 00389 #define OCI_FETCH_RESERVED_1 0x80 /* reserved */ 00390 00391 /*------------------------Parse mode ----------------------------------------*/ 00392 00393 #define OCI_NTV_SYNTAX 1 /* Use what so ever is the native lang of server */ 00394 00395 /*------------------------Bind and Define Options----------------------------*/ 00396 00397 #define OCI_DATA_AT_EXEC 0x00000002 /* data at execute time */ 00398 #define OCI_DYNAMIC_FETCH 0x00000002 /* fetch dynamically */ 00399 #define OCI_PIECEWISE 0x00000004 /* piecewise DMLs or fetch */ 00400 00401 /*----------------------- Execution Modes -----------------------------------*/ 00402 00403 #define OCI_BATCH_ERRORS 0x80 /* batch errors in array dmls */ 00404 #define OCI_STMT_SCROLLABLE_READONLY 0x08 /* if result set is scrollable */ 00405 #define OCI_PARSE_ONLY 0x0000010 /* only parse the statement */ 00406 00407 /*----------------------------- Various Modes ------------------------------*/ 00408 #define OCI_DEFAULT 0x00000000 00409 #define OCI_THREADED 0x00000001 /* appl. in threaded environment */ 00410 #define OCI_OBJECT 0x00000002 /* application in object environment */ 00411 #define OCI_EVENTS 0x00000004 /* application is enabled for events */ 00412 #define OCI_UTF16 0x00004000 /* mode for all UTF16 metadata */ 00413 00414 /*------------------------Authentication Modes-------------------------------*/ 00415 #define OCI_SYSDBA 0x00000002 /* for SYSDBA authorization */ 00416 #define OCI_SYSOPER 0x00000004 /* for SYSOPER authorization */ 00417 #define OCI_PRELIM_AUTH 0x00000008 /* for preliminary authorization */ 00418 00419 /*------------------------ Transaction Start Flags --------------------------*/ 00420 00421 #define OCI_TRANS_NEW 0x00000001 /* starts a new transaction branch */ 00422 #define OCI_TRANS_JOIN 0x00000002 /* join an existing transaction */ 00423 #define OCI_TRANS_RESUME 0x00000004 /* resume this transaction */ 00424 #define OCI_TRANS_STARTMASK 0x000000ff 00425 00426 #define OCI_TRANS_READONLY 0x00000100 /* starts a readonly transaction */ 00427 #define OCI_TRANS_READWRITE 0x00000200 /* starts a read-write transaction */ 00428 #define OCI_TRANS_SERIALIZABLE 0x00000400 00429 00430 /* starts a serializable transaction */ 00431 #define OCI_TRANS_ISOLMASK 0x0000ff00 00432 00433 #define OCI_TRANS_LOOSE 0x00010000 /* a loosely coupled branch */ 00434 #define OCI_TRANS_TIGHT 0x00020000 /* a tightly coupled branch */ 00435 #define OCI_TRANS_TYPEMASK 0x000f0000 00436 00437 #define OCI_TRANS_NOMIGRATE 0x00100000 /* non migratable transaction */ 00438 #define OCI_TRANS_SEPARABLE 0x00200000 /* separable transaction (8.1.6+) */ 00439 #define OCI_TRANS_OTSRESUME 0x00400000 /* OTS resuming a transaction */ 00440 00441 /*------------------------ Transaction End Flags ----------------------------*/ 00442 00443 #define OCI_TRANS_TWOPHASE 0x01000000 /* use two phase commit */ 00444 #define OCI_TRANS_WRITEBATCH 0x00000001 /* force cmt-redo for local txns */ 00445 #define OCI_TRANS_WRITEIMMED 0x00000002 /* no force cmt-redo */ 00446 #define OCI_TRANS_WRITEWAIT 0x00000004 /* no sync cmt-redo */ 00447 #define OCI_TRANS_WRITENOWAIT 0x00000008 /* sync cmt-redo for local txns */ 00448 00449 /*------------------------Describe Handle Parameter Attributes --------------*/ 00450 00451 #define OCI_ATTR_DATA_SIZE 1 /* maximum size of the data */ 00452 #define OCI_ATTR_DATA_TYPE 2 /* the SQL type of the column/argument */ 00453 #define OCI_ATTR_DISP_SIZE 3 /* the display size */ 00454 #define OCI_ATTR_NAME 4 /* the name of the column/argument */ 00455 #define OCI_ATTR_PRECISION 5 /* precision if number type */ 00456 #define OCI_ATTR_SCALE 6 /* scale if number type */ 00457 #define OCI_ATTR_IS_NULL 7 /* is it null ? */ 00458 #define OCI_ATTR_TYPE_NAME 8 /* name of the named data type */ 00459 #define OCI_ATTR_SCHEMA_NAME 9 /* the schema name */ 00460 #define OCI_ATTR_SUB_NAME 10 /* type name if package private type */ 00461 00462 /*------------------------Other Constants------------------------------------*/ 00463 00464 #define OCI_ERROR_MAXMSG_SIZE 1024 /* max size of an error message */ 00465 #define OCI_LOBMAXSIZE MINUB4MAXVAL /* maximum lob data size */ 00466 #define OCI_ROWID_LEN 23 00467 00468 /*-----------------------Handle Definitions----------------------------------*/ 00469 typedef struct OCIEnv OCIEnv; /* OCI environment handle */ 00470 typedef struct OCIError OCIError; /* OCI error handle */ 00471 typedef struct OCISvcCtx OCISvcCtx; /* OCI service handle */ 00472 typedef struct OCIStmt OCIStmt; /* OCI statement handle */ 00473 typedef struct OCIBind OCIBind; /* OCI bind handle */ 00474 typedef struct OCIDefine OCIDefine; /* OCI Define handle */ 00475 typedef struct OCIDescribe OCIDescribe; /* OCI Describe handle */ 00476 typedef struct OCIServer OCIServer; /* OCI Server handle */ 00477 typedef struct OCISession OCISession; /* OCI Authentication handle */ 00478 typedef struct OCIComplexObject OCIComplexObject; /* OCI COR handle */ 00479 typedef struct OCITrans OCITrans; /* OCI Transaction handle */ 00480 typedef struct OCISecurity OCISecurity; /* OCI Security handle */ 00481 typedef struct OCISubscription OCISubscription; /* subscription handle */ 00482 00483 typedef struct OCICPool OCICPool; /* connection pool handle */ 00484 typedef struct OCISPool OCISPool; /* session pool handle */ 00485 typedef struct OCIAuthInfo OCIAuthInfo; /* auth handle */ 00486 typedef struct OCIAdmin OCIAdmin; /* admin handle */ 00487 typedef struct OCIEvent OCIEvent; /* HA event handle */ 00488 00489 typedef struct OCIDirPathCtx OCIDirPathCtx; /* DP context */ 00490 typedef struct OCIDirPathColArray OCIDirPathColArray; /* DP column array */ 00491 typedef struct OCIDirPathStream OCIDirPathStream; /* DP stream */ 00492 00493 typedef struct OCIAQEnqOptions OCIAQEnqOptions; /* AQ Enqueue Options hdl */ 00494 typedef struct OCIAQDeqOptions OCIAQDeqOptions; /* AQ Dequeue Options hdl */ 00495 typedef struct OCIAQMsgProperties OCIAQMsgProperties; /* AQ Mesg Properties */ 00496 typedef struct OCIAQAgent OCIAQAgent; /* AQ Agent descriptor */ 00497 typedef struct OCIAQNfyDescriptor OCIAQNfyDescriptor; /* AQ Nfy descriptor */ 00498 typedef struct OCIAQSignature OCIAQSignature; /* AQ Siganture */ 00499 typedef struct OCIAQListenOpts OCIAQListenOpts; /* AQ listen options */ 00500 typedef struct OCIAQLisMsgProps OCIAQLisMsgProps; /* AQ listen msg props */ 00501 00502 /*---------------------------------------------------------------------------*/ 00503 /*------------------------- OCISessionPoolCreate Modes ----------------------*/ 00504 00505 #define OCI_SPC_REINITIALIZE 0x0001 /* Reinitialize the session pool */ 00506 #define OCI_SPC_HOMOGENEOUS 0x0002 /* Session pool is homogeneneous */ 00507 #define OCI_SPC_STMTCACHE 0x0004 /* Session pool has stmt cache */ 00508 00509 /*---------------------------------------------------------------------------*/ 00510 /*--------------------------- OCISessionGet Modes ---------------------------*/ 00511 00512 #define OCI_SESSGET_SPOOL 0x0001 /* SessionGet called in SPOOL mode */ 00513 #define OCI_SESSGET_CPOOL OCI_CPOOL /* SessionGet called in CPOOL mode */ 00514 #define OCI_SESSGET_STMTCACHE 0x0004 /* Use statement cache */ 00515 #define OCI_SESSGET_CREDPROXY 0x0008 /* SessionGet called in proxy mode */ 00516 #define OCI_SESSGET_CREDEXT 0x0010 00517 #define OCI_SESSGET_SPOOL_MATCHANY 0x0020 00518 00519 /*---------------------------------------------------------------------------*/ 00520 /*------------------------ATTR Values for Session Pool-----------------------*/ 00521 /* Attribute values for OCI_ATTR_SPOOL_GETMODE */ 00522 #define OCI_SPOOL_ATTRVAL_WAIT 0 /* block till you get a session */ 00523 #define OCI_SPOOL_ATTRVAL_NOWAIT 1 /* error out if no session avaliable */ 00524 #define OCI_SPOOL_ATTRVAL_FORCEGET 2 /* get session even if max is exceeded */ 00525 00526 /*---------------------------------------------------------------------------*/ 00527 /*--------------------------- OCISessionRelease Modes -----------------------*/ 00528 00529 #define OCI_SESSRLS_DROPSESS 0x0001 /* Drop the Session */ 00530 #define OCI_SESSRLS_RETAG 0x0002 /* Retag the session */ 00531 00532 /*---------------------------------------------------------------------------*/ 00533 /*----------------------- OCISessionPoolDestroy Modes -----------------------*/ 00534 00535 #define OCI_SPD_FORCE 0x0001 /* Force the sessions to terminate. 00536 Even if there are some busy 00537 sessions close them */ 00538 00539 /*--------------------- OCI Thread Object Definitions------------------------*/ 00540 00541 /* OCIThread Context */ 00542 typedef struct OCIThreadContext OCIThreadContext; 00543 00544 /* OCIThread Mutual Exclusion Lock */ 00545 typedef struct OCIThreadMutex OCIThreadMutex; 00546 00547 /* OCIThread Key for Thread-Specific Data */ 00548 typedef struct OCIThreadKey OCIThreadKey; 00549 00550 /* OCIThread Thread ID */ 00551 typedef struct OCIThreadId OCIThreadId; 00552 00553 /* OCIThread Thread Handle */ 00554 typedef struct OCIThreadHandle OCIThreadHandle; 00555 00556 /*--------------------- OCI Collection Object Definitions--------------------*/ 00557 00558 /* OCIColl - generic collection type */ 00559 typedef struct OCIColl OCIColl; 00560 00561 /* OCIArray - varray collection type */ 00562 typedef OCIColl OCIArray; 00563 00564 /* OCITable - nested table collection type */ 00565 typedef OCIColl OCITable; 00566 00567 /* OCIIter - collection iterator */ 00568 typedef struct OCIIter OCIIter; 00569 00570 /*-----------------------Descriptor Definitions------------------------------*/ 00571 00572 typedef struct OCISnapshot OCISnapshot; /* OCI snapshot descriptor */ 00573 typedef struct OCIResult OCIResult; /* OCI Result Set Descriptor */ 00574 typedef struct OCILobLocator OCILobLocator; /* OCI Lob Locator descriptor */ 00575 typedef struct OCIParam OCIParam; /* OCI PARameter descriptor */ 00576 typedef struct OCIDateTime OCIDateTime; /* OCI DateTime descriptor */ 00577 typedef struct OCIInterval OCIInterval; /* OCI Interval descriptor */ 00578 typedef struct OCIRowid OCIRowid; /* OCI ROWID descriptor */ 00579 00580 /*----------------------------- OBJECT FREE OPTION --------------------------*/ 00581 00582 #define OCI_OBJECTFREE_FORCE (ub2)0x0001 00583 #define OCI_OBJECTFREE_NONULL (ub2)0x0002 00584 00585 /*-------------------------- OCINumber --------------------------------------*/ 00586 00587 #define OCI_NUMBER_UNSIGNED 0 /* Unsigned type -- ubX */ 00588 #define OCI_NUMBER_SIGNED 2 /* Signed type -- sbX */ 00589 #define OCI_NUMBER_SIZE 22 00590 00591 struct OCINumber 00592 { 00593 ub1 OCINumberPart[OCI_NUMBER_SIZE]; 00594 }; 00595 00596 /*-----------------------Objects Definitions---------------------------------*/ 00597 00598 typedef struct OCIString OCIString; 00599 typedef struct OCIRaw OCIRaw; 00600 typedef struct OCIType OCIType; 00601 typedef struct OCINumber OCINumber; 00602 typedef struct OCIRef OCIRef; 00603 00604 /*--------------------------- OBJECT INDICATOR ------------------------------*/ 00605 00606 typedef sb2 OCIInd; 00607 00608 /* 00609 * OCIInd -- a variable of this type contains (null) indicator information 00610 */ 00611 00612 #define OCI_IND_NOTNULL (OCIInd)0 /* not NULL */ 00613 #define OCI_IND_NULL (OCIInd)(-1) /* NULL */ 00614 #define OCI_IND_BADNULL (OCIInd)(-2) /* BAD NULL */ 00615 #define OCI_IND_NOTNULLABLE (OCIInd)(-3) /* not NULLable */ 00616 00617 /*-------------------------Object Ptr Types----------------------------------*/ 00618 #define OCI_OTYPE_NAME 1 /* object name */ 00619 #define OCI_OTYPE_REF 2 /* REF to TDO */ 00620 #define OCI_OTYPE_PTR 3 /* PTR to TDO */ 00621 00622 /*------------------------ Lob-specific Definitions -------------------------*/ 00623 00624 typedef ub4 OCILobOffset; 00625 typedef ub4 OCILobLength; 00626 00627 /*----------------------------Piece Definitions------------------------------*/ 00628 00629 #define OCI_ONE_PIECE 0 /* one piece */ 00630 #define OCI_FIRST_PIECE 1 /* the first piece */ 00631 #define OCI_NEXT_PIECE 2 /* the next of many pieces */ 00632 #define OCI_LAST_PIECE 3 /* the last piece */ 00633 00634 /*----------------------- GET OPTIONS FOR TDO ------------------------------*/ 00635 00636 enum OCITypeGetOpt 00637 { 00638 OCI_TYPEGET_HEADER, /* load only the header portion of the TDO */ 00639 OCI_TYPEGET_ALL /* load all attribute and method descriptors as well */ 00640 }; 00641 typedef enum OCITypeGetOpt OCITypeGetOpt; 00642 00643 /*--------------------------- OBJECT PIN OPTION -----------------------------*/ 00644 00645 enum OCIPinOpt 00646 { 00647 /* 0 = uninitialized */ 00648 OCI_PIN_DEFAULT = 1, /* default pin option */ 00649 OCI_PIN_ANY = 3, /* pin any copy of the object */ 00650 OCI_PIN_RECENT = 4, /* pin recent copy of the object */ 00651 OCI_PIN_LATEST = 5 /* pin latest copy of the object */ 00652 }; 00653 typedef enum OCIPinOpt OCIPinOpt; 00654 00655 /*--------------------------- OBJECT LOCK OPTION ----------------------------*/ 00656 00657 enum OCILockOpt 00658 { 00659 /* 0 = uninitialized */ 00660 OCI_LOCK_NONE = 1, /* null (same as no lock) */ 00661 OCI_LOCK_X = 2, /* exclusive lock */ 00662 OCI_LOCK_X_NOWAIT = 3 /* exclusive lock, do not wait */ 00663 }; 00664 typedef enum OCILockOpt OCILockOpt; 00665 00666 /*------------------------- OBJECT MODIFYING OPTION -------------------------*/ 00667 00668 enum OCIMarkOpt 00669 { 00670 /* 0 = uninitialized */ 00671 OCI_MARK_DEFAULT = 1, /* default (the same as OCI_MARK_NONE) */ 00672 OCI_MARK_NONE = OCI_MARK_DEFAULT, /* object has not been modified */ 00673 OCI_MARK_UPDATE /* object is to be updated */ 00674 }; 00675 typedef enum OCIMarkOpt OCIMarkOpt; 00676 00677 /*------------------------------ TYPE CODE ----------------------------------*/ 00678 00679 /* The OCITypeCode type is interchangeable with the existing SQLT type 00680 which is a ub2 */ 00681 typedef ub2 OCITypeCode; 00682 00683 /*--------------------------- ORACLE DATE TYPE ----------------------------*/ 00684 00685 struct OCITime 00686 { 00687 ub1 OCITimeHH; /* hours; range is 0 <= hours <=23 */ 00688 ub1 OCITimeMI; /* minutes; range is 0 <= minutes <= 59 */ 00689 ub1 OCITimeSS; /* seconds; range is 0 <= seconds <= 59 */ 00690 }; 00691 typedef struct OCITime OCITime; 00692 00693 struct OCIDate 00694 { 00695 sb2 OCIDateYYYY; /* gregorian year; range is -4712 <= year <= 9999 */ 00696 ub1 OCIDateMM; /* month; range is 1 <= month < 12 */ 00697 ub1 OCIDateDD; /* day; range is 1 <= day <= 31 */ 00698 OCITime OCIDateTime; /* time */ 00699 }; 00700 typedef struct OCIDate OCIDate; 00701 00702 /*-------------------------- OBJECT Duration --------------------------------*/ 00703 00704 typedef ub2 OCIDuration; 00705 00706 #define OCI_DURATION_BEGIN (OCIDuration)10 00707 00708 /* beginning sequence of duration */ 00709 #define OCI_DURATION_NULL (OCIDuration)(OCI_DURATION_BEGIN-1) 00710 00711 /* null duration */ 00712 #define OCI_DURATION_DEFAULT (OCIDuration)(OCI_DURATION_BEGIN-2) /* default */ 00713 #define OCI_DURATION_NEXT (OCIDuration)(OCI_DURATION_BEGIN-3) 00714 00715 /* next special duration */ 00716 #define OCI_DURATION_SESSION (OCIDuration)(OCI_DURATION_BEGIN) 00717 00718 /* the end of user session */ 00719 #define OCI_DURATION_TRANS (OCIDuration)(OCI_DURATION_BEGIN+1) 00720 00721 /* the end of user transaction */ 00722 00723 /*-------------------------Object Ptr Types----------------------------------*/ 00724 #define OCI_OTYPE_NAME 1 /* object name */ 00725 00726 /*--------------------------- OCI Parameter Types ---------------------------*/ 00727 #define OCI_PTYPE_UNK 0 /* unknown */ 00728 #define OCI_PTYPE_TABLE 1 /* table */ 00729 #define OCI_PTYPE_VIEW 2 /* view */ 00730 #define OCI_PTYPE_PROC 3 /* procedure */ 00731 #define OCI_PTYPE_FUNC 4 /* function */ 00732 #define OCI_PTYPE_PKG 5 /* package */ 00733 #define OCI_PTYPE_TYPE 6 /* user-defined type */ 00734 #define OCI_PTYPE_SYN 7 /* synonym */ 00735 #define OCI_PTYPE_SEQ 8 /* sequence */ 00736 #define OCI_PTYPE_COL 9 /* column */ 00737 #define OCI_PTYPE_ARG 10 /* argument */ 00738 #define OCI_PTYPE_LIST 11 /* list */ 00739 #define OCI_PTYPE_TYPE_ATTR 12 /* user-defined type's attribute */ 00740 #define OCI_PTYPE_TYPE_COLL 13 /* collection type's element */ 00741 #define OCI_PTYPE_TYPE_METHOD 14 /* user-defined type's method */ 00742 #define OCI_PTYPE_TYPE_ARG 15 /* user-defined type method's arg */ 00743 #define OCI_PTYPE_TYPE_RESULT 16 /* user-defined type method's result */ 00744 #define OCI_PTYPE_SCHEMA 17 /* schema */ 00745 #define OCI_PTYPE_DATABASE 18 /* database */ 00746 #define OCI_PTYPE_RULE 19 /* rule */ 00747 #define OCI_PTYPE_RULE_SET 20 /* rule set */ 00748 #define OCI_PTYPE_EVALUATION_CONTEXT 21 /* evaluation context */ 00749 #define OCI_PTYPE_TABLE_ALIAS 22 /* table alias */ 00750 #define OCI_PTYPE_VARIABLE_TYPE 23 /* variable type */ 00751 #define OCI_PTYPE_NAME_VALUE 24 /* name value pair */ 00752 00753 /*------------------------------ TYPE CODE ----------------------------------*/ 00754 00755 #define OCI_TYPECODE_VARRAY 247 /* SQL VARRAY OTS PAGED VARRAY */ 00756 #define OCI_TYPECODE_TABLE 248 /* SQL TABLE OTS MULTISET */ 00757 00758 /*------------------------Piece Information----------------------------------*/ 00759 #define OCI_PARAM_IN 0x01 /* in parameter */ 00760 #define OCI_PARAM_OUT 0x02 /* out parameter */ 00761 00762 /*----------------------- OBJECT PROPERTY ID -------------------------------*/ 00763 00764 typedef ub1 OCIObjectPropId; 00765 #define OCI_OBJECTPROP_LIFETIME 1 /* persistent or transient or value */ 00766 #define OCI_OBJECTPROP_SCHEMA 2 /* schema name of table containing object */ 00767 #define OCI_OBJECTPROP_TABLE 3 /* table name of table containing object */ 00768 #define OCI_OBJECTPROP_PIN_DURATION 4 /* pin duartion of object */ 00769 #define OCI_OBJECTPROP_ALLOC_DURATION 5 /* alloc duartion of object */ 00770 #define OCI_OBJECTPROP_LOCK 6 /* lock status of object */ 00771 #define OCI_OBJECTPROP_MARKSTATUS 7 /* mark status of object */ 00772 #define OCI_OBJECTPROP_VIEW 8 /* is object a view object or not? */ 00773 00774 /*----------------------- OBJECT LIFETIME ----------------------------------*/ 00775 00776 enum OCIObjectLifetime 00777 { 00778 /* 0 = uninitialized */ 00779 OCI_OBJECT_PERSISTENT = 1, /* persistent object */ 00780 OCI_OBJECT_TRANSIENT, /* transient object */ 00781 OCI_OBJECT_VALUE /* value object */ 00782 }; 00783 typedef enum OCIObjectLifetime OCIObjectLifetime; 00784 00785 /*----------------------- OBJECT MARK STATUS -------------------------------*/ 00786 00787 typedef uword OCIObjectMarkStatus; 00788 #define OCI_OBJECT_NEW 0x0001 /* new object */ 00789 #define OCI_OBJECT_DELETED 0x0002 /* object marked deleted */ 00790 #define OCI_OBJECT_UPDATED 0x0004 /* object marked updated */ 00791 00792 /*----- values for cflg argument to OCIDirpathColArrayEntrySet --------------*/ 00793 00794 #define OCI_DIRPATH_COL_COMPLETE 0 /* column data is complete */ 00795 #define OCI_DIRPATH_COL_NULL 1 /* column is null */ 00796 #define OCI_DIRPATH_COL_PARTIAL 2 /* column data is partial */ 00797 #define OCI_DIRPATH_COL_ERROR 3 /* column error, ignore row */ 00798 00799 /*----- values for action parameter to OCIDirPathDataSave -------------------*/ 00800 #define OCI_DIRPATH_DATASAVE_SAVEONLY 0 /* data save point only */ 00801 00802 /*------------- Supported Values for Direct Path Date cache -----------------*/ 00803 #define OCI_ATTR_DIRPATH_DCACHE_NUM 303 /* date cache entries */ 00804 #define OCI_ATTR_DIRPATH_DCACHE_SIZE 304 /* date cache limit */ 00805 #define OCI_ATTR_DIRPATH_DCACHE_MISSES 305 /* date cache misses */ 00806 #define OCI_ATTR_DIRPATH_DCACHE_HITS 306 /* date cache hits */ 00807 #define OCI_ATTR_DIRPATH_DCACHE_DISABLE 307 /* on set: disable datecache */ 00808 00809 /*------------- Supported Values for Direct Path Stream Version -------------*/ 00810 00811 #define OCI_ATTR_DIRPATH_NOLOG 79 /* nologging option */ 00812 #define OCI_ATTR_DIRPATH_PARALLEL 80 /* parallel (temp seg) option */ 00813 00814 /*------------------------- Database Startup Flags --------------------------*/ 00815 #define OCI_DBSTARTUPFLAG_FORCE 0x00000001 /* Abort running instance, start */ 00816 #define OCI_DBSTARTUPFLAG_RESTRICT 0x00000002 /* Restrict access to DBA */ 00817 00818 /*------------------------- Database Shutdown Modes -------------------------*/ 00819 #define OCI_DBSHUTDOWN_TRANSACTIONAL 1 /* Wait for all the transactions */ 00820 #define OCI_DBSHUTDOWN_TRANSACTIONAL_LOCAL 2 /* Wait for local transactions */ 00821 #define OCI_DBSHUTDOWN_IMMEDIATE 3 /* Terminate and roll back */ 00822 #define OCI_DBSHUTDOWN_ABORT 4 /* Terminate and don't roll back */ 00823 #define OCI_DBSHUTDOWN_FINAL 5 /* Orderly shutdown */ 00824 00825 /*---------------------------OCIPasswordChange-------------------------------*/ 00826 #define OCI_AUTH 0x08 /* Change the password but do not login */ 00827 00828 /* ------------- DB Change Notification reg handle attributes ---------------*/ 00829 #define OCI_ATTR_CHNF_TABLENAMES 401 /* out: array of table names 00830 * */ 00831 #define OCI_ATTR_CHNF_ROWIDS 402 /* in: rowids needed */ 00832 #define OCI_ATTR_CHNF_OPERATIONS 403 /* in: notification operation 00833 *filter*/ 00834 #define OCI_ATTR_CHNF_CHANGELAG 404 /* txn lag between notifications 00835 * */ 00836 00837 /* DB Change: Notification Descriptor attributes -----------------------*/ 00838 #define OCI_ATTR_CHDES_DBNAME 405 /* source database */ 00839 #define OCI_ATTR_CHDES_NFYTYPE 406 /* notification type flags */ 00840 #define OCI_ATTR_CHDES_XID 407 /* XID of the transaction */ 00841 #define OCI_ATTR_CHDES_TABLE_CHANGES 408 /* array of table chg 00842 *descriptors */ 00843 00844 #define OCI_ATTR_CHDES_TABLE_NAME 409 /* table name */ 00845 #define OCI_ATTR_CHDES_TABLE_OPFLAGS 410 /* table operation flags */ 00846 #define OCI_ATTR_CHDES_TABLE_ROW_CHANGES 411 /* array of changed rows */ 00847 #define OCI_ATTR_CHDES_ROW_ROWID 412 /* rowid of changed row */ 00848 #define OCI_ATTR_CHDES_ROW_OPFLAGS 413 /* row operation flags */ 00849 00850 /* Statement handle attribute for db change notification */ 00851 #define OCI_ATTR_CHNF_REGHANDLE 414 /* IN: subscription handle */ 00852 00853 /* DB Change: Event types ---------------*/ 00854 #define OCI_EVENT_NONE 0x0 /* None */ 00855 #define OCI_EVENT_STARTUP 0x1 /* Startup database */ 00856 #define OCI_EVENT_SHUTDOWN 0x2 /* Shutdown database */ 00857 #define OCI_EVENT_SHUTDOWN_ANY 0x3 /* Startup instance */ 00858 #define OCI_EVENT_DROP_DB 0x4 /* Drop database */ 00859 #define OCI_EVENT_DEREG 0x5 /* Subscription deregistered */ 00860 #define OCI_EVENT_OBJCHANGE 0x6 /* Object change notification */ 00861 00862 /* DB Change: Operation types -----------*/ 00863 #define OCI_OPCODE_ALLROWS 0x1 /* all rows invalidated */ 00864 #define OCI_OPCODE_ALLOPS 0x0 /* interested in all operations 00865 **/ 00866 #define OCI_OPCODE_INSERT 0x2 /* INSERT */ 00867 #define OCI_OPCODE_UPDATE 0x4 /* UPDATE */ 00868 #define OCI_OPCODE_DELETE 0x8 /* DELETE */ 00869 #define OCI_OPCODE_ALTER 0x10 /* ALTER */ 00870 #define OCI_OPCODE_DROP 0x20 /* DROP TABLE */ 00871 #define OCI_OPCODE_UNKNOWN 0x40 /* GENERIC/ UNKNOWN*/ 00872 00873 /*------------------------- Supported Namespaces ---------------------------*/ 00874 #define OCI_SUBSCR_NAMESPACE_ANONYMOUS 0 /* Anonymous Namespace */ 00875 #define OCI_SUBSCR_NAMESPACE_AQ 1 /* Advanced Queues */ 00876 #define OCI_SUBSCR_NAMESPACE_DBCHANGE 2 /* change notification */ 00877 #define OCI_SUBSCR_NAMESPACE_MAX 3 /* Max Name Space Number */ 00878 00879 #endif /* OCILIB_OCI_DEFS_H_INCLUDED */ 00880