blob: e825a5cc2d31695b714241c02021dbd0e3aaa62b [file] [log] [blame]
Tang Cheng03c0b0a2015-01-12 11:19:45 +08001/* Copyright (c) 1994, 2003, Oracle Corporation. All rights reserved. */
2
3/*
4 NAME
5 OCI - Oracle Object Interface for External/Internal/Kernel Clients
6
7 DESCRIPTION
8 This header file contains Oracle object interface definitions which
9 can be included by external user applications, tools, as well as
10 the kernel. It defines types and constants that are common to all
11 object interface which is being defined in several other header files
12 (e.g., ori.h, ort.h, and orl.h).
13
14 RELATED DOCUMENTS
15 TBD
16
17 INSPECTION STATUS [[ deletable if no inspection ]]
18 Inspection date: [[ date of the last logging meeting ]]
19 Inspection status: [[ exited, not exited, or N/A if exit is not a goal ]]
20 Estimated increasing cost defects per page:
21 Rule sets: [[ rule sets inspected against or planned to be
22 inspected against ]]
23
24 ACCEPTANCE REVIEW STATUS [[ deletable if no approval review ]]
25 Review date: [[ date of the meeting where issues were logged and the
26 approval status was decided ]]
27 Review status: [[ current status: accepted, conditionally accepted,
28 major revision required, rejected ]]
29 Reviewers: [[ names of the members on the review team ]]
30
31 PUBLIC FUNCTIONS
32
33 EXAMPLES
34 Examples are given in the description of each function or macro where
35 relevant.
36
37 MODIFIED
38 mnanal 06/09/03 - backout of fix 2836388
39 mnanal 05/14/03 - bug-2836388
40 srseshad 11/27/02 - Change OCI_TYPECODE_BFLOAT/BDOUBLE codes
41 rxgovind 10/09/02 - add OCI_TYPECODE_UROWID
42 mxyang 09/17/02 - grabtrans 'mmorsi_obj_float'
43 srseshad 09/11/02 -
44 srseshad 09/01/02 -
45 aahluwal 06/03/02 - bug 2360115
46 celsbern 10/19/01 - merge LOG to MAIN
47 rxgovind 10/16/01 - update typecodes
48 rxgovind 09/19/01 - add typecodes
49 rkasamse 08/15/01 - add OCI_DURATION_USER_CALLBACK
50 jchai 09/24/01 - add type code for PLS_INTEGER
51 porangas 08/22/01 - Fix bug#1776434
52 schatter 04/09/01 - merge 1456235: define OCI_DURATION_INVALID
53 rdani 10/12/00 - 1449943 NOCOPY and PIPELINE
54 ciyer 05/26/00 - short names for abstract, overriding
55 rkasamse 05/25/00 - OCCI enhancements
56 smuralid 05/11/00 - OCITypeMethodFlags - add NOT INSTANTIABLE, OVERRIDING
57 rxgovind 05/09/00 - add OCI_TYPECODE_NONE
58 tnbui 07/28/99 - Remove OCI_TYPECODE_TIMESTAMP_ITZ
59 tnbui 07/21/99 - TS LOCAL TZ
60 thoang 06/21/99 - Add OCI_TYPECODE_TIMESTAMP_ITZ
61 thoang 03/04/99 - Add datetime datatypes
62 rkasamse 10/20/98 - add OCI_ATTR_CACHE_ARRAYFLUSH
63 rkasamse 10/29/98 - add OCI_DURATION_CALLOUT
64 rkasamse 04/28/98 - OCI_OBJECT_DETECTCHANGE -> OCI_ATTR_OBJECT_DETECTCHAN
65 rkasamse 04/28/98 - OCI_OBJECT_NEWNOTNULL -> OCI_ATTR_OBJECT_NEWNOTNULL
66 rkasamse 04/23/98 - add OCI_OBJECT_DETECTCHANGE
67 rkasamse 04/03/98 - add OCI_OBJECT_NEWNOTNULL
68 pmitra 04/01/98 - OCI_LOCK_X_NOWAIT added
69 rxgovind 02/18/98 - add OCI_TYPECODE_OPAQUE
70 rkasamse 02/13/98 - Add OCI_DURATION_PROCESS
71 cxcheng 07/28/97 - fix compile with SLSHORTNAME
72 skrishna 07/14/97 - add OCIObjectGetProperty
73 cxcheng 04/30/97 - make OCITypeParamMode values consistent with PL/SQL
74 skrishna 04/28/97 - undocument OCIObjectProperty & OCIObjectEvent
75 cxcheng 03/29/97 - remove all remaining short names
76 sthakur 03/20/97 - add casts to constants
77 cxcheng 02/21/97 - temporarily put SLSHORTNAME for PL/SQL
78 cxcheng 02/06/97 - take out short name support except with SLSHORTNAME
79 lchidamb 01/20/97 - update OCIRef comments
80 sgollapu 11/19/96 - Add OCI type codes for BOOL,REC,and TAB
81 cxcheng 11/19/96 - more typecode changes
82 cxcheng 11/13/96 - add #include for ocidfn.h
83 cxcheng 11/13/96 - add OCI_TYPECODE_ADT for compatibility
84 cxcheng 11/12/96 - add SQLT_NCO for named collection
85 cxcheng 11/11/96 - more changes to typecodes
86 cxcheng 11/07/96 - #define OCI_TYPECODE_MLSLABEL to SQLT_LAB
87 cxcheng 11/06/96 - fix #define omission for OROTCNAT
88 cxcheng 10/30/96 - move OCI_TYPECODE_* to ocidfn.h as SQLT_*
89 cxcheng 10/28/96 - more beautification changes
90 jboonleu 10/29/96 - add flags for freeing object
91 dchatter 10/26/96 - delete redef of OCISvcCtx, OCIError, OCIEnv
92 cxcheng 10/15/96 - more changes
93 cxcheng 10/14/96 - more final fixes to constants
94 mluong 10/11/96 -
95 mluong 10/11/96 - KOCON and KONSP are in lowercase
96 mluong 10/11/96 - add some define per Calvin
97 cxcheng 10/09/96 - add #define for OROOCOSFN to OCI_COPY_NOREF
98 jboonleu 10/08/96 - change OROOCOSFN to OCICopyFlag
99 jboonleu 10/07/96 - use new OCI names for cache options
100 cxcheng 10/07/96 - add OROTCS02 for KOTTCBRI and OROTCS03 as spare
101 cxcheng 10/07/96 - more lint fixes
102 cxcheng 10/02/96 - move oronsp to ko.h as konsp
103 cxcheng 10/01/96 - add long names for readability
104 cxcheng 10/01/96 - remove orotty and orotal
105 rjenkins 09/28/96 - 2k char 4k varchar2
106 jboonleu 09/27/96 - add macro used only in beta2
107 cxcheng 09/27/96 - move oroenv to oroenv.h
108 cxcheng 09/24/96 - remove unnecessary orotyp
109 cxcheng 09/25/96 - add typecode OROTCS01 as placeholder for lob pointer
110 cxcheng 09/20/96 - add TDO load option orotgo
111 jboonleu 09/18/96 - add OROOPOREC
112 jboonleu 09/10/96 - add OROOPODFL
113 jweisz 08/27/96 - add SQL internal typecode OROTCS00
114 cxcheng 08/02/96 - add PLSQL internal typecodes OROTCP..
115 cxcheng 08/01/96 - add OROTCFAR to fill up space left by OROTCCAR
116 jboonleu 07/16/96 - new pin option
117 cxcheng 06/18/96 - add casts to OROTNOPRE and OROTNOSCL
118 cxcheng 05/29/96 - change OROTCNPT back to OROTCDOM
119 vkrishna 05/27/96 - add OROTCCAR
120 cxcheng 05/17/96 - replace OROTCFAR with OROTCCAR
121 cxcheng 05/08/96 - change orotmf from ub1 to ub2
122 cxcheng 05/07/96 - fix public defines for method types
123 cxcheng 04/30/96 - change OROTCDOM to OROTCNPT
124 cxcheng 04/15/96 - remove obsolete OROTTYICT
125 jboonleu 04/12/96 - add new pin option
126 sthakur 04/12/96 - add indicator type and indicator status
127 cxcheng 04/10/96 - add function parameter codes for ORT/KOT
128 cxcheng 04/03/96 - replace OROTCFAR as OROTCCAR
129 jwijaya 03/29/96 - add OROTTCCAR
130 jwijaya 03/27/96 - better comments for orotc
131 cxcheng 02/23/96 - add typecodes for SMALLINT and VARCHAR2
132 skrishna 02/22/96 - add oroind - null indicator type
133 cxcheng 02/21/96 - change lob character codes to OROTCCLB, OROTCBLB...
134 jboonleu 02/06/96 - new value for predefined duration
135 cxcheng 01/12/96 - add OROTCCLO, OROTCBLO, OROTCFIL to orotc
136 cxcheng 12/05/95 - add OROTCDOM and OROTCAAT to orotc
137 skotsovo 10/30/95 - reserve space for internal 'oid' type
138 jwijaya 10/20/95 - support variable-length ref
139 cxcheng 10/03/95 - add OROTMFOR for ordering function to orotmf
140 cxcheng 10/03/95 - Adding the ordering function type to orotmf
141 jboonleu 09/28/95 - set OROODTPRE
142 jboonleu 09/25/95 - add oroodt
143 skotsovo 03/10/95 - update to only include release 1
144 jboonleu 02/15/95 - add OROOPOREC, remove orocro, oroolo
145 skotsovo 01/30/95 - add default max lengths for varrays and vstrings
146 skotsovo 01/24/95 - categorize sint32, double, and real as number types
147 (with precision and scale) instead of scalar types.
148 skotsovo 12/20/94 - add release 1 types
149 skotsovo 12/12/94 - update according to new ots doc
150 skotsovo 12/01/94 - add default precision and scale
151 jwijaya 11/15/94 - rename ORONSPTAB to ORONSPEXT
152 jwijaya 10/25/94 - tint
153 jwijaya 10/06/94 - add namespace
154 jwijaya 10/02/94 - connection handle -> connection number
155 skotsovo 09/12/94 - keep 0 as uninitialized value for ORT consts
156 skotsovo 08/24/94 - fix orotec
157 skotsovo 08/17/94 - modify type code names
158 skotsovo 08/12/94 - fix 141 lint errors
159 skotsovo 07/25/94 - modify categorization of complex types (orotc)
160 skotsovo 07/07/94 - change typecode enum values & add decimal type
161 skotsovo 07/01/94 - change order of typecodes
162 jwijaya 06/15/94 - review
163 jboonleu 06/13/94 - add comments for the object cache options
164 jwijaya 06/13/94 - adhere to the header file template
165 skotsovo 06/09/94 - make ots scalar type names consistent with the ots
166 document
167 jwijaya 06/07/94 - include oratypes.h instead of s.h
168 skotsovo 05/24/94 - change typecodes
169 jwijaya 05/23/94 - fix comments of ororef
170 skotsovo 05/19/94 - remove type composition
171 skotsovo 05/09/94 - modified orotc according to new OTS document
172 jwijaya 05/03/94 - oroid and ororef
173 jwijaya 01/26/94 - Creation
174*/
175
176
177#ifndef ORATYPES
178#include <oratypes.h>
179#endif
180
181#ifndef OCIDFN_ORACLE
182#include <ocidfn.h>
183#endif
184
185#ifndef ORO_ORACLE
186#define ORO_ORACLE
187
188/*---------------------------------------------------------------------------*/
189/* SHORT NAMES SUPPORT SECTION */
190/*---------------------------------------------------------------------------*/
191
192#ifdef SLSHORTNAME
193
194/* the following are short names that are only supported on IBM mainframes
195 with the SLSHORTNAME defined.
196 With this all subsequent long names will actually be substituted with
197 the short names here */
198
199#define OCIDuration oroodt
200#define OCIInd oroind
201#define OCILockOpt oroolm
202#define OCIMarkOpt oroomo
203#define OCIObjectEvent orocev
204#define OCIObjectProperty oroopr
205#define OCIPinOpt oroopo
206#define OCIRef ororef
207#define OCIRefreshOpt orooro
208#define OCITypeCode orotc
209#define OCITypeEncap orotec
210#define OCITypeGetOpt orotgo
211#define OCITypeMethodFlag orotmf
212#define OCITypeParamMode orotpm
213#define OCIObjectPropId oroopi
214#define OCIObjectLifetime oroolft
215#define OCIObjectMarkstatus oroomst
216#define OCI_LOCK_NONE OROOLMNUL
217#define OCI_LOCK_X OROOLMX
218#define OCI_LOCK_X_NOWAIT OROOLMXNW
219#define OCI_MARK_DEFAULT OROOMODFL
220#define OCI_MARK_NONE OROOMONON
221#define OCI_MARK_UPDATE OROOMOUPD
222#define OCI_OBJECTEVENT_AFTER_FLUSH OROCEVAFL
223#define OCI_OBJECTEVENT_AFTER_REFRESH OROCEVARF
224#define OCI_OBJECTEVENT_BEFORE_FLUSH OROCEVBFL
225#define OCI_OBJECTEVENT_BEFORE_REFRESH OROCEVBRF
226#define OCI_OBJECTEVENT_WHEN_LOCK OROCEVWLK
227#define OCI_OBJECTEVENT_WHEN_MARK_DELETED OROCEVWDL
228#define OCI_OBJECTEVENT_WHEN_MARK_UPDATED OROCEVWUP
229#define OCI_OBJECTEVENT_WHEN_UNMARK OROCEVWUM
230#define OCI_OBJECTPROP_DIRTIED OROOPRDRT
231#define OCI_OBJECTPROP_LOADED OROOPRLOD
232#define OCI_OBJECTPROP_LOCKED OROOPRLCK
233#define OCI_PIN_ANY OROOPOANY
234#define OCI_PIN_DEFAULT OROOPODFL
235#define OCI_PIN_LATEST OROOPOLST
236#define OCI_PIN_RECENT OROOPOREC
237#define OCI_REFRESH_LOADED OROOROLOD
238#define OCI_TYPEENCAP_PRIVATE OROTECPVT
239#define OCI_TYPEENCAP_PUBLIC OROTECPUB
240#define OCI_TYPEGET_ALL OROTGOALL
241#define OCI_TYPEGET_HEADER OROTGOHDR
242#define OCI_TYPEMETHOD_CONSTANT OROTMCON
243#define OCI_TYPEMETHOD_CONSTRUCTOR OROTMCSTR
244#define OCI_TYPEMETHOD_DESTRUCTOR OROTMDSTR
245#define OCI_TYPEMETHOD_INLINE OROTMINL
246#define OCI_TYPEMETHOD_MAP OROTMMAP
247#define OCI_TYPEMETHOD_OPERATOR OROTMOP
248#define OCI_TYPEMETHOD_ORDER OROTMOR
249#define OCI_TYPEMETHOD_RNDS OROTMRDS
250#define OCI_TYPEMETHOD_RNPS OROTMRPS
251#define OCI_TYPEMETHOD_SELFISH OROTMSLF
252#define OCI_TYPEMETHOD_VIRTUAL OROTMVRT
253#define OCI_TYPEMETHOD_WNDS OROTMWDS
254#define OCI_TYPEMETHOD_WNPS OROTMWPS
255#define OCI_TYPEMETHOD_ABSTRACT OROTMABSTRACT
256#define OCI_TYPEMETHOD_OVERRIDING OROTMOVERRIDING
257#define OCI_TYPEMETHOD_PIPELINED OROTMPIPELINED
258#define OCI_TYPEPARAM_BYREF OROTPMREF
259#define OCI_TYPEPARAM_IN OROTPMIN
260#define OCI_TYPEPARAM_INOUT OROTPMIO
261#define OCI_TYPEPARAM_OUT OROTPMOUT
262#define OCI_TYPEPARAM_OUTNCPY OROTPMOUTNCPY
263#define OCI_TYPEPARAM_INOUTNCPY OROTPMIONCPY
264
265#endif /* SLSHORTNAME */
266
267
268/*---------------------------------------------------------------------------*/
269/* PUBLIC TYPES, CONSTANTS AND MACROS */
270/*---------------------------------------------------------------------------*/
271
272/*---------------------------------------------------------------------------*/
273/* GENERAL OBJECT TYPES, CONSTANTS, MACROS */
274/*---------------------------------------------------------------------------*/
275
276/*------------------------- OBJECT REFERENCE (REF) --------------------------*/
277
278typedef struct OCIRef OCIRef;
279/*
280 * OCIRef - OCI object REFerence
281 *
282 * In the Oracle object runtime environment, an object is identified by an
283 * object reference (ref) which contains the object identifier plus other
284 * runtime information. The contents of a ref is opaque to clients. Use
285 * OCIObjectNew() to construct a ref.
286 */
287
288
289/*--------------------------- OBJECT INDICATOR ------------------------------*/
290
291typedef sb2 OCIInd;
292/*
293 * OCIInd -- a variable of this type contains (null) indicator information
294 */
295
296#define OCI_IND_NOTNULL (OCIInd)0 /* not NULL */
297#define OCI_IND_NULL (OCIInd)(-1) /* NULL */
298#define OCI_IND_BADNULL (OCIInd)(-2) /* BAD NULL */
299#define OCI_IND_NOTNULLABLE (OCIInd)(-3) /* not NULLable */
300
301/*---------------------------------------------------------------------------*/
302/* OBJECT CACHE */
303/*---------------------------------------------------------------------------*/
304
305/* To enable object change detection mode, set this to TRUE */
306#define OCI_ATTR_OBJECT_DETECTCHANGE 0x00000020
307
308/* To enable object creation with non-NULL attributes by default, set the
309 following to TRUE.
310 By default, object is created with NULL attributes
311*/
312#define OCI_ATTR_OBJECT_NEWNOTNULL 0x00000010
313
314/* To enable sorting of the objects that belong to the same table
315 before being flushed through OCICacheFlush.
316 Please note that by enabling this object cache will not be flushing
317 the objects in the same order they were dirtied */
318#define OCI_ATTR_CACHE_ARRAYFLUSH 0x00000040
319
320/*--------------------------- OBJECT PIN OPTION -----------------------------*/
321
322enum OCIPinOpt
323{
324 /* 0 = uninitialized */
325 OCI_PIN_DEFAULT = 1, /* default pin option */
326 OCI_PIN_ANY = 3, /* pin any copy of the object */
327 OCI_PIN_RECENT = 4, /* pin recent copy of the object */
328 OCI_PIN_LATEST = 5 /* pin latest copy of the object */
329};
330typedef enum OCIPinOpt OCIPinOpt;
331
332/*
333 * OCIPinOpt - OCI object Pin Option
334 *
335 * In the Oracle object runtime environment, the program has the option to
336 * specify which copy of the object to pin.
337 *
338 * OCI_PINOPT_DEFAULT pins an object using the default pin option. The default
339 * pin option can be set as an attribute of the OCI environment handle
340 * (OCI_ATTR_PINTOPTION). The value of the default pin option can be
341 * OCI_PINOPT_ANY, OCI_PINOPT_RECENT, or OCI_PIN_LATEST. The default option
342 * is initialized to OCI_PINOPT_ANY.
343 *
344 * OCI_PIN_ANY pins any copy of the object. The object is pinned
345 * using the following criteria:
346 * If the object copy is not loaded, load it from the persistent store.
347 * Otherwise, the loaded object copy is returned to the program.
348 *
349 * OCI_PIN_RECENT pins the latest copy of an object. The object is
350 * pinned using the following criteria:
351 * If the object is not loaded, load the object from the persistent store
352 * from the latest version.
353 * If the object is not loaded in the current transaction and it is not
354 * dirtied, the object is refreshed from the latest version.
355 * Otherwise, the loaded object copy is returned to the program.
356 *
357 * OCI_PINOPT_LATEST pins the latest copy of an object. The object copy is
358 * pinned using the following criteria:
359 * If the object copy is not loaded, load it from the persistent store.
360 * If the object copy is loaded and dirtied, it is returned to the program.
361 * Otherwise, the loaded object copy is refreshed from the persistent store.
362 */
363
364
365
366/*--------------------------- OBJECT LOCK OPTION ----------------------------*/
367
368enum OCILockOpt
369{
370 /* 0 = uninitialized */
371 OCI_LOCK_NONE = 1, /* null (same as no lock) */
372 OCI_LOCK_X = 2, /* exclusive lock */
373 OCI_LOCK_X_NOWAIT = 3 /* exclusive lock, do not wait */
374};
375typedef enum OCILockOpt OCILockOpt;
376/*
377 * OCILockOpt - OCI object LOCK Option
378 *
379 * This option is used to specify the locking preferences when an object is
380 * loaded from the server.
381 */
382
383
384/*------------------------- OBJECT MODIFYING OPTION -------------------------*/
385
386enum OCIMarkOpt
387{
388 /* 0 = uninitialized */
389 OCI_MARK_DEFAULT = 1, /* default (the same as OCI_MARK_NONE) */
390 OCI_MARK_NONE = OCI_MARK_DEFAULT, /* object has not been modified */
391 OCI_MARK_UPDATE /* object is to be updated */
392};
393typedef enum OCIMarkOpt OCIMarkOpt;
394/*
395 * OCIMarkOpt - OCI object Mark option
396 *
397 * When the object is marked updated, the client has to specify how the
398 * object is intended to be changed.
399 */
400
401/*-------------------------- OBJECT Duration --------------------------------*/
402
403typedef ub2 OCIDuration;
404
405#define OCI_DURATION_INVALID 0xFFFF /* Invalid duration */
406#define OCI_DURATION_BEGIN (OCIDuration)10
407 /* beginning sequence of duration */
408#define OCI_DURATION_NULL (OCIDuration)(OCI_DURATION_BEGIN-1)
409 /* null duration */
410#define OCI_DURATION_DEFAULT (OCIDuration)(OCI_DURATION_BEGIN-2) /* default */
411#define OCI_DURATION_USER_CALLBACK (OCIDuration)(OCI_DURATION_BEGIN-3)
412#define OCI_DURATION_NEXT (OCIDuration)(OCI_DURATION_BEGIN-4)
413 /* next special duration */
414#define OCI_DURATION_SESSION (OCIDuration)(OCI_DURATION_BEGIN)
415 /* the end of user session */
416#define OCI_DURATION_TRANS (OCIDuration)(OCI_DURATION_BEGIN+1)
417 /* the end of user transaction */
418/******************************************************************************
419** DO NOT USE OCI_DURATION_CALL. IT IS UNSUPPORTED **
420** WILL BE REMOVED/CHANGED IN A FUTURE RELEASE **
421******************************************************************************/
422#define OCI_DURATION_CALL (OCIDuration)(OCI_DURATION_BEGIN+2)
423 /* the end of user client/server call */
424#define OCI_DURATION_STATEMENT (OCIDuration)(OCI_DURATION_BEGIN+3)
425
426/* This is to be used only during callouts. It is similar to that
427of OCI_DURATION_CALL, but lasts only for the duration of a callout.
428Its heap is from PGA */
429#define OCI_DURATION_CALLOUT (OCIDuration)(OCI_DURATION_BEGIN+4)
430
431#define OCI_DURATION_LAST OCI_DURATION_CALLOUT
432 /* last of predefined durations */
433
434/* This is not being treated as other predefined durations such as
435 SESSION, CALL etc, because this would not have an entry in the duration
436 table and its functionality is primitive such that only allocate, free,
437 resize memory are allowed, but one cannot create subduration out of this
438*/
439#define OCI_DURATION_PROCESS (OCIDuration)(OCI_DURATION_BEGIN-5)
440
441/*
442 * OCIDuration - OCI object duration
443 *
444 * A client can specify the duration of which an object is pinned (pin
445 * duration) and the duration of which the object is in memory (allocation
446 * duration). If the objects are still pinned at the end of the pin duration,
447 * the object cache manager will automatically unpin the objects for the
448 * client. If the objects still exist at the end of the allocation duration,
449 * the object cache manager will automatically free the objects for the client.
450 *
451 * Objects that are pinned with the option OCI_DURATION_TRANS will get unpinned
452 * automatically at the end of the current transaction.
453 *
454 * Objects that are pinned with the option OCI_DURATION_SESSION will get
455 * unpinned automatically at the end of the current session (connection).
456 *
457 * The option OCI_DURATION_NULL is used when the client does not want to set
458 * the pin duration. If the object is already loaded into the cache, then the
459 * pin duration will remain the same. If the object is not yet loaded, the
460 * pin duration of the object will be set to OCI_DURATION_DEFAULT.
461 */
462
463/*----------------------------- OBJECT PROPERTY -----------------------------*/
464
465/******************************************************************************
466** DO NOT USE OCIObjectProperty. IT IS UNSUPPORTED **
467** WILL BE REMOVED/CHANGED IN A FUTURE RELEASE **
468******************************************************************************/
469enum OCIObjectProperty
470{
471 /* 0 = uninitialized */
472 OCI_OBJECTPROP_DIRTIED = 1, /* dirty objects */
473 OCI_OBJECTPROP_LOADED, /* objects loaded in the transaction */
474 OCI_OBJECTPROP_LOCKED /* locked objects */
475};
476typedef enum OCIObjectProperty OCIObjectProperty;
477/*
478 * OCIObjectProperty -- OCI Object Property
479 * This specifies the properties of objects in the object cache.
480 */
481
482/*------------------------- CACHE REFRESH OPTION ---------------------------*/
483
484enum OCIRefreshOpt
485{
486 /* 0 = uninitialized */
487 OCI_REFRESH_LOADED = 1 /* refresh objects loaded in the transaction */
488};
489typedef enum OCIRefreshOpt OCIRefreshOpt;
490/*
491 * OCIRefreshOpt - OCI cache Refresh Option
492 * This option is used to specify the set of objects to be refreshed.
493 *
494 * OCI_REFRESH_LOAD refreshes the objects that are loaded in the current
495 * transaction.
496 */
497
498/*-------------------------------- OBJECT EVENT -----------------------------*/
499
500/******************************************************************************
501** DO NOT USE OCIObjectEvent. IT IS UNSUPPORTED **
502** WILL BE REMOVED/CHANGED IN A FUTURE RELEASE **
503******************************************************************************/
504enum OCIObjectEvent
505{
506 /* 0 = uninitialized */
507 OCI_OBJECTEVENT_BEFORE_FLUSH = 1, /* before flushing the cache */
508 OCI_OBJECTEVENT_AFTER_FLUSH, /* after flushing the cache */
509 OCI_OBJECTEVENT_BEFORE_REFRESH, /* before refreshing the cache */
510 OCI_OBJECTEVENT_AFTER_REFRESH, /* after refreshing the cache */
511 OCI_OBJECTEVENT_WHEN_MARK_UPDATED, /* when an object is marked updated */
512 OCI_OBJECTEVENT_WHEN_MARK_DELETED, /* when an object is marked deleted */
513 OCI_OBJECTEVENT_WHEN_UNMARK, /* when an object is being unmarked */
514 OCI_OBJECTEVENT_WHEN_LOCK /* when an object is being locked */
515};
516typedef enum OCIObjectEvent OCIObjectEvent;
517/*
518 * OCIObjectEvent -- OCI Object Event
519 * This specifies the kind of event that is supported by the object
520 * cache. The program can register a callback that is invoked when the
521 * specified event occurs.
522 */
523
524/*----------------------------- OBJECT COPY OPTION --------------------------*/
525#define OCI_OBJECTCOPY_NOREF (ub1)0x01
526/*
527 * OCIObjectCopyFlag - Object copy flag
528 *
529 * If OCI_OBJECTCOPY_NOREF is specified when copying an instance, the
530 * reference and lob will not be copied to the target instance.
531 */
532
533/*----------------------------- OBJECT FREE OPTION --------------------------*/
534#define OCI_OBJECTFREE_FORCE (ub2)0x0001
535#define OCI_OBJECTFREE_NONULL (ub2)0x0002
536#define OCI_OBJECTFREE_HEADER (ub2)0x0004
537/*
538 * OCIObjectFreeFlag - Object free flag
539 *
540 * If OCI_OBJECTCOPY_FORCE is specified when freeing an instance, the instance
541 * is freed regardless it is pinned or diritied.
542 * If OCI_OBJECTCOPY_NONULL is specified when freeing an instance, the null
543 * structure is not freed.
544 */
545
546/*----------------------- OBJECT PROPERTY ID -------------------------------*/
547
548typedef ub1 OCIObjectPropId;
549#define OCI_OBJECTPROP_LIFETIME 1 /* persistent or transient or value */
550#define OCI_OBJECTPROP_SCHEMA 2 /* schema name of table containing object */
551#define OCI_OBJECTPROP_TABLE 3 /* table name of table containing object */
552#define OCI_OBJECTPROP_PIN_DURATION 4 /* pin duartion of object */
553#define OCI_OBJECTPROP_ALLOC_DURATION 5 /* alloc duartion of object */
554#define OCI_OBJECTPROP_LOCK 6 /* lock status of object */
555#define OCI_OBJECTPROP_MARKSTATUS 7 /* mark status of object */
556#define OCI_OBJECTPROP_VIEW 8 /* is object a view object or not? */
557
558/*
559 * OCIObjectPropId - OCI Object Property Id
560 * Identifies the different properties of objects.
561 */
562
563/*----------------------- OBJECT LIFETIME ----------------------------------*/
564
565enum OCIObjectLifetime
566{
567 /* 0 = uninitialized */
568 OCI_OBJECT_PERSISTENT = 1, /* persistent object */
569 OCI_OBJECT_TRANSIENT, /* transient object */
570 OCI_OBJECT_VALUE /* value object */
571};
572typedef enum OCIObjectLifetime OCIObjectLifetime;
573/*
574 * OCIObjectLifetime - OCI Object Lifetime
575 * Classifies objects depending upon the lifetime and referenceability
576 * of the object.
577 */
578
579/*----------------------- OBJECT MARK STATUS -------------------------------*/
580
581typedef uword OCIObjectMarkStatus;
582#define OCI_OBJECT_NEW 0x0001 /* new object */
583#define OCI_OBJECT_DELETED 0x0002 /* object marked deleted */
584#define OCI_OBJECT_UPDATED 0x0004 /* object marked updated */
585/*
586 * OCIObjectMarkStatus - OCI Object Mark Status
587 * Status of the object - new or updated or deleted
588 */
589
590/* macros to test the object mark status */
591#define OCI_OBJECT_IS_UPDATED(flag) bit((flag), OCI_OBJECT_UPDATED)
592#define OCI_OBJECT_IS_DELETED(flag) bit((flag), OCI_OBJECT_DELETED)
593#define OCI_OBJECT_IS_NEW(flag) bit((flag), OCI_OBJECT_NEW)
594#define OCI_OBJECT_IS_DIRTY(flag) \
595 bit((flag), OCI_OBJECT_UPDATED|OCI_OBJECT_NEW|OCI_OBJECT_DELETED)
596
597/*---------------------------------------------------------------------------*/
598/* TYPE MANAGER */
599/*---------------------------------------------------------------------------*/
600
601/*------------------------------ TYPE CODE ----------------------------------*/
602
603/*
604 * Type manager typecodes
605 *
606 * These are typecodes designed to be used with the type manager;
607 * they also include longer, more readable versions of existing SQLT names.
608 * Those types that are directly related to existing SQLT types are #define'd
609 * to their SQLT equivalents.
610 *
611 * The type manager typecodes are designed to be useable for all OCI calls.
612 * They are in the range from 192 to 320 for typecodes, so as not to conflict
613 * with existing OCI SQLT typecodes (see ocidfn.h).
614 */
615
616#define OCI_TYPECODE_REF SQLT_REF /* SQL/OTS OBJECT REFERENCE */
617#define OCI_TYPECODE_DATE SQLT_DAT /* SQL DATE OTS DATE */
618#define OCI_TYPECODE_SIGNED8 27 /* SQL SIGNED INTEGER(8) OTS SINT8 */
619#define OCI_TYPECODE_SIGNED16 28 /* SQL SIGNED INTEGER(16) OTS SINT16 */
620#define OCI_TYPECODE_SIGNED32 29 /* SQL SIGNED INTEGER(32) OTS SINT32 */
621#define OCI_TYPECODE_REAL 21 /* SQL REAL OTS SQL_REAL */
622#define OCI_TYPECODE_DOUBLE 22 /* SQL DOUBLE PRECISION OTS SQL_DOUBLE */
623#define OCI_TYPECODE_BFLOAT SQLT_IBFLOAT /* Binary float */
624#define OCI_TYPECODE_BDOUBLE SQLT_IBDOUBLE /* Binary double */
625#define OCI_TYPECODE_FLOAT SQLT_FLT /* SQL FLOAT(P) OTS FLOAT(P) */
626#define OCI_TYPECODE_NUMBER SQLT_NUM/* SQL NUMBER(P S) OTS NUMBER(P S) */
627#define OCI_TYPECODE_DECIMAL SQLT_PDN
628 /* SQL DECIMAL(P S) OTS DECIMAL(P S) */
629#define OCI_TYPECODE_UNSIGNED8 SQLT_BIN
630 /* SQL UNSIGNED INTEGER(8) OTS UINT8 */
631#define OCI_TYPECODE_UNSIGNED16 25 /* SQL UNSIGNED INTEGER(16) OTS UINT16 */
632#define OCI_TYPECODE_UNSIGNED32 26 /* SQL UNSIGNED INTEGER(32) OTS UINT32 */
633#define OCI_TYPECODE_OCTET 245 /* SQL ??? OTS OCTET */
634#define OCI_TYPECODE_SMALLINT 246 /* SQL SMALLINT OTS SMALLINT */
635#define OCI_TYPECODE_INTEGER SQLT_INT /* SQL INTEGER OTS INTEGER */
636#define OCI_TYPECODE_RAW SQLT_LVB /* SQL RAW(N) OTS RAW(N) */
637#define OCI_TYPECODE_PTR 32 /* SQL POINTER OTS POINTER */
638#define OCI_TYPECODE_VARCHAR2 SQLT_VCS
639 /* SQL VARCHAR2(N) OTS SQL_VARCHAR2(N) */
640#define OCI_TYPECODE_CHAR SQLT_AFC /* SQL CHAR(N) OTS SQL_CHAR(N) */
641#define OCI_TYPECODE_VARCHAR SQLT_CHR
642 /* SQL VARCHAR(N) OTS SQL_VARCHAR(N) */
643#define OCI_TYPECODE_MLSLABEL SQLT_LAB /* OTS MLSLABEL */
644#define OCI_TYPECODE_VARRAY 247 /* SQL VARRAY OTS PAGED VARRAY */
645#define OCI_TYPECODE_TABLE 248 /* SQL TABLE OTS MULTISET */
646#define OCI_TYPECODE_OBJECT SQLT_NTY /* SQL/OTS NAMED OBJECT TYPE */
647#define OCI_TYPECODE_OPAQUE 58 /* SQL/OTS Opaque Types */
648#define OCI_TYPECODE_NAMEDCOLLECTION SQLT_NCO
649 /* SQL/OTS NAMED COLLECTION TYPE */
650#define OCI_TYPECODE_BLOB SQLT_BLOB /* SQL/OTS BINARY LARGE OBJECT */
651#define OCI_TYPECODE_BFILE SQLT_BFILE /* SQL/OTS BINARY FILE OBJECT */
652#define OCI_TYPECODE_CLOB SQLT_CLOB /* SQL/OTS CHARACTER LARGE OBJECT */
653#define OCI_TYPECODE_CFILE SQLT_CFILE /* SQL/OTS CHARACTER FILE OBJECT */
654
655/* the following are ANSI datetime datatypes added in 8.1 */
656#define OCI_TYPECODE_TIME SQLT_TIME /* SQL/OTS TIME */
657#define OCI_TYPECODE_TIME_TZ SQLT_TIME_TZ /* SQL/OTS TIME_TZ */
658#define OCI_TYPECODE_TIMESTAMP SQLT_TIMESTAMP /* SQL/OTS TIMESTAMP */
659#define OCI_TYPECODE_TIMESTAMP_TZ SQLT_TIMESTAMP_TZ /* SQL/OTS TIMESTAMP_TZ */
660
661#define OCI_TYPECODE_TIMESTAMP_LTZ SQLT_TIMESTAMP_LTZ /* TIMESTAMP_LTZ */
662
663#define OCI_TYPECODE_INTERVAL_YM SQLT_INTERVAL_YM /* SQL/OTS INTRVL YR-MON */
664#define OCI_TYPECODE_INTERVAL_DS SQLT_INTERVAL_DS /* SQL/OTS INTRVL DAY-SEC */
665#define OCI_TYPECODE_UROWID SQLT_RDD /* Urowid type */
666
667
668#define OCI_TYPECODE_OTMFIRST 228 /* first Open Type Manager typecode */
669#define OCI_TYPECODE_OTMLAST 320 /* last OTM typecode */
670#define OCI_TYPECODE_SYSFIRST 228 /* first OTM system type (internal) */
671#define OCI_TYPECODE_SYSLAST 235 /* last OTM system type (internal) */
672#define OCI_TYPECODE_PLS_INTEGER 266 /* type code for PLS_INTEGER */
673
674/* the following are PL/SQL-only internal. They should not be used */
675#define OCI_TYPECODE_ITABLE SQLT_TAB /* PLSQL indexed table */
676#define OCI_TYPECODE_RECORD SQLT_REC /* PLSQL record */
677#define OCI_TYPECODE_BOOLEAN SQLT_BOL /* PLSQL boolean */
678
679/* NOTE : The following NCHAR related codes are just short forms for saying
680 OCI_TYPECODE_VARCHAR2 with a charset form of SQLCS_NCHAR. These codes are
681 intended for use in the OCIAnyData API only and nowhere else. */
682#define OCI_TYPECODE_NCHAR 286
683#define OCI_TYPECODE_NVARCHAR2 287
684#define OCI_TYPECODE_NCLOB 288
685
686
687/* To indicate absence of typecode being specified */
688#define OCI_TYPECODE_NONE 0
689/* To indicate error has to be taken from error handle - reserved for
690 sqlplus use */
691#define OCI_TYPECODE_ERRHP 283
692
693/* The OCITypeCode type is interchangeable with the existing SQLT type
694 which is a ub2 */
695typedef ub2 OCITypeCode;
696
697
698/*----------------------- GET OPTIONS FOR TDO ------------------------------*/
699
700enum OCITypeGetOpt
701{
702 OCI_TYPEGET_HEADER,
703 /* load only the header portion of the TDO when getting type */
704 OCI_TYPEGET_ALL /* load all attribute and method descriptors as well */
705};
706typedef enum OCITypeGetOpt OCITypeGetOpt;
707
708/*
709 * OCITypeGetOpt
710 *
711 * This is the flag passed to OCIGetTypeArray() to indicate how the TDO is
712 * going to be loaded into the object cache.
713 * OCI_TYPEGET_HEADER implies that only the header portion is to be loaded
714 * initially, with the rest loaded in on a 'lazy' basis. Only the header is
715 * needed for PL/SQL and OCI operations. OCI_TYPEGET_ALL implies that ALL
716 * the attributes and methods belonging to a TDO will be loaded into the
717 * object cache in one round trip. Hence it will take much longer to execute,
718 * but will ensure that no more loading needs to be done when pinning ADOs
719 * etc. This is only needed if your code needs to examine and manipulate
720 * attribute and method information.
721 *
722 * The default is OCI_TYPEGET_HEADER.
723 */
724
725
726/*------------------------ TYPE ENCAPSULTATION LEVEL ------------------------*/
727
728enum OCITypeEncap
729{
730 /* 0 = uninitialized */
731 OCI_TYPEENCAP_PRIVATE, /* private: only internally visible */
732 OCI_TYPEENCAP_PUBLIC /* public: visible to both internally and externally */
733};
734typedef enum OCITypeEncap OCITypeEncap;
735/*
736 * OCITypeEncap - OCI Encapsulation Level
737 */
738
739
740/*---------------------------- TYPE METHOD FLAGS ----------------------------*/
741
742enum OCITypeMethodFlag
743{
744 OCI_TYPEMETHOD_INLINE = 0x0001, /* inline */
745 OCI_TYPEMETHOD_CONSTANT = 0x0002, /* constant */
746 OCI_TYPEMETHOD_VIRTUAL = 0x0004, /* virtual */
747 OCI_TYPEMETHOD_CONSTRUCTOR = 0x0008, /* constructor */
748 OCI_TYPEMETHOD_DESTRUCTOR = 0x0010, /* destructor */
749 OCI_TYPEMETHOD_OPERATOR = 0x0020, /* operator */
750 OCI_TYPEMETHOD_SELFISH = 0x0040, /* selfish method (generic otherwise) */
751
752 OCI_TYPEMETHOD_MAP = 0x0080, /* map (relative ordering) */
753 OCI_TYPEMETHOD_ORDER = 0x0100, /* order (relative ordering) */
754 /* OCI_TYPEMETHOD_MAP and OCI_TYPEMETHOD_ORDER are mutually exclusive */
755
756 OCI_TYPEMETHOD_RNDS= 0x0200, /* Read no Data State (default) */
757 OCI_TYPEMETHOD_WNDS= 0x0400, /* Write no Data State */
758 OCI_TYPEMETHOD_RNPS= 0x0800, /* Read no Process State */
759 OCI_TYPEMETHOD_WNPS= 0x1000, /* Write no Process State */
760 OCI_TYPEMETHOD_ABSTRACT = 0x2000, /* abstract (not instantiable) method */
761 OCI_TYPEMETHOD_OVERRIDING = 0x4000, /* overriding method */
762 OCI_TYPEMETHOD_PIPELINED = 0x8000 /* method is pipelined */
763};
764typedef enum OCITypeMethodFlag OCITypeMethodFlag;
765
766/* macros to test the type method flags */
767#define OCI_METHOD_IS_INLINE(flag) bit((flag), OCI_TYPEMETHOD_INLINE)
768#define OCI_METHOD_IS_CONSTANT(flag) bit((flag), OCI_TYPEMETHOD_CONSTANT)
769#define OCI_METHOD_IS_VIRTUAL(flag) bit((flag), OCI_TYPEMETHOD_VIRTUAL)
770#define OCI_METHOD_IS_CONSTRUCTOR(flag) bit((flag), OCI_TYPEMETHOD_CONSTRUCTOR)
771#define OCI_METHOD_IS_DESTRUCTOR(flag) bit((flag), OCI_TYPEMETHOD_DESTRUCTOR)
772#define OCI_METHOD_IS_OPERATOR(flag) bit((flag), OCI_TYPEMETHOD_OPERATOR)
773#define OCI_METHOD_IS_SELFISH(flag) bit((flag), OCI_TYPEMETHOD_SELFISH)
774#define OCI_METHOD_IS_MAP(flag) bit((flag), OCI_TYPEMETHOD_MAP)
775#define OCI_METHOD_IS_ORDER(flag) bit((flag), OCI_TYPEMETHOD_ORDER)
776#define OCI_METHOD_IS_RNDS(flag) bit((flag), OCI_TYPEMETHOD_RNDS)
777#define OCI_METHOD_IS_WNDS(flag) bit((flag), OCI_TYPEMETHOD_WNDS)
778#define OCI_METHOD_IS_RNPS(flag) bit((flag), OCI_TYPEMETHOD_RNPS)
779#define OCI_METHOD_IS_WNPS(flag) bit((flag), OCI_TYPEMETHOD_WNPS)
780#define OCI_METHOD_IS_ABSTRACT(flag) bit((flag), OCI_TYPEMETHOD_ABSTRACT)
781#define OCI_METHOD_IS_OVERRIDING(flag) bit((flag), OCI_TYPEMETHOD_OVERRIDING)
782#define OCI_METHOD_IS_PIPELINED(flag) bit((flag), OCI_TYPEMETHOD_PIPELINED)
783
784#define OCI_TYPEMETHOD_IS_INLINE(flag) bit((flag), OCI_TYPEMETHOD_INLINE)
785#define OCI_TYPEMETHOD_IS_CONSTANT(flag) bit((flag), OCI_TYPEMETHOD_CONSTANT)
786#define OCI_TYPEMETHOD_IS_VIRTUAL(flag) bit((flag), OCI_TYPEMETHOD_VIRTUAL)
787#define OCI_TYPEMETHOD_IS_CONSTRUCTOR(flag) \
788 bit((flag), OCI_TYPEMETHOD_CONSTRUCTOR)
789#define OCI_TYPEMETHOD_IS_DESTRUCTOR(flag) \
790 bit((flag), OCI_TYPEMETHOD_DESTRUCTOR)
791#define OCI_TYPEMETHOD_IS_OPERATOR(flag) bit((flag), OCI_TYPEMETHOD_OPERATOR)
792#define OCI_TYPEMETHOD_IS_SELFISH(flag) bit((flag), OCI_TYPEMETHOD_SELFISH)
793#define OCI_TYPEMETHOD_IS_MAP(flag) bit((flag), OCI_TYPEMETHOD_MAP)
794#define OCI_TYPEMETHOD_IS_ORDER(flag) bit((flag), OCI_TYPEMETHOD_ORDER)
795#define OCI_TYPEMETHOD_IS_RNDS(flag) bit((flag), OCI_TYPEMETHOD_RNDS)
796#define OCI_TYPEMETHOD_IS_WNDS(flag) bit((flag), OCI_TYPEMETHOD_WNDS)
797#define OCI_TYPEMETHOD_IS_RNPS(flag) bit((flag), OCI_TYPEMETHOD_RNPS)
798#define OCI_TYPEMETHOD_IS_WNPS(flag) bit((flag), OCI_TYPEMETHOD_WNPS)
799#define OCI_TYPEMETHOD_IS_ABSTRACT(flag) bit((flag), OCI_TYPEMETHOD_ABSTRACT)
800#define OCI_TYPEMETHOD_IS_OVERRIDING(flag) \
801 bit((flag), OCI_TYPEMETHOD_OVERRIDING)
802#define OCI_TYPEMETHOD_IS_PIPELINED(flag) bit((flag), OCI_TYPEMETHOD_PIPELINED)
803
804/* macros to set the type method flags */
805#define OCI_TYPEMETHOD_SET_INLINE(flag) bis((flag), OCI_TYPEMETHOD_INLINE)
806#define OCI_TYPEMETHOD_SET_CONSTANT(flag) bis((flag), OCI_TYPEMETHOD_CONSTANT)
807#define OCI_TYPEMETHOD_SET_VIRTUAL(flag) bis((flag), OCI_TYPEMETHOD_VIRTUAL)
808#define OCI_TYPEMETHOD_SET_CONSTRUCTOR(flag) \
809 bis((flag), OCI_TYPEMETHOD_CONSTRUCTOR)
810#define OCI_TYPEMETHOD_SET_DESTRUCTOR(flag) \
811 bis((flag), OCI_TYPEMETHOD_DESTRUCTOR)
812#define OCI_TYPEMETHOD_SET_OPERATOR(flag) bis((flag), OCI_TYPEMETHOD_OPERATOR)
813#define OCI_TYPEMETHOD_SET_SELFISH(flag) bis((flag), OCI_TYPEMETHOD_SELFISH)
814#define OCI_TYPEMETHOD_SET_MAP(flag) bis((flag), OCI_TYPEMETHOD_MAP)
815#define OCI_TYPEMETHOD_SET_ORDER(flag) bis((flag), OCI_TYPEMETHOD_ORDER)
816#define OCI_TYPEMETHOD_SET_RNDS(flag) bis((flag), OCI_TYPEMETHOD_RNDS)
817#define OCI_TYPEMETHOD_SET_WNDS(flag) bis((flag), OCI_TYPEMETHOD_WNDS)
818#define OCI_TYPEMETHOD_SET_RNPS(flag) bis((flag), OCI_TYPEMETHOD_RNPS)
819#define OCI_TYPEMETHOD_SET_WNPS(flag) bis((flag), OCI_TYPEMETHOD_WNPS)
820
821/* macros to clear the type method flags */
822#define OCI_TYPEMETHOD_CLEAR_INLINE(flag) bic((flag), OCI_TYPEMETHOD_INLINE)
823#define OCI_TYPEMETHOD_CLEAR_CONSTANT(flag) \
824 bic((flag), OCI_TYPEMETHOD_CONSTANT)
825#define OCI_TYPEMETHOD_CLEAR_VIRTUAL(flag) bic((flag), OCI_TYPEMETHOD_VIRTUAL)
826#define OCI_TYPEMETHOD_CLEAR_CONSTRUCTOR(flag) \
827 bic((flag), OCI_TYPEMETHOD_CONSTRUCTOR)
828#define OCI_TYPEMETHOD_CLEAR_DESTRUCTOR(flag) \
829 bic((flag), OCI_TYPEMETHOD_DESTRUCTOR)
830#define OCI_TYPEMETHOD_CLEAR_OPERATOR(flag) \
831 bic((flag), OCI_TYPEMETHOD_OPERATOR)
832#define OCI_TYPEMETHOD_CLEAR_SELFISH(flag) bic((flag), OCI_TYPEMETHOD_SELFISH)
833#define OCI_TYPEMETHOD_CLEAR_MAP(flag) bic((flag), OCI_TYPEMETHOD_MAP)
834#define OCI_TYPEMETHOD_CLEAR_ORDER(flag) bic((flag), OCI_TYPEMETHOD_ORDER)
835#define OCI_TYPEMETHOD_CLEAR_RNDS(flag) bic((flag), OCI_TYPEMETHOD_RNDS)
836#define OCI_TYPEMETHOD_CLEAR_WNDS(flag) bic((flag), OCI_TYPEMETHOD_WNDS)
837#define OCI_TYPEMETHOD_CLEAR_RNPS(flag) bic((flag), OCI_TYPEMETHOD_RNPS)
838#define OCI_TYPEMETHOD_CLEAR_WNPS(flag) bic((flag), OCI_TYPEMETHOD_WNPS)
839
840/*--------------------------- TYPE PARAMETER MODE ---------------------------*/
841
842enum OCITypeParamMode
843{
844 /* PL/SQL starts this from 0 */
845 OCI_TYPEPARAM_IN = 0, /* in */
846 OCI_TYPEPARAM_OUT, /* out */
847 OCI_TYPEPARAM_INOUT, /* in-out */
848 OCI_TYPEPARAM_BYREF, /* call by reference (implicitly in-out) */
849 OCI_TYPEPARAM_OUTNCPY, /* OUT with NOCOPY modifier */
850 OCI_TYPEPARAM_INOUTNCPY /* IN OUT with NOCOPY modifier */
851};
852typedef enum OCITypeParamMode OCITypeParamMode;
853
854
855/*-------------------------------- DEFAULTS ---------------------------------*/
856
857/* default binary and decimal precision and scale */
858
859#define OCI_NUMBER_DEFAULTPREC ((ub1)0) /* no precision specified */
860#define OCI_NUMBER_DEFAULTSCALE ((sb1)MAXSB1MINVAL)
861 /* no binary/decimal scale specified */
862
863/* default maximum length for varrays and vstrings (used in sql.bsq) */
864
865#define OCI_VARRAY_MAXSIZE 4000
866 /* default maximum number of elements for a varray */
867#define OCI_STRING_MAXLEN 4000 /* default maximum length of a vstring */
868
869/*---------------------------------------------------------------------------*/
870/* This set of macro is used only in beta2. They should be removed as soon as
871 * PLSQL has made the changes of not using these macros.
872 */
873
874/* Special duration for allocating memory only. No instance can be allocated
875 * given these durations.
876 */
877#define OCICoherency OCIRefreshOpt
878#define OCI_COHERENCY_NONE (OCIRefreshOpt)2
879#define OCI_COHERENCY_NULL (OCIRefreshOpt)4
880#define OCI_COHERENCY_ALWAYS (OCIRefreshOpt)5
881
882#endif /* ORO_ORACLE */
883