2
* $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/odci.h,v 1.3 2005/05/06 16:48:56 karine Exp $
5
/* Copyright (c) 1998, 2003, Oracle Corporation. All rights reserved. */
9
odci.h - Oracle Data Cartridge Interface definitions
12
This file contains Oracle Data Cartridge Interface definitions. These
13
include the ODCI Types and Constants.
20
Estimated increasing cost defects per page:
23
ACCEPTANCE REVIEW STATUS
37
- The constants defined here are replica of the constants defined
38
in ODCIConst Package defined as part of catodci.sql. If you change
39
these do make the similar change in catodci.sql.
42
ayoaz 04/21/03 - add CursorNum to ODCIEnv
43
abrumm 12/30/02 - Bug #2223225: add define for
44
ODCI_ARG_DESC_LIST_MAXSIZE
45
ayoaz 10/14/02 - Add Cardinality to ODCIArgDesc
46
ayoaz 09/11/02 - add ODCIQueryInfo to ODCIIndexCtx
47
yhu 09/19/02 - add ODCI_DEBUGGING_ON for ODCIEnv.EnvFlags
48
hsbedi 10/10/02 - add object number into ODCIExtTableInfo
49
ayoaz 08/30/02 - add ODCITable2 types
50
tchorma 07/29/02 - Add ODCIFuncCallInfo type for WITH COLUMN CONTEXT
51
hsbedi 06/29/02 - External table populate
52
yhu 07/20/01 - add parallel degree in ODCIIndexInfo.
53
abrumm 02/20/01 - ODCIExtTableInfo: add AccessParmBlob attribute
54
abrumm 01/18/01 - ODCIExtTableInfo: add default directory
55
spsundar 08/24/00 - Update attrbiute positions
56
abrumm 08/04/00 - external tables changes: ODCIExtTableInfo, constants
57
tchorma 09/11/00 - Add return code ODCI_FATAL
58
tchorma 08/08/00 - Add Update Block References Option for Alter Index
59
ayoaz 08/01/00 - Add ODCI_AGGREGATE_REUSE_CTX
60
spsundar 06/19/00 - add ODCIEnv type
61
abrumm 06/27/00 - add defines for ODCIExtTable flags
62
abrumm 06/04/00 - external tables: ODCIExtTableInfo change; add ODCIEnv
63
ddas 04/28/00 - extensible optimizer enhancements for 8.2
64
yhu 06/05/00 - add a bit in IndexInfoFlags for trans. tblspc
65
yhu 04/10/00 - add ODCIPartInfo & remove ODCIIndexPartList
66
abrumm 03/29/00 - external table support
67
spsundar 02/14/00 - update odci definitions for 8.2
68
nagarwal 03/07/99 - bug# 838308 - set estimate_stats=1
69
rmurthy 11/09/98 - add blocking flag
70
ddas 10/31/98 - add ODCI_QUERY_SORT_ASC and ODCI_QUERY_SORT_DESC
71
ddas 05/26/98 - fix ODCIPredInfo flag bits
72
rmurthy 06/03/98 - add macro for RegularCall
73
spsundar 05/08/98 - add constants related to ODCIIndexAlter options
74
rmurthy 04/30/98 - remove include s.h
75
rmurthy 04/20/98 - name fixes
76
rmurthy 04/13/98 - add C mappings for odci types
77
alsrivas 04/10/98 - adding defines for ODCI_INDEX1
78
jsriniva 04/04/98 - Creation
88
/*---------------------------------------------------------------------------*/
89
/* SHORT NAMES SUPPORT SECTION */
90
/*---------------------------------------------------------------------------*/
94
/* The following are short names that are only supported on IBM mainframes
95
* with the SLSHORTNAME defined.
96
* With this all subsequent long names will actually be substituted with
97
* the short names here
100
#define ODCIColInfo_ref odcicir
101
#define ODCIColInfoList odcicil
102
#define ODCIColInfoList2 odcicil2
103
#define ODCIIndexInfo_ref odciiir
104
#define ODCIPredInfo_ref odcipir
105
#define ODCIRidList odcirl
106
#define ODCIIndexCtx_ref odciicr
107
#define ODCIObject_ref odcior
108
#define ODCIObjectList odciol
109
#define ODCIQueryInfo_ref odciqir
110
#define ODCIFuncInfo_ref odcifir
111
#define ODCICost_ref odcicr
112
#define ODCIArgDesc_ref odciadr
113
#define ODCIArgDescList odciadl
114
#define ODCIStatsOptions_ref odcisor
115
#define ODCIColInfo odcici
116
#define ODCIColInfo_ind odcicii
117
#define ODCIIndexInfo odciii
118
#define ODCIIndexInfo_ind odciiii
119
#define ODCIPredInfo odcipi
120
#define ODCIPredInfo_ind odcipii
121
#define ODCIIndexCtx odciic
122
#define ODCIIndexCtx_ind odciici
123
#define ODCIObject odcio
124
#define ODCIObject_ind odcioi
125
#define ODCIQueryInfo odciqi
126
#define ODCIQueryInfo_ind odciqii
127
#define ODCIFuncInfo odcifi
128
#define ODCIFuncInfo_infd odcifii
129
#define ODCICost odcic
130
#define ODCICost_ind odcici
131
#define ODCIArgDesc odciad
132
#define ODCIArgDesc_ind odciadi
133
#define ODCIStatsOptions odciso
134
#define ODCIStatsOptions_ind odcisoi
135
#define ODCIPartInfo odcipti
136
#define ODCIPartInfo_ind odciptii
137
#define ODCIPartInfo_ref odciptir
138
#define ODCIExtTableInfo odcixt
139
#define ODCIExtTableInfo_ind odcixti
140
#define ODCIExtTableInfo_ref odcixtr
141
#define ODCIExtTableQCInfo odcixq
142
#define ODCIExtTableQCInfo_ind odcixqi
143
#define ODCIExtTableQCInfo_ref odcixqr
144
#define ODCIFuncCallInfo odcifc
145
#define ODCIFuncCall_ind odcifci
146
#define ODCIFuncCall_ref odcifcr
148
#endif /* SLSHORTNAME */
150
/*---------------------------------------------------------------------------
151
PUBLIC TYPES AND CONSTANTS
152
---------------------------------------------------------------------------*/
154
/* Constants for Return Status */
155
#define ODCI_SUCCESS 0
157
#define ODCI_WARNING 2
158
#define ODCI_ERROR_CONTINUE 3
161
/* Constants for ODCIPredInfo.Flags */
162
#define ODCI_PRED_EXACT_MATCH 0x0001
163
#define ODCI_PRED_PREFIX_MATCH 0x0002
164
#define ODCI_PRED_INCLUDE_START 0x0004
165
#define ODCI_PRED_INCLUDE_STOP 0x0008
166
#define ODCI_PRED_OBJECT_FUNC 0x0010
167
#define ODCI_PRED_OBJECT_PKG 0x0020
168
#define ODCI_PRED_OBJECT_TYPE 0x0040
169
#define ODCI_PRED_MULTI_TABLE 0x0080
171
/* Constants for QueryInfo.Flags */
172
#define ODCI_QUERY_FIRST_ROWS 0x01
173
#define ODCI_QUERY_ALL_ROWS 0x02
174
#define ODCI_QUERY_SORT_ASC 0x04
175
#define ODCI_QUERY_SORT_DESC 0x08
176
#define ODCI_QUERY_BLOCKING 0x10
178
/* Constants for ScnFlg(Func /w Index Context) */
179
#define ODCI_CLEANUP_CALL 1
180
#define ODCI_REGULAR_CALL 2
182
/* Constants for ODCIFuncInfo.Flags */
183
#define ODCI_OBJECT_FUNC 0x01
184
#define ODCI_OBJECT_PKG 0x02
185
#define ODCI_OBJECT_TYPE 0x04
187
/* Constants for ODCIArgDesc.ArgType */
188
#define ODCI_ARG_OTHER 1
189
#define ODCI_ARG_COL 2 /* column */
190
#define ODCI_ARG_LIT 3 /* literal */
191
#define ODCI_ARG_ATTR 4 /* object attribute */
192
#define ODCI_ARG_NULL 5
193
#define ODCI_ARG_CURSOR 6
195
/* Maximum size of ODCIArgDescList array */
196
#define ODCI_ARG_DESC_LIST_MAXSIZE 32767
198
/* Constants for ODCIStatsOptions.Options */
199
#define ODCI_PERCENT_OPTION 1
200
#define ODCI_ROW_OPTION 2
202
/* Constants for ODCIStatsOptions.Flags */
203
#define ODCI_ESTIMATE_STATS 0x01
204
#define ODCI_COMPUTE_STATS 0x02
205
#define ODCI_VALIDATE 0x04
207
/* Constants for ODCIIndexAlter parameter alter_option */
208
#define ODCI_ALTIDX_NONE 0
209
#define ODCI_ALTIDX_RENAME 1
210
#define ODCI_ALTIDX_REBUILD 2
211
#define ODCI_ALTIDX_REBUILD_ONL 3
212
#define ODCI_ALTIDX_MODIFY_COL 4
213
#define ODCI_ALTIDX_UPDATE_BLOCK_REFS 5
215
/* Constants for ODCIIndexInfo.IndexInfoFlags */
216
#define ODCI_INDEX_LOCAL 0x0001
217
#define ODCI_INDEX_RANGE_PARTN 0x0002
218
#define ODCI_INDEX_HASH_PARTN 0x0004
219
#define ODCI_INDEX_ONLINE 0x0008
220
#define ODCI_INDEX_PARALLEL 0x0010
221
#define ODCI_INDEX_UNUSABLE 0x0020
222
#define ODCI_INDEX_ONIOT 0x0040
223
#define ODCI_INDEX_TRANS_TBLSPC 0x0080
224
#define ODCI_INDEX_FUNCTION_IDX 0x0100
226
/* Constants for ODCIIndexInfo.IndexParaDegree */
227
#define ODCI_INDEX_DEFAULT_DEGREE 32767
229
/* Constants for ODCIEnv.EnvFlags */
230
#define ODCI_DEBUGGING_ON 0x01
232
/* Constants for ODCIEnv.CallProperty */
233
#define ODCI_CALL_NONE 0
234
#define ODCI_CALL_FIRST 1
235
#define ODCI_CALL_INTERMEDIATE 2
236
#define ODCI_CALL_FINAL 3
238
/* Constants for ODCIExtTableInfo.OpCode */
239
#define ODCI_EXTTABLE_INFO_OPCODE_FETCH 1
240
#define ODCI_EXTTABLE_INFO_OPCODE_POPULATE 2
242
/* Constants (bit definitions) for ODCIExtTableInfo.Flag */
243
/* sampling type: row or block */
244
#define ODCI_EXTTABLE_INFO_FLAG_SAMPLE 0x00000001
245
#define ODCI_EXTTABLE_INFO_FLAG_SAMPLE_BLOCK 0x00000002
246
/* AccessParmClob, AccessParmBlob discriminator */
247
#define ODCI_EXTTABLE_INFO_FLAG_ACCESS_PARM_CLOB 0x00000004
248
#define ODCI_EXTTABLE_INFO_FLAG_ACCESS_PARM_BLOB 0x00000008
250
/* Constants for ODCIExtTableInfo.IntraSourceConcurrency */
254
/* Constants (bit definitions) for ODCIExtTable{Open,Fetch,Populate,Close}
257
#define ODCI_EXTTABLE_OPEN_FLAGS_QC 0x00000001 /* caller is Query Coord */
258
#define ODCI_EXTTABLE_OPEN_FLAGS_SHADOW 0x00000002 /* caller is shadow proc */
259
#define ODCI_EXTTABLE_OPEN_FLAGS_SLAVE 0x00000004 /* caller is slave proc */
261
#define ODCI_EXTTABLE_FETCH_FLAGS_EOS 0x00000001 /* end-of-stream on fetch */
263
/* Constants for Flags argument to ODCIAggregateTerminate */
264
#define ODCI_AGGREGATE_REUSE_CTX 1
266
/*---------------------------------------------------------------------------
268
---------------------------------------------------------------------------*/
270
* These are C mappings for the OTS types defined in catodci.sql
273
typedef OCIRef ODCIColInfo_ref;
274
typedef OCIArray ODCIColInfoList;
275
typedef OCIArray ODCIColInfoList2;
276
typedef OCIRef ODCIIndexInfo_ref;
277
typedef OCIRef ODCIPredInfo_ref;
278
typedef OCIArray ODCIRidList;
279
typedef OCIRef ODCIIndexCtx_ref;
280
typedef OCIRef ODCIObject_ref;
281
typedef OCIArray ODCIObjectList;
282
typedef OCIRef ODCIQueryInfo_ref;
283
typedef OCIRef ODCIFuncInfo_ref;
284
typedef OCIRef ODCICost_ref;
285
typedef OCIRef ODCIArgDesc_ref;
286
typedef OCIArray ODCIArgDescList;
287
typedef OCIRef ODCIStatsOptions_ref;
288
typedef OCIRef ODCIPartInfo_ref;
289
typedef OCIRef ODCIEnv_ref;
290
typedef OCIRef ODCIExtTableInfo_ref; /* external table support */
291
typedef OCIArray ODCIGranuleList; /* external table support */
292
typedef OCIRef ODCIExtTableQCInfo_ref; /* external table support */
293
typedef OCIRef ODCIFuncCallInfo_ref;
294
typedef OCIArray ODCINumberList;
298
OCIString* TableSchema;
299
OCIString* TableName;
301
OCIString* ColTypName;
302
OCIString* ColTypSchema;
303
OCIString* TablePartition;
305
typedef struct ODCIColInfo ODCIColInfo;
307
struct ODCIColInfo_ind
315
OCIInd TablePartition;
317
typedef struct ODCIColInfo_ind ODCIColInfo_ind;
319
struct ODCIFuncCallInfo
321
struct ODCIColInfo ColInfo;
324
struct ODCIFuncCallInfo_ind
326
struct ODCIColInfo_ind ColInfo;
331
OCIString* IndexSchema;
332
OCIString* IndexName;
333
ODCIColInfoList* IndexCols;
334
OCIString* IndexPartition;
335
OCINumber IndexInfoFlags;
336
OCINumber IndexParaDegree;
338
typedef struct ODCIIndexInfo ODCIIndexInfo;
340
struct ODCIIndexInfo_ind
346
OCIInd IndexPartition;
347
OCIInd IndexInfoFlags;
348
OCIInd IndexParaDegree;
350
typedef struct ODCIIndexInfo_ind ODCIIndexInfo_ind;
354
OCIString* ObjectSchema;
355
OCIString* ObjectName;
356
OCIString* MethodName;
359
typedef struct ODCIPredInfo ODCIPredInfo;
361
struct ODCIPredInfo_ind
369
typedef struct ODCIPredInfo_ind ODCIPredInfo_ind;
373
OCIString* ObjectSchema;
374
OCIString* ObjectName;
376
typedef struct ODCIObject ODCIObject;
378
struct ODCIObject_ind
384
typedef struct ODCIObject_ind ODCIObject_ind;
389
ODCIObjectList* AncOps;
391
typedef struct ODCIQueryInfo ODCIQueryInfo;
394
struct ODCIQueryInfo_ind
400
typedef struct ODCIQueryInfo_ind ODCIQueryInfo_ind;
404
struct ODCIIndexInfo IndexInfo;
406
struct ODCIQueryInfo QueryInfo;
408
typedef struct ODCIIndexCtx ODCIIndexCtx;
410
struct ODCIIndexCtx_ind
413
struct ODCIIndexInfo_ind IndexInfo;
415
struct ODCIQueryInfo_ind QueryInfo;
417
typedef struct ODCIIndexCtx_ind ODCIIndexCtx_ind;
421
OCIString* ObjectSchema;
422
OCIString* ObjectName;
423
OCIString* MethodName;
426
typedef struct ODCIFuncInfo ODCIFuncInfo;
428
struct ODCIFuncInfo_ind
436
typedef struct ODCIFuncInfo_ind ODCIFuncInfo_ind;
442
OCINumber NetworkCost;
443
OCIString* IndexCostInfo;
445
typedef struct ODCICost ODCICost;
453
OCIInd IndexCostInfo;
455
typedef struct ODCICost_ind ODCICost_ind;
460
OCIString* TableName;
461
OCIString* TableSchema;
463
OCIString* TablePartitionLower;
464
OCIString* TablePartitionUpper;
465
OCINumber Cardinality;
467
typedef struct ODCIArgDesc ODCIArgDesc;
469
struct ODCIArgDesc_ind
476
OCIInd TablePartitionLower;
477
OCIInd TablePartitionUpper;
480
typedef struct ODCIArgDesc_ind ODCIArgDesc_ind;
482
struct ODCIStatsOptions
488
typedef struct ODCIStatsOptions ODCIStatsOptions;
490
struct ODCIStatsOptions_ind
497
typedef struct ODCIStatsOptions_ind ODCIStatsOptions_ind;
502
OCINumber CallProperty;
503
OCINumber DebugLevel;
506
typedef struct ODCIEnv ODCIEnv;
516
typedef struct ODCIEnv_ind ODCIEnv_ind;
520
OCIString* TablePartition;
521
OCIString* IndexPartition;
523
typedef struct ODCIPartInfo ODCIPartInfo;
525
struct ODCIPartInfo_ind
528
OCIInd TablePartition;
529
OCIInd IndexPartition;
531
typedef struct ODCIPartInfo_ind ODCIPartInfo_ind;
533
/*---------- External Tables ----------*/
534
struct ODCIExtTableInfo
536
OCIString* TableSchema;
537
OCIString* TableName;
538
ODCIColInfoList* RefCols;
539
OCIClobLocator* AccessParmClob;
540
OCIBlobLocator* AccessParmBlob;
541
ODCIArgDescList* Locations;
542
ODCIArgDescList* Directories;
543
OCIString* DefaultDirectory;
544
OCIString* DriverType;
547
OCINumber GranuleSize;
549
OCINumber SamplePercent;
552
OCIString* MTableName;
553
OCIString* MTableSchema;
554
OCINumber TableObjNo;
556
typedef struct ODCIExtTableInfo ODCIExtTableInfo;
558
struct ODCIExtTableInfo_ind
564
OCIInd AccessParmClob;
565
OCIInd AccessParmBlob;
568
OCIInd DefaultDirectory;
574
OCIInd SamplePercent;
581
typedef struct ODCIExtTableInfo_ind ODCIExtTableInfo_ind;
583
struct ODCIExtTableQCInfo
585
OCINumber NumGranules;
586
OCINumber NumLocations;
587
ODCIGranuleList* GranuleInfo;
588
OCINumber IntraSourceConcurrency;
592
typedef struct ODCIExtTableQCInfo ODCIExtTableQCInfo;
594
struct ODCIExtTableQCInfo_ind
600
OCIInd IntraSourceConcurrency;
604
typedef struct ODCIExtTableQCInfo_ind ODCIExtTableQCInfo_ind;
606
/*********************************************************/
607
/* Table Function Info types (used by ODCITablePrepare) */
608
/*********************************************************/
610
struct ODCITabFuncInfo
612
ODCINumberList* Attrs;
615
typedef struct ODCITabFuncInfo ODCITabFuncInfo;
617
struct ODCITabFuncInfo_ind
623
typedef struct ODCITabFuncInfo_ind ODCITabFuncInfo_ind;
625
/*********************************************************************/
626
/* Table Function Statistics types (used by ODCIStatsTableFunction) */
627
/*********************************************************************/
629
struct ODCITabFuncStats
633
typedef struct ODCITabFuncStats ODCITabFuncStats;
635
struct ODCITabFuncStats_ind
640
typedef struct ODCITabFuncStats_ind ODCITabFuncStats_ind;
642
/*---------------------------------------------------------------------------
643
PRIVATE TYPES AND CONSTANTS
644
---------------------------------------------------------------------------*/
647
/*---------------------------------------------------------------------------
649
---------------------------------------------------------------------------*/
652
/*---------------------------------------------------------------------------
654
---------------------------------------------------------------------------*/
657
#endif /* ODCI_ORACLE */