OCILIB (C and C++ Driver for Oracle)  4.7.6
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
types.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_TYPES_H_INCLUDED
35 #define OCILIB_OCILIBC_TYPES_H_INCLUDED
36 
37 #include "ocilibc/defines.h"
38 
95 typedef struct OCI_Environment OCI_Environment;
96 
107 typedef struct OCI_Pool OCI_Pool;
108 
124 typedef struct OCI_Connection OCI_Connection;
125 
136 typedef struct OCI_Statement OCI_Statement;
137 
148 typedef struct OCI_Bind OCI_Bind;
149 
163 typedef struct OCI_Resultset OCI_Resultset;
164 
175 typedef struct OCI_Column OCI_Column;
176 
198 typedef struct OCI_Lob OCI_Lob;
199 
223 typedef struct OCI_File OCI_File;
224 
238 typedef struct OCI_Transaction OCI_Transaction;
239 
260 typedef struct OCI_Long OCI_Long;
261 
269 typedef struct OCI_Number OCI_Number;
270 
279 typedef struct OCI_Date OCI_Date;
280 
289 typedef struct OCI_Timestamp OCI_Timestamp;
290 
299 typedef struct OCI_Interval OCI_Interval;
300 
309 typedef struct OCI_Object OCI_Object;
310 
319 typedef struct OCI_Coll OCI_Coll;
320 
329 typedef struct OCI_Elem OCI_Elem;
330 
338 typedef struct OCI_Iter OCI_Iter;
339 
356 typedef struct OCI_Ref OCI_Ref;
357 
366 typedef struct OCI_TypeInfo OCI_TypeInfo;
367 
376 typedef struct OCI_HashTable OCI_HashTable;
377 
390 typedef struct OCI_Error OCI_Error;
391 
400 typedef struct OCI_Mutex OCI_Mutex;
401 
410 typedef struct OCI_Thread OCI_Thread;
411 
420 typedef struct OCI_DirPath OCI_DirPath;
421 
430 typedef struct OCI_Subscription OCI_Subscription;
431 
440 typedef struct OCI_Event OCI_Event;
441 
450 typedef struct OCI_Msg OCI_Msg;
451 
460 typedef struct OCI_Agent OCI_Agent;
461 
470 typedef struct OCI_Dequeue OCI_Dequeue;
471 
480 typedef struct OCI_Enqueue OCI_Enqueue;
481 
492 typedef void (*POCI_ERROR)
493 (
494  OCI_Error *err
495 );
496 
508 typedef void (*POCI_THREAD)
509 (
510  OCI_Thread *thread,
511  void * arg
512 );
513 
524 typedef void (*POCI_THREADKEYDEST)
525 (
526  void *data
527 );
528 
539 typedef void (*POCI_NOTIFY)
540 (
541  OCI_Event *event
542 );
543 
554 typedef void (*POCI_NOTIFY_AQ)
555 (
556  OCI_Dequeue *dequeue
557 );
558 
590 typedef unsigned int (*POCI_TAF_HANDLER)
591 (
592  OCI_Connection *con,
593  unsigned int type,
594  unsigned int event
595 );
596 
628 typedef void (*POCI_HA_HANDLER)
629 (
630  OCI_Connection *con,
631  unsigned int source,
632  unsigned int event,
633  OCI_Timestamp * time
634 );
635 
636 /* public structures */
637 
646 typedef struct OCI_XID
647 {
648  long formatID;
649  long gtrid_length;
650  long bqual_length;
651  char data[128];
653 
665 typedef union OCI_Variant
666 {
667  /* integers */
668  int num;
669 
670  /* raw data */
671  unsigned char *p_bytes;
672 
673  /* pointer to c natives types */
674  void * p_void;
675  int * p_int;
676  float * p_float;
677  double *p_double;
678  otext * p_text;
679 
680  /* ocilib object types */
681  OCI_Date * p_date;
682  OCI_Interval * p_interval;
683  OCI_Timestamp *p_timestamp;
684  OCI_Long * p_long;
685  OCI_Lob * p_lob;
686  OCI_File * p_file;
687  OCI_Statement *p_stmt;
688  OCI_Column * p_col;
689  OCI_Object * p_obj;
690  OCI_Coll * p_coll;
691  OCI_Iter * p_iter;
692  OCI_Elem * p_elem;
694 
705 typedef struct OCI_HashValue
706 {
707  OCI_Variant value;
708  struct OCI_HashValue *next;
710 
719 typedef struct OCI_HashEntry
720 {
721  otext * key;
722  struct OCI_HashValue *values;
723  struct OCI_HashEntry *next;
725 
734 #endif /* OCILIB_OCILIBC_TYPES_H_INCLUDED */
struct OCI_Pool OCI_Pool
Pool object (session or connection)
Definition: types.h:107
struct OCI_Thread OCI_Thread
OCILIB encapsulation of OCI Threads.
Definition: types.h:410
struct OCI_HashTable OCI_HashTable
OCILIB implementation of hash tables.
Definition: types.h:376
struct OCI_Enqueue OCI_Enqueue
OCILIB encapsulation of A/Q enqueuing operations.
Definition: types.h:480
struct OCI_Ref OCI_Ref
Oracle REF type representation.
Definition: types.h:356
struct OCI_Elem OCI_Elem
Oracle Collection item representation.
Definition: types.h:329
struct OCI_Dequeue OCI_Dequeue
OCILIB encapsulation of A/Q dequeuing operations.
Definition: types.h:470
struct OCI_Connection OCI_Connection
Oracle physical connection.
Definition: types.h:124
struct OCI_Object OCI_Object
Oracle Named types representation.
Definition: types.h:309
void(* POCI_THREAD)(OCI_Thread *thread, void *arg)
Thread procedure prototype.
Definition: types.h:509
struct OCI_Statement OCI_Statement
Oracle SQL or PL/SQL statement.
Definition: types.h:136
struct OCI_HashEntry OCI_HashEntry
Hash table entry.
void(* POCI_NOTIFY_AQ)(OCI_Dequeue *dequeue)
AQ notification callback prototype.
Definition: types.h:555
struct OCI_Timestamp OCI_Timestamp
Oracle internal timestamp representation.
Definition: types.h:289
struct OCI_Environment OCI_Environment
Environment object.
Definition: types.h:95
struct OCI_Date OCI_Date
Oracle internal date representation.
Definition: types.h:279
struct OCI_XID OCI_XID
Global transaction identifier.
struct OCI_Coll OCI_Coll
Oracle Collections (VARRAYs and Nested Tables) representation.
Definition: types.h:319
unsigned int(* POCI_TAF_HANDLER)(OCI_Connection *con, unsigned int type, unsigned int event)
Failover Notification User callback prototype.
Definition: types.h:591
void(* POCI_NOTIFY)(OCI_Event *event)
Database Change Notification User callback prototype.
Definition: types.h:540
struct OCI_DirPath OCI_DirPath
OCILIB encapsulation of OCI Direct Path handle.
Definition: types.h:420
struct OCI_Bind OCI_Bind
Internal bind representation.
Definition: types.h:148
struct OCI_Error OCI_Error
Encapsulates an Oracle or OCILIB exception.
Definition: types.h:390
struct OCI_Lob OCI_Lob
Oracle Internal Large objects:
Definition: types.h:198
struct OCI_Long OCI_Long
Oracle Long data type.
Definition: types.h:260
void(* POCI_HA_HANDLER)(OCI_Connection *con, unsigned int source, unsigned int event, OCI_Timestamp *time)
HA (High Availability) events Notification User callback prototype.
Definition: types.h:629
struct OCI_HashValue OCI_HashValue
Hash table entry value.
struct OCI_Column OCI_Column
Oracle SQL Column and Type member representation.
Definition: types.h:175
struct OCI_Interval OCI_Interval
Oracle internal interval representation.
Definition: types.h:299
struct OCI_Transaction OCI_Transaction
Oracle Transaction.
Definition: types.h:238
union OCI_Variant OCI_Variant
Internal Variant type based on union C type.
struct OCI_Msg OCI_Msg
OCILIB encapsulation of A/Q message.
Definition: types.h:450
void(* POCI_ERROR)(OCI_Error *err)
Error procedure prototype.
Definition: types.h:493
struct OCI_Number OCI_Number
Oracle NUMBER representation.
Definition: types.h:269
struct OCI_TypeInfo OCI_TypeInfo
Type info metadata handle.
Definition: types.h:366
struct OCI_File OCI_File
Oracle External Large objects:
Definition: types.h:223
void(* POCI_THREADKEYDEST)(void *data)
Thread key destructor prototype.
Definition: types.h:525
struct OCI_Event OCI_Event
OCILIB encapsulation of Oracle DCN event.
Definition: types.h:440
struct OCI_Mutex OCI_Mutex
OCILIB encapsulation of OCI mutexes.
Definition: types.h:400
struct OCI_Resultset OCI_Resultset
Collection of output columns from a select statement.
Definition: types.h:163
struct OCI_Subscription OCI_Subscription
OCILIB encapsulation of Oracle DCN notification.
Definition: types.h:430
struct OCI_Iter OCI_Iter
Oracle Collection iterator representation.
Definition: types.h:338
struct OCI_Agent OCI_Agent
OCILIB encapsulation of A/Q Agent.
Definition: types.h:460