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
Data types

Detailed Description

OcilibCApiSupportedCharsets

OCILIB implements:

Supported Oracle data types

Here is a summary of the supported data types:

OCILIB library objects

The public OCILIB library interface implements encapsulation for representing database objects (such as connections, statements ...) through opaque structures (pointers to structures whose definition is kept private)

Instead of directly manipulating the structures and their members, the library has functions to access the underlying members.

It's designed to make the user code as more independent as possible of the library details.

Typedefs

typedef long long big_int
 big_int is a C scalar integer (32 or 64 bits) depending on compiler support for 64bits integers. big_uint is an unsigned big_int
 
typedef struct OCI_Environment OCI_Environment
 Environment object.
 
typedef struct OCI_Pool OCI_Pool
 Pool object (session or connection)
 
typedef struct OCI_Connection OCI_Connection
 Oracle physical connection.
 
typedef struct OCI_Statement OCI_Statement
 Oracle SQL or PL/SQL statement.
 
typedef struct OCI_Bind OCI_Bind
 Internal bind representation.
 
typedef struct OCI_Resultset OCI_Resultset
 Collection of output columns from a select statement.
 
typedef struct OCI_Column OCI_Column
 Oracle SQL Column and Type member representation.
 
typedef struct OCI_Lob OCI_Lob
 Oracle Internal Large objects:
 
typedef struct OCI_File OCI_File
 Oracle External Large objects:
 
typedef struct OCI_Transaction OCI_Transaction
 Oracle Transaction.
 
typedef struct OCI_Long OCI_Long
 Oracle Long data type.
 
typedef struct OCI_Number OCI_Number
 Oracle NUMBER representation.
 
typedef struct OCI_Date OCI_Date
 Oracle internal date representation.
 
typedef struct OCI_Timestamp OCI_Timestamp
 Oracle internal timestamp representation.
 
typedef struct OCI_Interval OCI_Interval
 Oracle internal interval representation.
 
typedef struct OCI_Object OCI_Object
 Oracle Named types representation.
 
typedef struct OCI_Coll OCI_Coll
 Oracle Collections (VARRAYs and Nested Tables) representation.
 
typedef struct OCI_Elem OCI_Elem
 Oracle Collection item representation.
 
typedef struct OCI_Iter OCI_Iter
 Oracle Collection iterator representation.
 
typedef struct OCI_Ref OCI_Ref
 Oracle REF type representation.
 
typedef struct OCI_TypeInfo OCI_TypeInfo
 Type info metadata handle.
 
typedef struct OCI_HashTable OCI_HashTable
 OCILIB implementation of hash tables.
 
typedef struct OCI_Error OCI_Error
 Encapsulates an Oracle or OCILIB exception.
 
typedef struct OCI_Mutex OCI_Mutex
 OCILIB encapsulation of OCI mutexes.
 
typedef struct OCI_Thread OCI_Thread
 OCILIB encapsulation of OCI Threads.
 
typedef struct OCI_DirPath OCI_DirPath
 OCILIB encapsulation of OCI Direct Path handle.
 
typedef struct OCI_Subscription OCI_Subscription
 OCILIB encapsulation of Oracle DCN notification.
 
typedef struct OCI_Event OCI_Event
 OCILIB encapsulation of Oracle DCN event.
 
typedef struct OCI_Msg OCI_Msg
 OCILIB encapsulation of A/Q message.
 
typedef struct OCI_Agent OCI_Agent
 OCILIB encapsulation of A/Q Agent.
 
typedef struct OCI_Dequeue OCI_Dequeue
 OCILIB encapsulation of A/Q dequeuing operations.
 
typedef struct OCI_Enqueue OCI_Enqueue
 OCILIB encapsulation of A/Q enqueuing operations.
 
typedef void(* POCI_ERROR) (OCI_Error *err)
 Error procedure prototype.
 
typedef void(* POCI_THREAD) (OCI_Thread *thread, void *arg)
 Thread procedure prototype.
 
typedef void(* POCI_THREADKEYDEST) (void *data)
 Thread key destructor prototype.
 
typedef void(* POCI_NOTIFY) (OCI_Event *event)
 Database Change Notification User callback prototype.
 
typedef void(* POCI_NOTIFY_AQ) (OCI_Dequeue *dequeue)
 AQ notification callback prototype.
 
typedef unsigned int(* POCI_TAF_HANDLER) (OCI_Connection *con, unsigned int type, unsigned int event)
 Failover Notification User callback prototype.
 
typedef void(* POCI_HA_HANDLER) (OCI_Connection *con, unsigned int source, unsigned int event, OCI_Timestamp *time)
 HA (High Availability) events Notification User callback prototype.
 
typedef struct OCI_XID OCI_XID
 Global transaction identifier.
 
