OCILIB (C and C++ Driver for Oracle)  4.7.3
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-2021 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_Pool OCI_Pool;
96 
113 
125 
136 typedef struct OCI_Bind OCI_Bind;
137 
152 
163 typedef struct OCI_Column OCI_Column;
164 
186 typedef struct OCI_Lob OCI_Lob;
187 
211 typedef struct OCI_File OCI_File;
212 
227 
248 typedef struct OCI_Long OCI_Long;
249 
257 typedef struct OCI_Number OCI_Number;
258 
267 typedef struct OCI_Date OCI_Date;
268 
278 
287 typedef struct OCI_Interval OCI_Interval;
288 
297 typedef struct OCI_Object OCI_Object;
298 
307 typedef struct OCI_Coll OCI_Coll;
308 
317 typedef struct OCI_Elem OCI_Elem;
318 
326 typedef struct OCI_Iter OCI_Iter;
327 
344 typedef struct OCI_Ref OCI_Ref;
345 
354 typedef struct OCI_TypeInfo OCI_TypeInfo;
355 
365 
378 typedef struct OCI_Error OCI_Error;
379 
388 typedef struct OCI_Mutex OCI_Mutex;
389 
398 typedef struct OCI_Thread OCI_Thread;
399 
408 typedef struct OCI_DirPath OCI_DirPath;
409 
419 
428 typedef struct OCI_Event OCI_Event;
429 
438 typedef struct OCI_Msg OCI_Msg;
439 
448 typedef struct OCI_Agent OCI_Agent;
449 
458 typedef struct OCI_Dequeue OCI_Dequeue;
459 
468 typedef struct OCI_Enqueue OCI_Enqueue;
469 
480 typedef void (*POCI_ERROR)
481 (
482  OCI_Error *err
483 );
484 
496 typedef void (*POCI_THREAD)
497 (
498  OCI_Thread *thread,
499  void * arg
500 );
501 
512 typedef void (*POCI_THREADKEYDEST)
513 (
514  void *data
515 );
516 
527 typedef void (*POCI_NOTIFY)
528 (
529  OCI_Event *event
530 );
531 
542 typedef void (*POCI_NOTIFY_AQ)
543 (
544  OCI_Dequeue *dequeue
545 );
546 
578 typedef unsigned int (*POCI_TAF_HANDLER)
579 (
580  OCI_Connection *con,
581  unsigned int type,
582  unsigned int event
583 );
584 
616 typedef void (*POCI_HA_HANDLER)
617 (
618  OCI_Connection *con,
619  unsigned int source,
620  unsigned int event,
621  OCI_Timestamp * time
622 );
623 
624 /* public structures */
625 
634 typedef struct OCI_XID
635 {
636  long formatID;
637  long gtrid_length;
638  long bqual_length;
639  char data[128];
640 } OCI_XID;
641 
653 typedef union OCI_Variant
654 {
655  /* integers */
656  int num;
657 
658  /* raw data */
659  unsigned char *p_bytes;
660 
661  /* pointer to c natives types */
662  void * p_void;
663  int * p_int;
664  float * p_float;
665  double *p_double;
666  otext * p_text;
667 
668  /* ocilib object types */
669  OCI_Date * p_date;
670  OCI_Interval * p_interval;
671  OCI_Timestamp *p_timestamp;
672  OCI_Long * p_long;
673  OCI_Lob * p_lob;
674  OCI_File * p_file;
675  OCI_Statement *p_stmt;
676  OCI_Column * p_col;
677  OCI_Object * p_obj;
678  OCI_Coll * p_coll;
679  OCI_Iter * p_iter;
680  OCI_Elem * p_elem;
681 } OCI_Variant;
682 
693 typedef struct OCI_HashValue
694 {
695  OCI_Variant value;
696  struct OCI_HashValue *next;
697 } OCI_HashValue;
698 
707 typedef struct OCI_HashEntry
708 {
709  otext * key;
710  struct OCI_HashValue *values;
711  struct OCI_HashEntry *next;
712 } OCI_HashEntry;
713 
722 #endif /* OCILIB_OCILIBC_TYPES_H_INCLUDED */
struct OCI_Mutex OCI_Mutex
OCILIB encapsulation of OCI mutexes.
Definition: types.h:388
struct OCI_Agent OCI_Agent
OCILIB encapsulation of A/Q Agent.
Definition: types.h:448
unsigned int(* POCI_TAF_HANDLER)(OCI_Connection *con, unsigned int type, unsigned int event)
Failover Notification User callback prototype.
Definition: types.h:579
struct OCI_Connection OCI_Connection
Oracle physical connection.
Definition: types.h:112
struct OCI_XID OCI_XID
Global transaction identifier.
struct OCI_Interval OCI_Interval
Oracle internal interval representation.
Definition: types.h:287
struct OCI_Dequeue OCI_Dequeue
OCILIB encapsulation of A/Q dequeuing operations.
Definition: types.h:458
void(* POCI_ERROR)(OCI_Error *err)
Error procedure prototype.
Definition: types.h:481
struct OCI_Statement OCI_Statement
Oracle SQL or PL/SQL statement.
Definition: types.h:124
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:617
struct OCI_Enqueue OCI_Enqueue
OCILIB encapsulation of A/Q enqueuing operations.
Definition: types.h:468
struct OCI_Bind OCI_Bind
Internal bind representation.
Definition: types.h:136
struct OCI_Subscription OCI_Subscription
OCILIB encapsulation of Oracle DCN notification.
Definition: types.h:418
struct OCI_Pool OCI_Pool
Pool object (session or connection)
Definition: types.h:95
struct OCI_Timestamp OCI_Timestamp
Oracle internal timestamp representation.
Definition: types.h:277
struct OCI_HashEntry OCI_HashEntry
Hash table entry.
void(* POCI_THREAD)(OCI_Thread *thread, void *arg)
Thread procedure prototype.
Definition: types.h:497
struct OCI_Msg OCI_Msg
OCILIB encapsulation of A/Q message.
Definition: types.h:438
union OCI_Variant OCI_Variant
Internal Variant type based on union C type.
struct OCI_Ref OCI_Ref
Oracle REF type representation.
Definition: types.h:344
struct OCI_Date OCI_Date
Oracle internal date representation.
Definition: types.h:267
struct OCI_Transaction OCI_Transaction
Oracle Transaction.
Definition: types.h:226
void(* POCI_NOTIFY)(OCI_Event *event)
Database Change Notification User callback prototype.
Definition: types.h:528
struct OCI_Resultset OCI_Resultset
Collection of output columns from a select statement.
Definition: types.h:151
struct OCI_DirPath OCI_DirPath
OCILIB encapsulation of OCI Direct Path handle.
Definition: types.h:408
struct OCI_File OCI_File
Oracle External Large objects:
Definition: types.h:211
struct OCI_Thread OCI_Thread
OCILIB encapsulation of OCI Threads.
Definition: types.h:398
struct OCI_Number OCI_Number
Oracle NUMBER representation.
Definition: types.h:257
void(* POCI_NOTIFY_AQ)(OCI_Dequeue *dequeue)
AQ notification callback prototype.
Definition: types.h:543
void(* POCI_THREADKEYDEST)(void *data)
Thread key destructor prototype.
Definition: types.h:513
struct OCI_HashValue OCI_HashValue
Hash table entry value.
struct OCI_Long OCI_Long
Oracle Long data type.
Definition: types.h:248
struct OCI_TypeInfo OCI_TypeInfo
Type info metadata handle.
Definition: types.h:354
struct OCI_HashTable OCI_HashTable
OCILIB implementation of hash tables.
Definition: types.h:364
struct OCI_Coll OCI_Coll
Oracle Collections (VARRAYs and Nested Tables) representation.
Definition: types.h:307
struct OCI_Elem OCI_Elem
Oracle Collection item representation.
Definition: types.h:317
struct OCI_Object OCI_Object
Oracle Named types representation.
Definition: types.h:297
struct OCI_Column OCI_Column
Oracle SQL Column and Type member representation.
Definition: types.h:163
struct OCI_Iter OCI_Iter
Oracle Collection iterator representation.
Definition: types.h:326
struct OCI_Error OCI_Error
Encapsulates an Oracle or OCILIB exception.
Definition: types.h:378
struct OCI_Event OCI_Event
OCILIB encapsulation of Oracle DCN event.
Definition: types.h:428
struct OCI_Lob OCI_Lob
Oracle Internal Large objects:
Definition: types.h:186