OCILIB (C and C++ Driver for Oracle)
4.7.5
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
|
OcilibCApiStatementControl
Large Objects (LOBs) were introduced with Oracle 8i to replace LONGs
Oracle OCI supplies a set APIs to manipulate this data type.
OCILIB encapsulates this API by supplying:
OCILIB currently supports 3 types of Lobs :
OCI_Lob objects can be :
Oracle 10g extended lobs by increasing maximum size from 4Go to 128 To.
OCILIB, with version 2.1.0, supports now this new limit. For handling sizes and offsets up to 128 To, 64 bit integers are requested.
So, A new scalar integer type has been introduced: big_uint (elderly lobsize_t). This type can be a 32 bits or 64 bits integer depending on :
big_uint will be a 64 bits integer :
Functions | |
OCI_SYM_PUBLIC OCI_Lob *OCI_API | OCI_LobCreate (OCI_Connection *con, unsigned int type) |
Create a local temporary Lob instance. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobFree (OCI_Lob *lob) |
Free a local temporary lob. | |
OCI_SYM_PUBLIC OCI_Lob **OCI_API | OCI_LobArrayCreate (OCI_Connection *con, unsigned int type, unsigned int nbelem) |
Create an array of lob object. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobArrayFree (OCI_Lob **lobs) |
Free an array of lob objects. | |
OCI_SYM_PUBLIC unsigned int OCI_API | OCI_LobGetType (OCI_Lob *lob) |
Return the type of the given Lob object. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobSeek (OCI_Lob *lob, big_uint offset, unsigned int mode) |
Perform a seek operation on the OCI_lob content buffer. | |
OCI_SYM_PUBLIC big_uint OCI_API | OCI_LobGetOffset (OCI_Lob *lob) |
Return the current position in the Lob content buffer. | |
OCI_SYM_PUBLIC unsigned int OCI_API | OCI_LobRead (OCI_Lob *lob, void *buffer, unsigned int len) |
[OBSOLETE] Read a portion of a lob into the given buffer | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobRead2 (OCI_Lob *lob, void *buffer, unsigned int *char_count, unsigned int *byte_count) |
Read a portion of a lob into the given buffer. | |
OCI_SYM_PUBLIC unsigned int OCI_API | OCI_LobWrite (OCI_Lob *lob, void *buffer, unsigned int len) |
[OBSOLETE] Write a buffer into a LOB | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobWrite2 (OCI_Lob *lob, void *buffer, unsigned int *char_count, unsigned int *byte_count) |
Write a buffer into a LOB. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobTruncate (OCI_Lob *lob, big_uint size) |
Truncate the given lob to a shorter length. | |
OCI_SYM_PUBLIC big_uint OCI_API | OCI_LobGetLength (OCI_Lob *lob) |
Return the actual length of a lob. | |
OCI_SYM_PUBLIC unsigned int OCI_API | OCI_LobGetChunkSize (OCI_Lob *lob) |
Returns the chunk size of a LOB. | |
OCI_SYM_PUBLIC big_uint OCI_API | OCI_LobErase (OCI_Lob *lob, big_uint offset, big_uint len) |
Erase a portion of the lob at a given position. | |
OCI_SYM_PUBLIC unsigned int OCI_API | OCI_LobAppend (OCI_Lob *lob, void *buffer, unsigned int len) |
Append a buffer at the end of a LOB. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobAppend2 (OCI_Lob *lob, void *buffer, unsigned int *char_count, unsigned int *byte_count) |
Append a buffer at the end of a LOB. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobAppendLob (OCI_Lob *lob, OCI_Lob *lob_src) |
Append a source LOB at the end of a destination LOB. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobIsTemporary (OCI_Lob *lob) |
Check if the given lob is a temporary lob. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobCopy (OCI_Lob *lob, OCI_Lob *lob_src, big_uint offset_dst, big_uint offset_src, big_uint count) |
Copy a portion of a source LOB into a destination LOB. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobCopyFromFile (OCI_Lob *lob, OCI_File *file, big_uint offset_dst, big_uint offset_src, big_uint count) |
Copy a portion of a source FILE into a destination LOB. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobOpen (OCI_Lob *lob, unsigned int mode) |
Open explicitly a Lob. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobClose (OCI_Lob *lob) |
Close explicitly a Lob. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobIsEqual (OCI_Lob *lob, OCI_Lob *lob2) |
Compare two lob handles for equality. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobAssign (OCI_Lob *lob, OCI_Lob *lob_src) |
Assign a lob to another one. | |
OCI_SYM_PUBLIC big_uint OCI_API | OCI_LobGetMaxSize (OCI_Lob *lob) |
Return the maximum size that the lob can contain. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobFlush (OCI_Lob *lob) |
Flush Lob content to the server. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobEnableBuffering (OCI_Lob *lob, boolean value) |
Enable / disable buffering mode on the given lob handle. | |
OCI_SYM_PUBLIC OCI_Connection *OCI_API | OCI_LobGetConnection (OCI_Lob *lob) |
Retrieve connection handle from the lob handle. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_LobIsRemote (OCI_Lob *lob) |
Indicates if the given lob belongs to a local or remote database table. | |
OCI_SYM_PUBLIC OCI_Lob *OCI_API OCI_LobCreate | ( | OCI_Connection * | con, |
unsigned int | type | ||
) |
#include <api.h>
Create a local temporary Lob instance.
con | - Connection handle |
type | - Lob type |
Supported lob types :
Referenced by ocilib::Lob< T, U >::Lob().
OCI_SYM_PUBLIC boolean OCI_API OCI_LobFree | ( | OCI_Lob * | lob | ) |
#include <api.h>
Free a local temporary lob.
lob | - Lob handle |
OCI_SYM_PUBLIC OCI_Lob **OCI_API OCI_LobArrayCreate | ( | OCI_Connection * | con, |
unsigned int | type, | ||
unsigned int | nbelem | ||
) |
#include <api.h>
Create an array of lob object.
con | - Connection handle |
type | - Lob type |
nbelem | - number of elements in the array |
OCI_SYM_PUBLIC boolean OCI_API OCI_LobArrayFree | ( | OCI_Lob ** | lobs | ) |
#include <api.h>
Free an array of lob objects.
lobs | - Array of lob objects |
OCI_SYM_PUBLIC unsigned int OCI_API OCI_LobGetType | ( | OCI_Lob * | lob | ) |
#include <api.h>
Return the type of the given Lob object.
lob | - Lob handle |
Referenced by ocilib::Lob< T, U >::GetType().
OCI_SYM_PUBLIC boolean OCI_API OCI_LobSeek | ( | OCI_Lob * | lob, |
big_uint | offset, | ||
unsigned int | mode | ||
) |
#include <api.h>
Perform a seek operation on the OCI_lob content buffer.
lob | - Lob handle |
offset | - Offset from current position (bytes or characters) |
mode | - Seek mode |
Parameter 'mode' can be one of the following value :
Referenced by ocilib::Lob< T, U >::Seek().
OCI_SYM_PUBLIC big_uint OCI_API OCI_LobGetOffset | ( | OCI_Lob * | lob | ) |
#include <api.h>
Return the current position in the Lob content buffer.
lob | - Lob handle |
Referenced by ocilib::Lob< T, U >::GetOffset().
OCI_SYM_PUBLIC unsigned int OCI_API OCI_LobRead | ( | OCI_Lob * | lob, |
void * | buffer, | ||
unsigned int | len | ||
) |
#include <api.h>
[OBSOLETE] Read a portion of a lob into the given buffer
lob | - Lob handle |
buffer | - Pointer to a buffer |
len | - Length of the buffer (in bytes or characters) |
OCI_SYM_PUBLIC boolean OCI_API OCI_LobRead2 | ( | OCI_Lob * | lob, |
void * | buffer, | ||
unsigned int * | char_count, | ||
unsigned int * | byte_count | ||
) |
#include <api.h>
Read a portion of a lob into the given buffer.
lob | - Lob handle |
buffer | - Pointer to a buffer |
char_count | - [in/out] Pointer to maximum number of characters |
byte_count | - [in/out] Pointer to maximum number of bytes |
OCI_SYM_PUBLIC unsigned int OCI_API OCI_LobWrite | ( | OCI_Lob * | lob, |
void * | buffer, | ||
unsigned int | len | ||
) |
#include <api.h>
[OBSOLETE] Write a buffer into a LOB
lob | - Lob handle |
buffer | - Pointer to a buffer |
len | - Length of the buffer (in bytes or characters) |
OCI_SYM_PUBLIC boolean OCI_API OCI_LobWrite2 | ( | OCI_Lob * | lob, |
void * | buffer, | ||
unsigned int * | char_count, | ||
unsigned int * | byte_count | ||
) |
#include <api.h>
Write a buffer into a LOB.
lob | - Lob handle |
buffer | - Pointer to a buffer |
char_count | - [in/out] Pointer to maximum number of characters |
byte_count | - [in/out] Pointer to maximum number of bytes |
Referenced by ocilib::Lob< T, U >::Write().
OCI_SYM_PUBLIC boolean OCI_API OCI_LobTruncate | ( | OCI_Lob * | lob, |
big_uint | size | ||
) |
#include <api.h>
Truncate the given lob to a shorter length.
lob | - Lob handle |
size | - New length (in bytes or characters) |
Referenced by ocilib::Lob< T, U >::Truncate().
OCI_SYM_PUBLIC big_uint OCI_API OCI_LobGetLength | ( | OCI_Lob * | lob | ) |
#include <api.h>
Return the actual length of a lob.
lob | - Lob handle |
Referenced by ocilib::Lob< T, U >::GetLength().
OCI_SYM_PUBLIC unsigned int OCI_API OCI_LobGetChunkSize | ( | OCI_Lob * | lob | ) |
#include <api.h>
Returns the chunk size of a LOB.
lob | - Lob handle |
Referenced by ocilib::Lob< T, U >::GetChunkSize().
OCI_SYM_PUBLIC big_uint OCI_API OCI_LobErase | ( | OCI_Lob * | lob, |
big_uint | offset, | ||
big_uint | len | ||
) |
#include <api.h>
Erase a portion of the lob at a given position.
lob | - Lob handle |
offset | - Absolute position in source lob |
len | - Number of bytes or characters to erase |
Referenced by ocilib::Lob< T, U >::Erase().
OCI_SYM_PUBLIC unsigned int OCI_API OCI_LobAppend | ( | OCI_Lob * | lob, |
void * | buffer, | ||
unsigned int | len | ||
) |
#include <api.h>
Append a buffer at the end of a LOB.
lob | - Lob handle |
buffer | - Pointer to a buffer |
len | - Length of the buffer (in bytes or characters) |
Referenced by ocilib::Lob< T, U >::Append().
OCI_SYM_PUBLIC boolean OCI_API OCI_LobAppend2 | ( | OCI_Lob * | lob, |
void * | buffer, | ||
unsigned int * | char_count, | ||
unsigned int * | byte_count | ||
) |
#include <api.h>
Append a buffer at the end of a LOB.
lob | - Lob handle |
buffer | - Pointer to a buffer |
char_count | - [in/out] Pointer to maximum number of characters |
byte_count | - [in/out] Pointer to maximum number of bytes |
#include <api.h>
Append a source LOB at the end of a destination LOB.
lob | - Destination Lob handle |
lob_src | - Source Lob handle |
Referenced by ocilib::Lob< T, U >::Append().
OCI_SYM_PUBLIC boolean OCI_API OCI_LobIsTemporary | ( | OCI_Lob * | lob | ) |
#include <api.h>
Check if the given lob is a temporary lob.
lob | - Lob handle |
Referenced by ocilib::Lob< T, U >::IsTemporary().
OCI_SYM_PUBLIC boolean OCI_API OCI_LobCopy | ( | OCI_Lob * | lob, |
OCI_Lob * | lob_src, | ||
big_uint | offset_dst, | ||
big_uint | offset_src, | ||
big_uint | count | ||
) |
#include <api.h>
Copy a portion of a source LOB into a destination LOB.
lob | - Destination Lob handle |
lob_src | - Source Lob handle |
offset_dst | - Absolute position in destination lob |
offset_src | - Absolute position in source lob |
count | - Number of bytes or character to copy |
Referenced by ocilib::Lob< T, U >::Copy().
OCI_SYM_PUBLIC boolean OCI_API OCI_LobCopyFromFile | ( | OCI_Lob * | lob, |
OCI_File * | file, | ||
big_uint | offset_dst, | ||
big_uint | offset_src, | ||
big_uint | count | ||
) |
#include <api.h>
Copy a portion of a source FILE into a destination LOB.
lob | - Destination Lob handle |
file | - Source File handle |
offset_dst | - Absolute position in destination lob |
offset_src | - Absolute position in source file |
count | - Number of bytes to copy |
OCI_SYM_PUBLIC boolean OCI_API OCI_LobOpen | ( | OCI_Lob * | lob, |
unsigned int | mode | ||
) |
#include <api.h>
Open explicitly a Lob.
lob | - Lob handle |
mode | - open mode |
Possible values for mode are :
Referenced by ocilib::Lob< T, U >::Open().
OCI_SYM_PUBLIC boolean OCI_API OCI_LobClose | ( | OCI_Lob * | lob | ) |
#include <api.h>
Close explicitly a Lob.
lob | - Lob handle |
Referenced by ocilib::Lob< T, U >::Close().
#include <api.h>
Compare two lob handles for equality.
lob | - Lob handle |
lob2 | - Lob2 handle |
#include <api.h>
Assign a lob to another one.
lob | - Destination Lob handle |
lob_src | - Source Lob handle |
Referenced by ocilib::Lob< T, U >::Clone().
OCI_SYM_PUBLIC big_uint OCI_API OCI_LobGetMaxSize | ( | OCI_Lob * | lob | ) |
#include <api.h>
Return the maximum size that the lob can contain.
lob | - Lob handle |
Referenced by ocilib::Lob< T, U >::GetMaxSize().
OCI_SYM_PUBLIC boolean OCI_API OCI_LobFlush | ( | OCI_Lob * | lob | ) |
#include <api.h>
Flush Lob content to the server.
lob | - Lob handle |
Referenced by ocilib::Lob< T, U >::Flush().
OCI_SYM_PUBLIC boolean OCI_API OCI_LobEnableBuffering | ( | OCI_Lob * | lob, |
boolean | value | ||
) |
#include <api.h>
Enable / disable buffering mode on the given lob handle.
lob | - Lob handle |
value | - Enable/disable buffering mode |
Referenced by ocilib::Lob< T, U >::EnableBuffering().
OCI_SYM_PUBLIC OCI_Connection *OCI_API OCI_LobGetConnection | ( | OCI_Lob * | lob | ) |
#include <api.h>
Retrieve connection handle from the lob handle.
lob | - lob handle |
Referenced by ocilib::Lob< T, U >::GetConnection().
OCI_SYM_PUBLIC boolean OCI_API OCI_LobIsRemote | ( | OCI_Lob * | lob | ) |
#include <api.h>
Indicates if the given lob belongs to a local or remote database table.
lob | - lob handle |
Referenced by ocilib::Lob< T, U >::IsRemote().