typedef union OCI_Variant OCI_Variant
 Internal Variant type based on union C type.
 
typedef struct OCI_HashValue OCI_HashValue
 Hash table entry value.
 
typedef struct OCI_HashEntry OCI_HashEntry
 Hash table entry.
 

Typedef Documentation

◆ big_int

typedef int big_int

#include <platform.h>

big_int is a C scalar integer (32 or 64 bits) depending on compiler support for 64bits integers. big_uint is an unsigned big_int

Definition at line 281 of file platform.h.

◆ OCI_Environment

#include <types.h>

Environment object.

Represents a runtime OCI executing environment

Definition at line 95 of file types.h.

◆ OCI_Pool

#include <types.h>

Pool object (session or connection)

A pool is a set of pooled objects

Definition at line 107 of file types.h.

◆ OCI_Connection

#include <types.h>

Oracle physical connection.

It holds all information about a connection such as error handling, associated statements, ... Error handling and transactions are embedded within a connection object.

Warning
Multi threaded applications that use multiple connections should use one connection per thread as all statements associated with a connection share the same context.

Definition at line 124 of file types.h.

◆ OCI_Statement

#include <types.h>

Oracle SQL or PL/SQL statement.

A Statement object allows users to prepare, execute SQL orders or PL/SQL blocks

Definition at line 136 of file types.h.

◆ OCI_Bind

#include <types.h>

Internal bind representation.

A bind object is an object that holds all information about an Oracle statement binding operation

Definition at line 148 of file types.h.

◆ OCI_Resultset

#include <types.h>

Collection of output columns from a select statement.

A resultset object is the result of 'select' SQL Statement.

It's a set of data (ordered in columns) that can be fetched row by row to get data returned by the SQL statement

Definition at line 163 of file types.h.

◆ OCI_Column

#include <types.h>

Oracle SQL Column and Type member representation.

A column object represents an output column from a select statement

Definition at line 175 of file types.h.

◆ OCI_Lob

#include <types.h>

Oracle Internal Large objects:

The following internal Larges Objects are supported:

  • BLOBs : Binary large objects
  • CLOBs / NCLOBs : Character large objects

LOBs were introduced by OCI8 to replace Long data types.

It's designed to store really larges objects (buffer, files) inside the database

Oracle encourages programmers to use those objects instead of LONG, LONG RAW, ...

OCILIB supports both LOBs and LONGs

Definition at line 198 of file types.h.

◆ OCI_File

#include <types.h>

Oracle External Large objects:

The following external Larges Objects are supported:

  • BFILEs : Binary files
  • CFILEs : Character files

FILEs were introduced by OCI8 in order to store references to files located outside the database.

Warning
Only Read-only access is allowed on BFILEs

Two way to use FILEs :

  • within statement context (query, binding)
  • without statement context (server files reading) through OCI_File properties functions

Definition at line 223 of file types.h.

◆ OCI_Transaction

#include <types.h>

Oracle Transaction.

A transaction can be:

  • Local: it's implicitly created by OCILIB
  • Global: it's explicitly created by the program

Definition at line 238 of file types.h.

◆ OCI_Long

#include <types.h>

Oracle Long data type.

The following long Objects are supported:

  • LONG RAW : Binary long objects
  • LONG : Character long objects

Those types were used in older versions of Oracle (before Oracle 8i) to store large chunks of data in the database.

It's now depreciated by Oracle that recommends using LOBs

Many databases and applications are still designed to use LONGs that's why OCILIB supports Long Objects and piecewise operations

Definition at line 260 of file types.h.

◆ OCI_Number

#include <types.h>

Oracle NUMBER representation.

Definition at line 269 of file types.h.

◆ OCI_Date

#include <types.h>

Oracle internal date representation.

Definition at line 279 of file types.h.

◆ OCI_Timestamp

#include <types.h>

Oracle internal timestamp representation.

Definition at line 289 of file types.h.

◆ OCI_Interval

#include <types.h>

Oracle internal interval representation.

Definition at line 299 of file types.h.

◆ OCI_Object

#include <types.h>

Oracle Named types representation.

Definition at line 309 of file types.h.

◆ OCI_Coll

#include <types.h>

Oracle Collections (VARRAYs and Nested Tables) representation.

Definition at line 319 of file types.h.

◆ OCI_Elem

#include <types.h>

Oracle Collection item representation.

Definition at line 329 of file types.h.

◆ OCI_Iter

#include <types.h>

Oracle Collection iterator representation.

Definition at line 338 of file types.h.

◆ OCI_Ref

#include <types.h>

Oracle REF type representation.

Definition at line 356 of file types.h.

◆ OCI_TypeInfo

#include <types.h>

Type info metadata handle.

Type info meta data handle.

