![]() |
OCILIB (C and C++ Driver for Oracle)
4.9.0
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 of 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 the maximum size from 4 GB to 128 TB.
OCILIB, since version 2.1.0, supports this new limit. For handling sizes and offsets up to 128 TB, 64-bit integers are required.
A scalar integer type has been introduced: big_uint (formerly lobsize_t). This type can be a 32-bit or 64-bit integer depending on:
big_uint will be a 64-bit 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 objects. | |
| 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) |
| Return 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 the connection handle from the LOB handle. | |
| OCI_SYM_PUBLIC boolean OCI_API | OCI_LobIsRemote (OCI_Lob *lob) |
| Indicate 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 objects.
| 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 values:
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>
Return 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 characters 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 | - Lob handle to compare |
#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 the 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>
Indicate if the given LOB belongs to a local or remote database table.
| lob | - Lob handle |
Referenced by ocilib::Lob< T, U >::IsRemote().