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