Definition at line 366 of file types.h.

◆ OCI_HashTable

#include <types.h>

OCILIB implementation of hash tables.

Definition at line 376 of file types.h.

◆ OCI_Error

#include <types.h>

Encapsulates an Oracle or OCILIB exception.

The error object is used to raise internal or oracle errors. When an error occurs, if the application has provided an error handler, an error object is constructed and passed to the handler

Definition at line 390 of file types.h.

◆ OCI_Mutex

#include <types.h>

OCILIB encapsulation of OCI mutexes.

Definition at line 400 of file types.h.

◆ OCI_Thread

#include <types.h>

OCILIB encapsulation of OCI Threads.

Definition at line 410 of file types.h.

◆ OCI_DirPath

#include <types.h>

OCILIB encapsulation of OCI Direct Path handle.

Definition at line 420 of file types.h.

◆ OCI_Subscription

#include <types.h>

OCILIB encapsulation of Oracle DCN notification.

Definition at line 430 of file types.h.

◆ OCI_Event

#include <types.h>

OCILIB encapsulation of Oracle DCN event.

Definition at line 440 of file types.h.

◆ OCI_Msg

#include <types.h>

OCILIB encapsulation of A/Q message.

Definition at line 450 of file types.h.

◆ OCI_Agent

#include <types.h>

OCILIB encapsulation of A/Q Agent.

Definition at line 460 of file types.h.

◆ OCI_Dequeue

#include <types.h>

OCILIB encapsulation of A/Q dequeuing operations.

Definition at line 470 of file types.h.

◆ OCI_Enqueue

#include <types.h>

OCILIB encapsulation of A/Q enqueuing operations.

Definition at line 480 of file types.h.

◆ POCI_ERROR

POCI_ERROR

#include <types.h>

Error procedure prototype.

Parameters
err- Error handle

Definition at line 492 of file types.h.

◆ POCI_THREAD

POCI_THREAD

#include <types.h>

Thread procedure prototype.

Parameters
thread- Thread handle
arg- Pointer passed to OCI_ThreadRun()

Definition at line 508 of file types.h.

◆ POCI_THREADKEYDEST

POCI_THREADKEYDEST

#include <types.h>

Thread key destructor prototype.

Parameters
data- Thread Key current pointer value

Definition at line 524 of file types.h.

◆ POCI_NOTIFY

POCI_NOTIFY

#include <types.h>

Database Change Notification User callback prototype.

Parameters
event- Event handle

Definition at line 539 of file types.h.

◆ POCI_NOTIFY_AQ

POCI_NOTIFY_AQ

#include <types.h>

AQ notification callback prototype.

Parameters
dequeue- dequeue handle

Definition at line 554 of file types.h.

◆ POCI_TAF_HANDLER

POCI_TAF_HANDLER

#include <types.h>

Failover Notification User callback prototype.

Parameters
con- Connection handle related to the event
type- Event type
event- Event code
Note
Possible values for parameter 'type' :
  • OCI_FOT_NONE
  • OCI_FOT_SESSION
  • OCI_FOT_SELECT
Possible values for parameter 'event' :
  • OCI_FOE_END
  • OCI_FOE_ABORT
  • OCI_FOE_REAUTH
  • OCI_FOE_BEGIN
  • OCI_FOE_ERROR
Returns
User callback should return one of the following value :
  • OCI_FOC_OK
  • OCI_FOC_RETRY

Definition at line 590 of file types.h.

◆ POCI_HA_HANDLER

POCI_HA_HANDLER

#include <types.h>

HA (High Availability) events Notification User callback prototype.

Parameters
con- Connection handle related to the event
source- source of the event
event- type of the event
time- Timestamp of the event
Note
Currently, Oracle only send HA down events
Possible values for parameter 'source' :
  • OCI_HES_INSTANCE
  • OCI_HES_DATABASE
  • OCI_HES_NODE
  • OCI_HES_SERVICE
  • OCI_HES_SERVICE_MEMBER
  • OCI_HES_ASM_INSTANCE
  • OCI_HES_PRECONNECT
Possible values for parameter 'event' :
  • OCI_HET_DOWN : HA event type down
  • OCI_HET_UP : HA event type up

Definition at line 628 of file types.h.

◆ OCI_XID

OCI_XID

#include <types.h>

Global transaction identifier.

◆ OCI_Variant

OCI_Variant

#include <types.h>

Internal Variant type based on union C type.

Note
Helpful for generic buffer, it reduces the amount of casts

◆ OCI_HashValue

OCI_HashValue

#include <types.h>

Hash table entry value.

OCILIB implementation of hash tables uses chaining method for dealing with collisions

◆ OCI_HashEntry

OCI_HashEntry

#include <types.h>

Hash table entry.