OCILIB (C and C++ Driver for Oracle)  4.7.5
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
Loading...
Searching...
No Matches
defines.h
1/*
2 * OCILIB - C Driver for Oracle (C Wrapper for Oracle OCI)
3 *
4 * Website: http://www.ocilib.net
5 *
6 * Copyright (c) 2007-2023 Vincent ROGIER <vince.rogier@ocilib.net>
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21/* IMPORTANT NOTICE
22 *
23 * This file contains explanations about Oracle and OCI technologies.
24 * OCILIB is a wrapper around OCI and thus exposes OCI features.
25 * The OCILIB documentation intends to explain Oracle / OCI concepts
26 * and is naturally based on the official Oracle OCI documentation.
27 *
28 * Some parts of OCILIB documentation may include some information
29 * taken and adapted from the following Oracle documentations :
30 * - Oracle Call Interface Programmer's Guide
31 * - Oracle Streams - Advanced Queuing User's Guide
32 */
33
34#ifndef OCILIB_OCILIBC_DEFINES_H_INCLUDED
35#define OCILIB_OCILIBC_DEFINES_H_INCLUDED
36
37#include "ocilibc/platform.h"
38
45/* versions extract macros */
46
47#define OCI_VER_MAJ(v) (unsigned int) ((v)/10000)
48#define OCI_VER_MIN(v) (unsigned int) (((v)/100) - (((v)/10000)*100))
49#define OCI_VER_REV(v) (unsigned int) ((v) - (((v)/100)*100))
50
51#define OCI_VER_MAKE(x, y, z) ((x)*10000 + (y)*100 + (z))
52
53/* oracle OCI well known major versions (non exhaustive) */
54
55#define OCI_8_0 OCI_VER_MAKE( 8, 0, 0)
56#define OCI_8_1 OCI_VER_MAKE( 8, 1, 0)
57#define OCI_9_0 OCI_VER_MAKE( 9, 0, 0)
58#define OCI_9_2 OCI_VER_MAKE( 9, 2, 0)
59#define OCI_10_1 OCI_VER_MAKE(10, 1, 0)
60#define OCI_10_2 OCI_VER_MAKE(10, 2, 0)
61#define OCI_11_1 OCI_VER_MAKE(11, 1, 0)
62#define OCI_11_2 OCI_VER_MAKE(11, 2, 0)
63#define OCI_12_1 OCI_VER_MAKE(12, 1, 0)
64#define OCI_12_2 OCI_VER_MAKE(12, 2, 0)
65#define OCI_18_1 OCI_VER_MAKE(18, 1, 0)
66#define OCI_18_2 OCI_VER_MAKE(18, 2, 0)
67#define OCI_18_3 OCI_VER_MAKE(18, 3, 0)
68#define OCI_18_4 OCI_VER_MAKE(18, 4, 0)
69#define OCI_18_5 OCI_VER_MAKE(18, 5, 0)
70#define OCI_19_3 OCI_VER_MAKE(19, 3, 0)
71#define OCI_19_5 OCI_VER_MAKE(19, 5, 0)
72#define OCI_21_3 OCI_VER_MAKE(21, 3, 0)
73
74/* OCILIB Error types */
75
76#define OCI_ERR_ORACLE 1
77#define OCI_ERR_OCILIB 2
78#define OCI_ERR_WARNING 3
79
80/* OCILIB Error codes */
81
82#define OCI_ERR_NONE 0
83#define OCI_ERR_NOT_INITIALIZED 1
84#define OCI_ERR_LOADING_SHARED_LIB 2
85#define OCI_ERR_LOADING_SYMBOLS 3
86#define OCI_ERR_MULTITHREADED 4
87#define OCI_ERR_MEMORY 5
88#define OCI_ERR_NOT_AVAILABLE 6
89#define OCI_ERR_NULL_POINTER 7
90#define OCI_ERR_DATATYPE_NOT_SUPPORTED 8
91#define OCI_ERR_PARSE_TOKEN 9
92#define OCI_ERR_MAP_ARGUMENT 10
93#define OCI_ERR_OUT_OF_BOUNDS 11
94#define OCI_ERR_UNFREED_DATA 12
95#define OCI_ERR_MAX_BIND 13
96#define OCI_ERR_ATTR_NOT_FOUND 14
97#define OCI_ERR_MIN_VALUE 15
98#define OCI_ERR_NOT_COMPATIBLE 16
99#define OCI_ERR_STMT_STATE 17
100#define OCI_ERR_STMT_NOT_SCROLLABLE 18
101#define OCI_ERR_BIND_ALREADY_USED 19
102#define OCI_ERR_BIND_ARRAY_SIZE 20
103#define OCI_ERR_COLUMN_NOT_FOUND 21
104#define OCI_ERR_DIRPATH_STATE 22
105#define OCI_ERR_CREATE_OCI_ENVIRONMENT 23
106#define OCI_ERR_REBIND_BAD_DATATYPE 24
107#define OCI_ERR_TYPEINFO_DATATYPE 25
108#define OCI_ERR_ITEM_NOT_FOUND 26
109#define OCI_ERR_ARG_INVALID_VALUE 27
110#define OCI_ERR_XA_ENV_FROM_STRING 28
111#define OCI_ERR_XA_CONN_FROM_STRING 29
112#define OCI_ERR_BIND_EXTERNAL_NOT_ALLOWED 30
113#define OCI_ERR_UNFREED_BYTES 31
114
115#define OCI_ERR_COUNT 32
116
117/* Public OCILIB handles */
118
119#define OCI_IPC_TYPE_INFO 10
120#define OCI_IPC_CONNECTION 11
121#define OCI_IPC_POOL 12
122#define OCI_IPC_TRANSACTION 13
123#define OCI_IPC_STATEMENT 14
124#define OCI_IPC_RESULTSET 15
125#define OCI_IPC_COLUMN 16
126#define OCI_IPC_DATE 17
127#define OCI_IPC_TIMESTAMP 18
128#define OCI_IPC_INTERVAL 19
129#define OCI_IPC_LOB 20
130#define OCI_IPC_FILE 21
131#define OCI_IPC_LONG 22
132#define OCI_IPC_OBJECT 23
133#define OCI_IPC_COLLECTION 24
134#define OCI_IPC_ITERATOR 25
135#define OCI_IPC_ELEMENT 26
136#define OCI_IPC_NUMBER 27
137#define OCI_IPC_HASHTABLE 28
138#define OCI_IPC_THREAD 29
139#define OCI_IPC_MUTEX 30
140#define OCI_IPC_BIND 31
141#define OCI_IPC_REF 32
142#define OCI_IPC_DIRPATH 33
143#define OCI_IPC_NOTIFY 34
144#define OCI_IPC_EVENT 35
145#define OCI_IPC_ARRAY 36
146#define OCI_IPC_MSG 37
147#define OCI_IPC_ENQUEUE 38
148#define OCI_IPC_DEQUEUE 39
149#define OCI_IPC_AGENT 40
150
151/* allocated bytes types */
152
153#define OCI_MEM_ORACLE 1
154#define OCI_MEM_OCILIB 2
155#define OCI_MEM_ALL (OCI_MEM_ORACLE | OCI_MEM_OCILIB)
156
157/* binding */
158
159#define OCI_BIND_BY_POS 0
160#define OCI_BIND_BY_NAME 1
161#define OCI_BIND_SIZE 6
162#define OCI_BIND_MAX 65535
163
164/* fetching */
165
166#define OCI_FETCH_SIZE 20
167#define OCI_PREFETCH_SIZE 20
168#define OCI_LONG_EXPLICIT 1
169#define OCI_LONG_IMPLICIT 2
170
171/* unknown value */
172
173#define OCI_UNKNOWN 0
174
175/* C Data Type mapping */
176
177#define OCI_CDT_NUMERIC 1
178#define OCI_CDT_DATETIME 3
179#define OCI_CDT_TEXT 4
180#define OCI_CDT_LONG 5
181#define OCI_CDT_CURSOR 6
182#define OCI_CDT_LOB 7
183#define OCI_CDT_FILE 8
184#define OCI_CDT_TIMESTAMP 9
185#define OCI_CDT_INTERVAL 10
186#define OCI_CDT_RAW 11
187#define OCI_CDT_OBJECT 12
188#define OCI_CDT_COLLECTION 13
189#define OCI_CDT_REF 14
190#define OCI_CDT_BOOLEAN 15
191
192/* Data Type codes for OCI_ImmediateXXX() calls */
193
194#define OCI_ARG_SHORT 1
195#define OCI_ARG_USHORT 2
196#define OCI_ARG_INT 3
197#define OCI_ARG_UINT 4
198#define OCI_ARG_BIGINT 5
199#define OCI_ARG_BIGUINT 6
200#define OCI_ARG_DOUBLE 7
201#define OCI_ARG_DATETIME 8
202#define OCI_ARG_TEXT 9
203#define OCI_ARG_LOB 10
204#define OCI_ARG_FILE 11
205#define OCI_ARG_TIMESTAMP 12
206#define OCI_ARG_INTERVAL 13
207#define OCI_ARG_RAW 14
208#define OCI_ARG_OBJECT 15
209#define OCI_ARG_COLLECTION 16
210#define OCI_ARG_REF 17
211#define OCI_ARG_FLOAT 18
212#define OCI_ARG_NUMBER 19
213
214/* statement types */
215
216#define OCI_CST_SELECT 1
217#define OCI_CST_UPDATE 2
218#define OCI_CST_DELETE 3
219#define OCI_CST_INSERT 4
220#define OCI_CST_CREATE 5
221#define OCI_CST_DROP 6
222#define OCI_CST_ALTER 7
223#define OCI_CST_BEGIN 8
224#define OCI_CST_DECLARE 9
225#define OCI_CST_CALL 10
226#define OCI_CST_MERGE 16
227
228/* environment modes */
229
230#define OCI_ENV_DEFAULT 0
231#define OCI_ENV_THREADED 1
232#define OCI_ENV_CONTEXT 2
233#define OCI_ENV_EVENTS 4
234
235/* sessions modes */
236
237#define OCI_SESSION_DEFAULT 0x00000000 /* any version */
238#define OCI_SESSION_SYSDBA 0x00000002 /* any version */
239#define OCI_SESSION_SYSOPER 0x00000004 /* any version */
240#define OCI_SESSION_SYSASM 0x00008000 /* From 11gR1 */
241#define OCI_SESSION_SYSBKP 0x00020000 /* From 12cR1 */
242#define OCI_SESSION_SYSDGD 0x00040000 /* From 12cR1 */
243#define OCI_SESSION_SYSKMT 0x00080000 /* From 12cR1 */
244#define OCI_SESSION_SYSRAC 0x00100000 /* From 12cR2 */
245
246#define OCI_SESSION_XA 0x00000001
247#define OCI_SESSION_PRELIM_AUTH 0x00000008
248
249/* change notification types */
250
251#define OCI_CNT_OBJECTS 1
252#define OCI_CNT_ROWS 2
253#define OCI_CNT_DATABASES 4
254#define OCI_CNT_ALL (OCI_CNT_OBJECTS | OCI_CNT_ROWS | OCI_CNT_DATABASES)
255
256/* event notification types */
257
258#define OCI_ENT_STARTUP 1
259#define OCI_ENT_SHUTDOWN 2
260#define OCI_ENT_SHUTDOWN_ANY 3
261#define OCI_ENT_DROP_DATABASE 4
262#define OCI_ENT_DEREGISTER 5
263#define OCI_ENT_OBJECT_CHANGED 6
264
265/* event object notification types */
266
267#define OCI_ONT_INSERT 0x2
268#define OCI_ONT_UPDATE 0x4
269#define OCI_ONT_DELETE 0x8
270#define OCI_ONT_ALTER 0x10
271#define OCI_ONT_DROP 0x20
272#define OCI_ONT_GENERIC 0x40
273
274/* database startup modes */
275
276#define OCI_DB_SPM_START 1
277#define OCI_DB_SPM_MOUNT 2
278#define OCI_DB_SPM_OPEN 4
279#define OCI_DB_SPM_FULL (OCI_DB_SPM_START | OCI_DB_SPM_MOUNT | OCI_DB_SPM_OPEN)
280
281/* database startup flags */
282
283#define OCI_DB_SPF_DEFAULT 0
284#define OCI_DB_SPF_FORCE 1
285#define OCI_DB_SPF_RESTRICT 2
286
287/* database shutdown modes */
288
289#define OCI_DB_SDM_SHUTDOWN 1
290#define OCI_DB_SDM_CLOSE 2
291#define OCI_DB_SDM_DISMOUNT 4
292#define OCI_DB_SDM_FULL (OCI_DB_SDM_SHUTDOWN | OCI_DB_SDM_CLOSE | OCI_DB_SDM_DISMOUNT)
293
294/* database shutdown flags */
295
296#define OCI_DB_SDF_DEFAULT 0
297#define OCI_DB_SDF_TRANS 1
298#define OCI_DB_SDF_TRANS_LOCAL 2
299#define OCI_DB_SDF_IMMEDIATE 3
300#define OCI_DB_SDF_ABORT 4
301
302/* charset form types */
303
304#define OCI_CSF_NONE 0
305#define OCI_CSF_DEFAULT 1
306#define OCI_CSF_NATIONAL 2
307
308/* statement fetch mode */
309
310#define OCI_SFM_DEFAULT 0
311#define OCI_SFM_SCROLLABLE 0x08
312
313/* statement fetch direction */
314
315#define OCI_SFD_ABSOLUTE 0x20
316#define OCI_SFD_RELATIVE 0x40
317
318/* bind allocation mode */
319
320#define OCI_BAM_EXTERNAL 1
321#define OCI_BAM_INTERNAL 2
322
323/* bind direction mode */
324
325#define OCI_BDM_IN 1
326#define OCI_BDM_OUT 2
327#define OCI_BDM_IN_OUT (OCI_BDM_IN | OCI_BDM_OUT)
328
329/* Column property flags */
330
331#define OCI_CPF_NONE 0
332#define OCI_CPF_IS_IDENTITY 1
333#define OCI_CPF_IS_GEN_ALWAYS 2
334#define OCI_CPF_IS_GEN_BY_DEFAULT_ON_NULL 4
335#define OCI_CPF_IS_LPART 8
336#define OCI_CPF_IS_CONID 16
337
338/* Column collation IDs */
339
340#define OCI_CCI_NONE 0x00000000
341#define OCI_CCI_NLS_COMP 0x00003FFE
342#define OCI_CCI_NLS_SORT 0x00003FFD
343#define OCI_CCI_NLS_SORT_CI 0x00003FFC
344#define OCI_CCI_NLS_SORT_AI 0x00003FFB
345#define OCI_CCI_NLS_SORT_CS 0x00003FFA
346#define OCI_CCI_NLS_SORT_VAR1 0x00003FF9
347#define OCI_CCI_NLS_SORT_VAR1_CI 0x00003FF8
348#define OCI_CCI_NLS_SORT_VAR1_AI 0x00003FF7
349#define OCI_CCI_NLS_SORT_VAR1_CS 0x00003FF6
350#define OCI_CCI_BINARY 0x00003FFF
351#define OCI_CCI_BINARY_CI 0x00023FFF
352#define OCI_CCI_BINARY_AI 0x00013FFF
353
354/* Integer sign flag */
355
356#define OCI_NUM_UNSIGNED 2
357
358/* External Integer types */
359
360#define OCI_NUM_SHORT 4
361#define OCI_NUM_INT 8
362#define OCI_NUM_BIGINT 16
363#define OCI_NUM_FLOAT 32
364#define OCI_NUM_DOUBLE 64
365#define OCI_NUM_NUMBER 128
366
367#define OCI_NUM_USHORT (OCI_NUM_SHORT | OCI_NUM_UNSIGNED)
368#define OCI_NUM_UINT (OCI_NUM_INT | OCI_NUM_UNSIGNED)
369#define OCI_NUM_BIGUINT (OCI_NUM_BIGINT | OCI_NUM_UNSIGNED)
370
371/* timestamp types */
372
373#define OCI_TIMESTAMP 1
374#define OCI_TIMESTAMP_TZ 2
375#define OCI_TIMESTAMP_LTZ 3
376
377/* interval types */
378
379#define OCI_INTERVAL_YM 1
380#define OCI_INTERVAL_DS 2
381
382/* long types */
383
384#define OCI_BLONG 1
385#define OCI_CLONG 2
386
387/* lob types */
388
389#define OCI_BLOB 1
390#define OCI_CLOB 2
391#define OCI_NCLOB 3
392
393/* lob opening mode */
394
395#define OCI_LOB_READONLY 1
396#define OCI_LOB_READWRITE 2
397
398/* file types */
399
400#define OCI_BFILE 1
401#define OCI_CFILE 2
402
403/* lob browsing mode */
404
405#define OCI_SEEK_SET 1
406#define OCI_SEEK_END 2
407#define OCI_SEEK_CUR 3
408
409/* type info types */
410
411#define OCI_TIF_TABLE 1
412#define OCI_TIF_VIEW 2
413#define OCI_TIF_TYPE 3
414
415/* object type */
416
417#define OCI_OBJ_PERSISTENT 1
418#define OCI_OBJ_TRANSIENT 2
419#define OCI_OBJ_VALUE 3
420
421/* collection types */
422
423#define OCI_COLL_VARRAY 1
424#define OCI_COLL_NESTED_TABLE 2
425#define OCI_COLL_INDEXED_TABLE 3
426
427/* pool types */
428
429#define OCI_POOL_CONNECTION 1
430#define OCI_POOL_SESSION 2
431
432/* AQ message state */
433
434#define OCI_AMS_READY 1
435#define OCI_AMS_WAITING 2
436#define OCI_AMS_PROCESSED 3
437#define OCI_AMS_EXPIRED 4
438
439/* AQ sequence deviation */
440
441#define OCI_ASD_BEFORE 2
442#define OCI_ASD_TOP 3
443
444/* AQ message visibility */
445
446#define OCI_AMV_IMMEDIATE 1
447#define OCI_AMV_ON_COMMIT 2
448
449/* AQ dequeue mode */
450
451#define OCI_ADM_BROWSE 1
452#define OCI_ADM_LOCKED 2
453#define OCI_ADM_REMOVE 3
454#define OCI_ADM_REMOVE_NODATA 4
455
456/* AQ dequeue navigation */
457
458#define OCI_ADN_FIRST_MSG 1
459#define OCI_ADN_NEXT_TRANSACTION 2
460#define OCI_ADN_NEXT_MSG 3
461
462/* AQ queue table purge mode */
463
464#define OCI_APM_BUFFERED 1
465#define OCI_APM_PERSISTENT 2
466#define OCI_APM_ALL (OCI_APM_BUFFERED | OCI_APM_PERSISTENT)
467
468/* AQ queue table grouping mode */
469
470#define OCI_AGM_NONE 0
471#define OCI_AGM_TRANSACTIONNAL 1
472
473/* AQ queue table type */
474
475#define OCI_AQT_NORMAL 0
476#define OCI_AQT_EXCEPTION 1
477#define OCI_AQT_NON_PERSISTENT 2
478
479/* direct path processing return status */
480
481#define OCI_DPR_COMPLETE 1
482#define OCI_DPR_ERROR 2
483#define OCI_DPR_FULL 3
484#define OCI_DPR_PARTIAL 4
485#define OCI_DPR_EMPTY 5
486
487/* direct path conversion modes */
488
489#define OCI_DCM_DEFAULT 1
490#define OCI_DCM_FORCE 2
491
492/* trace size constants */
493
494#define OCI_SIZE_TRACE_ID 64
495#define OCI_SIZE_TRACE_MODULE 48
496#define OCI_SIZE_TRACE_ACTION 32
497#define OCI_SIZE_TRACE_INFO 64
498#define OCI_SIZE_TRACE_OPERATION 32
499
500/* trace types */
501
502#define OCI_TRC_IDENTITY 1
503#define OCI_TRC_MODULE 2
504#define OCI_TRC_ACTION 3
505#define OCI_TRC_DETAIL 4
506#define OCI_TRC_OPERATION 5
507
508/* Network timeout type */
509
510#define OCI_NTO_SEND 1
511#define OCI_NTO_RECEIVE 2
512#define OCI_NTO_CALL 3
513
514/* HA event type */
515
516#define OCI_HET_DOWN 0
517#define OCI_HET_UP 1
518
519/* HA event source */
520#define OCI_HES_INSTANCE 0
521#define OCI_HES_DATABASE 1
522#define OCI_HES_NODE 2
523#define OCI_HES_SERVICE 3
524#define OCI_HES_SERVICE_MEMBER 4
525#define OCI_HES_ASM_INSTANCE 5
526#define OCI_HES_PRECONNECT 6
527
528/* Fail over types */
529
530#define OCI_FOT_NONE 1
531#define OCI_FOT_SESSION 2
532#define OCI_FOT_SELECT 4
533
534/* fail over notifications */
535
536#define OCI_FOE_END 1
537#define OCI_FOE_ABORT 2
538#define OCI_FOE_REAUTH 4
539#define OCI_FOE_BEGIN 8
540#define OCI_FOE_ERROR 16
541
542/* fail over callback return code */
543
544#define OCI_FOC_OK 0
545#define OCI_FOC_RETRY 25410
546
547/* hash tables support */
548
549#define OCI_HASH_STRING 1
550#define OCI_HASH_INTEGER 2
551#define OCI_HASH_POINTER 3
552
553/* transaction types */
554
555#define OCI_TRS_NEW 0x00000001
556#define OCI_TRS_READONLY 0x00000100
557#define OCI_TRS_READWRITE 0x00000200
558#define OCI_TRS_SERIALIZABLE 0x00000400
559#define OCI_TRS_LOOSE 0x00010000
560#define OCI_TRS_TIGHT 0x00020000
561
562/* format types */
563
564#define OCI_FMT_DATE 1
565#define OCI_FMT_TIMESTAMP 2
566#define OCI_FMT_NUMERIC 3
567#define OCI_FMT_BINARY_DOUBLE 4
568#define OCI_FMT_BINARY_FLOAT 5
569#define OCI_FMT_TIMESTAMP_TZ 6
570
571/* sql function codes */
572
573#define OCI_SFC_CREATE_TABLE 1
574#define OCI_SFC_INSERT 2
575#define OCI_SFC_SELECT 3
576#define OCI_SFC_CREATE_CLUSTER 4
577#define OCI_SFC_ALTER_CLUSTER 5
578#define OCI_SFC_UPDATE 6
579#define OCI_SFC_DELETE 7
580#define OCI_SFC_DROP_CLUSTER 8
581#define OCI_SFC_CREATE_INDEX 9
582#define OCI_SFC_DROP_INDEX 10
583#define OCI_SFC_ALTER_INDEX 11
584#define OCI_SFC_DROP_TABLE 12
585#define OCI_SFC_CREATE_SEQUENCE 13
586#define OCI_SFC_ALTER_SEQUENCE 14
587#define OCI_SFC_ALTER_TABLE 15
588#define OCI_SFC_DROP_SEQUENCE 16
589#define OCI_SFC_GRANT_OBJECT 17
590#define OCI_SFC_REVOKE_OBJECT 18
591#define OCI_SFC_CREATE_SYNONYM 19
592#define OCI_SFC_DROP_SYNONYM 20
593#define OCI_SFC_CREATE_VIEW 21
594#define OCI_SFC_DROP_VIEW 22
595#define OCI_SFC_VALIDATE_INDEX 23
596#define OCI_SFC_CREATE_PROCEDURE 24
597#define OCI_SFC_ALTER_PROCEDURE 25
598#define OCI_SFC_LOCK 26
599#define OCI_SFC_NO_OP 27
600#define OCI_SFC_RENAME 28
601#define OCI_SFC_COMMENT 29
602#define OCI_SFC_AUDIT_OBJECT 30
603#define OCI_SFC_NOAUDIT_OBJECT 31
604#define OCI_SFC_CREATE_DATABASE_LINK 32
605#define OCI_SFC_DROP_DATABASE_LINK 33
606#define OCI_SFC_CREATE_DATABASE 34
607#define OCI_SFC_ALTER_DATABASE 35
608#define OCI_SFC_CREATE_ROLLBACK_SEG 36
609#define OCI_SFC_ALTER_ROLLBACK_SEG 37
610#define OCI_SFC_DROP_ROLLBACK_SEG 38
611#define OCI_SFC_CREATE_TABLESPACE 39
612#define OCI_SFC_ALTER_TABLESPACE 40
613#define OCI_SFC_DROP_TABLESPACE 41
614#define OCI_SFC_ALTER_SESSION 42
615#define OCI_SFC_ALTER_USER 43
616#define OCI_SFC_COMMIT 44
617#define OCI_SFC_ROLLBACK 45
618#define OCI_SFC_SAVEPOINT 46
619#define OCI_SFC_PL_SQL_EXECUTE 47
620#define OCI_SFC_SET_TRANSACTION 48
621#define OCI_SFC_ALTER_SYSTEM 49
622#define OCI_SFC_EXPLAIN 50
623#define OCI_SFC_CREATE_USER 51
624#define OCI_SFC_CREATE_ROLE 52
625#define OCI_SFC_DROP_USER 53
626#define OCI_SFC_DROP_ROLE 54
627#define OCI_SFC_SET_ROLE 55
628#define OCI_SFC_CREATE_SCHEMA 56
629#define OCI_SFC_CREATE_CONTROL_FILE 57
630#define OCI_SFC_ALTER_TRACING 58
631#define OCI_SFC_CREATE_TRIGGER 59
632#define OCI_SFC_ALTER_TRIGGER 60
633#define OCI_SFC_DROP_TRIGGER 61
634#define OCI_SFC_ANALYZE_TABLE 62
635#define OCI_SFC_ANALYZE_INDEX 63
636#define OCI_SFC_ANALYZE_CLUSTER 64
637#define OCI_SFC_CREATE_PROFILE 65
638#define OCI_SFC_DROP_PROFILE 66
639#define OCI_SFC_ALTER_PROFILE 67
640#define OCI_SFC_DROP_PROCEDURE 68
641#define OCI_SFC_ALTER_RESOURCE_COST 70
642#define OCI_SFC_CREATE_MATERIALIZED_VIEW_LOG 71
643#define OCI_SFC_ALTER_MATERIALIZED_VIEW_LOG 72
644#define OCI_SFC_DROP_MATERIALIZED_VIEW_LOG 73
645#define OCI_SFC_CREATE_MATERIALIZED_VIEW 74
646#define OCI_SFC_ALTER_MATERIALIZED_VIEW 75
647#define OCI_SFC_DROP_MATERIALIZED_VIEW 76
648#define OCI_SFC_CREATE_TYPE 77
649#define OCI_SFC_DROP_TYPE 78
650#define OCI_SFC_ALTER_ROLE 79
651#define OCI_SFC_ALTER_TYPE 80
652#define OCI_SFC_CREATE_TYPE_BODY 81
653#define OCI_SFC_ALTER_TYPE_BODY 82
654#define OCI_SFC_DROP_TYPE_BODY 83
655#define OCI_SFC_DROP_LIBRARY 84
656#define OCI_SFC_TRUNCATE_TABLE 85
657#define OCI_SFC_TRUNCATE_CLUSTER 86
658#define OCI_SFC_ALTER_VIEW 88
659#define OCI_SFC_SET_CONSTRAINTS 90
660#define OCI_SFC_CREATE_FUNCTION 91
661#define OCI_SFC_ALTER_FUNCTION 92
662#define OCI_SFC_DROP_FUNCTION 93
663#define OCI_SFC_CREATE_PACKAGE 94
664#define OCI_SFC_ALTER_PACKAGE 95
665#define OCI_SFC_DROP_PACKAGE 96
666#define OCI_SFC_CREATE_PACKAGE_BODY 97
667#define OCI_SFC_ALTER_PACKAGE_BODY 98
668#define OCI_SFC_DROP_PACKAGE_BODY 99
669#define OCI_SFC_LOGON 100
670#define OCI_SFC_LOGOFF 101
671#define OCI_SFC_LOGOFF_BY_CLEANUP 102
672#define OCI_SFC_SESSION_REC 103
673#define OCI_SFC_SYSTEM_AUDIT 104
674#define OCI_SFC_SYSTEM_NOAUDIT 105
675#define OCI_SFC_AUDIT_DEFAULT 106
676#define OCI_SFC_NOAUDIT_DEFAULT 107
677#define OCI_SFC_SYSTEM_GRANT 108
678#define OCI_SFC_SYSTEM_REVOKE 109
679#define OCI_SFC_CREATE_PUBLIC_SYNONYM 110
680#define OCI_SFC_DROP_PUBLIC_SYNONYM 111
681#define OCI_SFC_CREATE_PUBLIC_DATABASE_LINK 112
682#define OCI_SFC_DROP_PUBLIC_DATABASE_LINK 113
683#define OCI_SFC_GRANT_ROLE 114
684#define OCI_SFC_REVOKE_ROLE 115
685#define OCI_SFC_EXECUTE_PROCEDURE 116
686#define OCI_SFC_USER_COMMENT 117
687#define OCI_SFC_ENABLE_TRIGGER 118
688#define OCI_SFC_DISABLE_TRIGGER 119
689#define OCI_SFC_ENABLE_ALL_TRIGGERS 120
690#define OCI_SFC_DISABLE_ALL_TRIGGERS 121
691#define OCI_SFC_NETWORK_ERROR 122
692#define OCI_SFC_EXECUTE_TYPE 123
693#define OCI_SFC_READ_DIRECTORY 125
694#define OCI_SFC_WRITE_DIRECTORY 126
695#define OCI_SFC_FLASHBACK 128
696#define OCI_SFC_BECOME_USER 129
697#define OCI_SFC_ALTER_MINING_MODEL 130
698#define OCI_SFC_SELECT_MINING_MODEL 131
699#define OCI_SFC_CREATE_MINING_MODEL 133
700#define OCI_SFC_ALTER_PUBLIC_SYNONYM 134
701#define OCI_SFC_EXECUTE_DIRECTORY 135
702#define OCI_SFC_SQL_LOADER_DIRECT_PATH_LOAD 136
703#define OCI_SFC_DATAPUMP_DIRECT_PATH_UNLOAD 137
704#define OCI_SFC_DATABASE_STARTUP 138
705#define OCI_SFC_DATABASE_SHUTDOWN 139
706#define OCI_SFC_CREATE_SQL_TXLN_PROFILE 140
707#define OCI_SFC_ALTER_SQL_TXLN_PROFILE 141
708#define OCI_SFC_USE_SQL_TXLN_PROFILE 142
709#define OCI_SFC_DROP_SQL_TXLN_PROFILE 143
710#define OCI_SFC_CREATE_MEASURE_FOLDER 144
711#define OCI_SFC_ALTER_MEASURE_FOLDER 145
712#define OCI_SFC_DROP_MEASURE_FOLDER 146
713#define OCI_SFC_CREATE_CUBE_BUILD_PROCESS 147
714#define OCI_SFC_ALTER_CUBE_BUILD_PROCESS 148
715#define OCI_SFC_DROP_CUBE_BUILD_PROCESS 149
716#define OCI_SFC_CREATE_CUBE 150
717#define OCI_SFC_ALTER_CUBE 151
718#define OCI_SFC_DROP_CUBE 152
719#define OCI_SFC_CREATE_CUBE_DIMENSION 153
720#define OCI_SFC_ALTER_CUBE_DIMENSION 154
721#define OCI_SFC_DROP_CUBE_DIMENSION 155
722#define OCI_SFC_CREATE_DIRECTORY 157
723#define OCI_SFC_DROP_DIRECTORY 158
724#define OCI_SFC_CREATE_LIBRARY 159
725#define OCI_SFC_CREATE_JAVA 160
726#define OCI_SFC_ALTER_JAVA 161
727#define OCI_SFC_DROP_JAVA 162
728#define OCI_SFC_CREATE_OPERATOR 163
729#define OCI_SFC_CREATE_INDEXTYPE 164
730#define OCI_SFC_DROP_INDEXTYPE 165
731#define OCI_SFC_ALTER_INDEXTYPE 166
732#define OCI_SFC_DROP_OPERATOR 167
733#define OCI_SFC_ASSOCIATE_STATISTICS 168
734#define OCI_SFC_DISASSOCIATE_STATISTICS 169
735#define OCI_SFC_CALL_METHOD 170
736#define OCI_SFC_CREATE_SUMMARY 171
737#define OCI_SFC_ALTER_SUMMARY 172
738#define OCI_SFC_DROP_SUMMARY 173
739#define OCI_SFC_CREATE_DIMENSION 174
740#define OCI_SFC_ALTER_DIMENSION 175
741#define OCI_SFC_DROP_DIMENSION 176
742#define OCI_SFC_CREATE_CONTEXT 177
743#define OCI_SFC_DROP_CONTEXT 178
744#define OCI_SFC_ALTER_OUTLINE 179
745#define OCI_SFC_CREATE_OUTLINE 180
746#define OCI_SFC_DROP_OUTLINE 181
747#define OCI_SFC_UPDATE_INDEXES 182
748#define OCI_SFC_ALTER_OPERATOR 183
749#define OCI_SFC_CREATE_SPFILE 187
750#define OCI_SFC_CREATE_PFILE 188
751#define OCI_SFC_MERGE 189
752#define OCI_SFC_PASSWORD_CHANGE 190
753#define OCI_SFC_ALTER_SYNONYM 192
754#define OCI_SFC_ALTER_DISKGROUP 193
755#define OCI_SFC_CREATE_DISKGROUP 194
756#define OCI_SFC_DROP_DISKGROUP 195
757#define OCI_SFC_PURGE_RECYCLEBIN 197
758#define OCI_SFC_PURGE_DBA_RECYCLEBIN 198
759#define OCI_SFC_PURGE_TABLESPACE 199
760#define OCI_SFC_PURGE_TABLE 200
761#define OCI_SFC_PURGE_INDEX 201
762#define OCI_SFC_UNDROP_OBJECT 202
763#define OCI_SFC_DROP_DATABASE 203
764#define OCI_SFC_FLASHBACK_DATABASE 204
765#define OCI_SFC_FLASHBACK_TABLE 205
766#define OCI_SFC_CREATE_RESTORE_POINT 206
767#define OCI_SFC_DROP_RESTORE_POINT 207
768#define OCI_SFC_PROXY_AUTHENTICATION_ONLY 208
769#define OCI_SFC_DECLARE_REWRITE_EQUIVALENCE 209
770#define OCI_SFC_ALTER_REWRITE_EQUIVALENCE 210
771#define OCI_SFC_DROP_REWRITE_EQUIVALENCE 211
772#define OCI_SFC_CREATE_EDITION 212
773#define OCI_SFC_ALTER_EDITION 213
774#define OCI_SFC_DROP_EDITION 214
775#define OCI_SFC_DROP_ASSEMBLY 215
776#define OCI_SFC_CREATE_ASSEMBLY 216
777#define OCI_SFC_ALTER_ASSEMBLY 217
778#define OCI_SFC_CREATE_FLASHBACK_ARCHIVE 218
779#define OCI_SFC_ALTER_FLASHBACK_ARCHIVE 219
780#define OCI_SFC_DROP_FLASHBACK_ARCHIVE 220
781#define OCI_SFC_DEBUG_CONNECT 221
782#define OCI_SFC_DEBUG_PROCEDURE 223
783#define OCI_SFC_ALTER_DATABASE_LINK 225
784#define OCI_SFC_CREATE_PLUGGABLE_DATABASE 226
785#define OCI_SFC_ALTER_PLUGGABLE_DATABASE 227
786#define OCI_SFC_DROP_PLUGGABLE_DATABASE 228
787#define OCI_SFC_CREATE_AUDIT_POLICY 229
788#define OCI_SFC_ALTER_AUDIT_POLICY 230
789#define OCI_SFC_DROP_AUDIT_POLICY 231
790#define OCI_SFC_CODE_BASED_GRANT 232
791#define OCI_SFC_CODE_BASED_REVOKE 233
792#define OCI_SFC_CREATE_LOCKDOWN_PROFILE 234
793#define OCI_SFC_DROP_LOCKDOWN_PROFILE 235
794#define OCI_SFC_ALTER_LOCKDOWN_PROFILE 236
795#define OCI_SFC_TRANSLATE_SQL 237
796#define OCI_SFC_ADMINISTER_KEY_MANAGEMENT 238
797#define OCI_SFC_CREATE_MATERIALIZED_ZONEMAP 239
798#define OCI_SFC_ALTER_MATERIALIZED_ZONEMAP 240
799#define OCI_SFC_DROP_MATERIALIZED_ZONEMAP 241
800#define OCI_SFC_DROP_MINING_MODEL 242
801#define OCI_SFC_CREATE_ATTRIBUTE_DIMENSION 243
802#define OCI_SFC_ALTER_ATTRIBUTE_DIMENSION 244
803#define OCI_SFC_DROP_ATTRIBUTE_DIMENSION 245
804#define OCI_SFC_CREATE_HIERARCHY 246
805#define OCI_SFC_ALTER_HIERARCHY 247
806#define OCI_SFC_DROP_HIERARCHY 248
807#define OCI_SFC_CREATE_ANALYTIC_VIEW 249
808#define OCI_SFC_ALTER_ANALYTIC_VIEW 250
809#define OCI_SFC_DROP_ANALYTIC_VIEW 251
810#define OCI_SFC_CREATE_LANGUAGE 270
811#define OCI_SFC_DROP_LANGUAGE 271
812#define OCI_SFC_ALTER_PUBLIC_DATABASE_LINK 305
813
814/* size constants */
815
816#define OCI_SIZE_FORMAT 64
817#define OCI_SIZE_BUFFER 512
818#define OCI_SIZE_LARGE_BUFFER ((64*1024)-1)
819#define OCI_SIZE_LONG ((64*1024)-1)
820#define OCI_SIZE_DATE 45
821#define OCI_SIZE_TIMESTAMP 54
822#define OCI_SIZE_FORMAT_TODATE 14
823#define OCI_SIZE_NULL 4
824#define OCI_SIZE_PRECISION 10
825#define OCI_SIZE_ROWID 23 /* deprecated */
826#define OCI_SIZE_DIRECTORY 30
827#define OCI_SIZE_FILENAME 255
828#define OCI_SIZE_FORMAT_NUMS 40
829#define OCI_SIZE_FORMAT_NUML 65
830#define OCI_SIZE_OBJ_NAME 128
831
832#define OCI_HASH_DEFAULT_SIZE 256
833
834/* string constants */
835
836#define OCILIB_DRIVER_NAME OTEXT("OCILIB")
837#define OCI_STRING_NULL OTEXT("NULL")
838#define OCI_STRING_EMPTY OTEXT("")
839#define OCI_STRING_FORMAT_DATE OTEXT("YYYY-MM-DD")
840#define OCI_STRING_FORMAT_TIME OTEXT("HH24:MI:SS")
841#define OCI_STRING_FORMAT_DATETIME OTEXT("YYYY-MM-DD HH24:MI:SS")
842#define OCI_STRING_FORMAT_TIMESTAMP OTEXT("YYYY-MM-DD HH24:MI:SS.FF")
843#define OCI_STRING_FORMAT_TIMESTAMP_TZ OTEXT("YYYY-MM-DD HH24:MI:SS.FF TZR")
844#define OCI_STRING_DEFAULT_PREC 3
845#define OCI_STRING_FORMAT_NUM \
846 OTEXT("FM99999999999999999999999999999999999990.999999999999999999999999")
847#define OCI_STRING_FORMAT_NUM_BDOUBLE OTEXT("%lf")
848#define OCI_STRING_FORMAT_NUM_BFLOAT OTEXT("%f")
849#define OCI_STRING_FORMAT_NUM_SHORT OTEXT("%hd")
850#define OCI_STRING_FORMAT_NUM_INT OTEXT("%d")
851#define OCI_STRING_TRUE OTEXT("TRUE")
852#define OCI_STRING_FALSE OTEXT("FALSE")
853#define OCI_STRING_TRUE_SIZE 4
854#define OCI_STRING_FALSE_SIZE 5
855#define OCI_STRING_NULL_SIZE 4
856
857#ifdef _WINDOWS
858#define OCI_CHAR_SLASH '\\'
859#else
860 #define OCI_CHAR_SLASH '/'
861#endif
862
863#define OCI_STRING_FORMAT_NUM_BIN OCI_STRING_FORMAT_NUM_BDOUBLE
864
881#define VAR_OCILIB_WORKAROUND_UTF16_COLUMN_NAME "OCILIB_WORKAROUND_UTF16_COLUMN_NAME"
882
891#endif /* OCILIB_OCILIBC_DEFINES_H_INCLUDED */