OCILIB (C and C++ Driver for Oracle)
4.7.5
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
|
OcilibCApiThreading
OCILIB (from version 3.2.0) support the OCI direct Path API.
Actual implementation of direct path API does not support the following elements :
All scalar data types (numerics, characters and date/time), including LOBs and LONG types are supported
The direct path load interface allows an application to access the direct path load engine of the Oracle database server to perform the functions of the Oracle SQL*Loader utility. This functionality provides the ability to load data from external files into Oracle database objects, either a table or a partition of a partitioned table. The OCI direct path load interface has the ability to load multiple rows by loading a direct path stream which contains data for multiple rows.
Its recommended to use direct path interface with an Oracle client that is the same version than the database. With version < 10g, it is mandatory regarding that it causes segmentation faults and it's known from Oracle that advices to use the same version for client and server (see metalink KB)
Functions | |
OCI_SYM_PUBLIC OCI_DirPath *OCI_API | OCI_DirPathCreate (OCI_TypeInfo *typinf, const otext *partition, unsigned int nb_cols, unsigned int nb_rows) |
Create a direct path object. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DirPathFree (OCI_DirPath *dp) |
Free an OCI_DirPath handle. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DirPathSetColumn (OCI_DirPath *dp, unsigned int index, const otext *name, unsigned int maxsize, const otext *format) |
Describe a column to load into the given table. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DirPathPrepare (OCI_DirPath *dp) |
Prepares the OCI direct path load interface before any rows can be converted or loaded. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DirPathSetEntry (OCI_DirPath *dp, unsigned int row, unsigned int index, void *value, unsigned size, boolean complete) |
Set the value of the given row/column array entry. | |
OCI_SYM_PUBLIC unsigned int OCI_API | OCI_DirPathConvert (OCI_DirPath *dp) |
Convert provided user data to the direct path stream format. | |
OCI_SYM_PUBLIC unsigned int OCI_API | OCI_DirPathLoad (OCI_DirPath *dp) |
Loads the data converted to direct path stream format. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DirPathReset (OCI_DirPath *dp) |
Reset internal arrays and streams to prepare another load. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DirPathFinish (OCI_DirPath *dp) |
Terminate a direct path operation and commit changes into the database. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DirPathAbort (OCI_DirPath *dp) |
Terminate a direct path operation without committing changes. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DirPathSave (OCI_DirPath *dp) |
Execute a data save-point (server side) | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DirPathFlushRow (OCI_DirPath *dp) |
Flushes a partially loaded row from server. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DirPathSetCurrentRows (OCI_DirPath *dp, unsigned int nb_rows) |
Set the current number of rows to convert and load. | |
OCI_SYM_PUBLIC unsigned int OCI_API | OCI_DirPathGetCurrentRows (OCI_DirPath *dp) |
Return the current number of rows used in the OCILIB internal arrays of rows. | |
OCI_SYM_PUBLIC unsigned int OCI_API | OCI_DirPathGetMaxRows (OCI_DirPath *dp) |
Return the maximum number of rows allocated in the OCI and OCILIB internal arrays of rows. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DirPathSetDateFormat (OCI_DirPath *dp, const otext *format) |
Set the default date format string for input conversion. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DirPathSetParallel (OCI_DirPath *dp, boolean value) |
Set the parallel loading mode. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DirPathSetNoLog (OCI_DirPath *dp, boolean value) |
Set the logging mode for the loading operation. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DirPathSetCacheSize (OCI_DirPath *dp, unsigned int size) |
Set number of elements in the date cache. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DirPathSetBufferSize (OCI_DirPath *dp, unsigned int size) |
Set the size of the internal stream transfer buffer. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_DirPathSetConvertMode (OCI_DirPath *dp, unsigned int mode) |
Set the direct path conversion mode. | |
OCI_SYM_PUBLIC unsigned int OCI_API | OCI_DirPathGetRowCount (OCI_DirPath *dp) |
Return the number of rows successfully loaded into the database so far. | |
OCI_SYM_PUBLIC unsigned int OCI_API | OCI_DirPathGetAffectedRows (OCI_DirPath *dp) |
return the number of rows successfully processed during in the last conversion or loading call | |
OCI_SYM_PUBLIC unsigned int OCI_API | OCI_DirPathGetErrorColumn (OCI_DirPath *dp) |
Return the index of a column which caused an error during data conversion. | |
OCI_SYM_PUBLIC unsigned int OCI_API | OCI_DirPathGetErrorRow (OCI_DirPath *dp) |
Return the index of a row which caused an error during data conversion. | |
OCI_SYM_PUBLIC OCI_DirPath *OCI_API OCI_DirPathCreate | ( | OCI_TypeInfo * | typinf, |
const otext * | partition, | ||
unsigned int | nb_cols, | ||
unsigned int | nb_rows | ||
) |
#include <api.h>
Create a direct path object.
typinf | - Table type info handle |
partition | - Partition name |
nb_cols | - Number of columns to load |
nb_rows | - Maximum of rows to handle per load operation |
Referenced by ocilib::DirectPath::DirectPath().
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathFree | ( | OCI_DirPath * | dp | ) |
#include <api.h>
Free an OCI_DirPath handle.
dp | - Direct path Handle |
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetColumn | ( | OCI_DirPath * | dp, |
unsigned int | index, | ||
const otext * | name, | ||
unsigned int | maxsize, | ||
const otext * | format | ||
) |
#include <api.h>
Describe a column to load into the given table.
dp | - Direct path Handle |
index | - Column index |
name | - Column name |
maxsize | - Maximum input value size for a column entry |
format | - Date or numeric format to use |
Referenced by ocilib::DirectPath::SetColumn().
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathPrepare | ( | OCI_DirPath * | dp | ) |
#include <api.h>
Prepares the OCI direct path load interface before any rows can be converted or loaded.
dp | - Direct path Handle |
Referenced by ocilib::DirectPath::Prepare().
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetEntry | ( | OCI_DirPath * | dp, |
unsigned int | row, | ||
unsigned int | index, | ||
void * | value, | ||
unsigned | size, | ||
boolean | complete | ||
) |
#include <api.h>
Set the value of the given row/column array entry.
dp | - Direct path Handle |
row | - Row index |
index | - Column index |
value | - Value to set |
size | - Size of the input value |
complete | - Is the entry content fully provided ? |
Referenced by ocilib::DirectPath::SetEntry().
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DirPathConvert | ( | OCI_DirPath * | dp | ) |
#include <api.h>
Convert provided user data to the direct path stream format.
dp | - Direct path Handle |
Referenced by ocilib::DirectPath::Convert().
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DirPathLoad | ( | OCI_DirPath * | dp | ) |
#include <api.h>
Loads the data converted to direct path stream format.
dp | - Direct path Handle |
Referenced by ocilib::DirectPath::Load().
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathReset | ( | OCI_DirPath * | dp | ) |
#include <api.h>
Reset internal arrays and streams to prepare another load.
dp | - Direct path Handle |
Referenced by ocilib::DirectPath::Reset().
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathFinish | ( | OCI_DirPath * | dp | ) |
#include <api.h>
Terminate a direct path operation and commit changes into the database.
dp | - Direct path Handle |
Referenced by ocilib::DirectPath::Finish().
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathAbort | ( | OCI_DirPath * | dp | ) |
#include <api.h>
Terminate a direct path operation without committing changes.
dp | - Direct path Handle |
Referenced by ocilib::DirectPath::Abort().
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSave | ( | OCI_DirPath * | dp | ) |
#include <api.h>
Execute a data save-point (server side)
dp | - Direct path Handle |
Referenced by ocilib::DirectPath::Save().
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathFlushRow | ( | OCI_DirPath * | dp | ) |
#include <api.h>
Flushes a partially loaded row from server.
dp | - Direct path Handle |
Referenced by ocilib::DirectPath::FlushRow().
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetCurrentRows | ( | OCI_DirPath * | dp, |
unsigned int | nb_rows | ||
) |
#include <api.h>
Set the current number of rows to convert and load.
dp | - Direct path Handle |
nb_rows | - Number of row to process |
Referenced by ocilib::DirectPath::SetCurrentRows().
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DirPathGetCurrentRows | ( | OCI_DirPath * | dp | ) |
#include <api.h>
Return the current number of rows used in the OCILIB internal arrays of rows.
dp | - Direct path Handle |
Referenced by ocilib::DirectPath::GetCurrentRows().
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DirPathGetMaxRows | ( | OCI_DirPath * | dp | ) |
#include <api.h>
Return the maximum number of rows allocated in the OCI and OCILIB internal arrays of rows.
dp | - Direct path Handle |
Referenced by ocilib::DirectPath::GetMaxRows().
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetDateFormat | ( | OCI_DirPath * | dp, |
const otext * | format | ||
) |
#include <api.h>
Set the default date format string for input conversion.
dp | - Direct path Handle |
format | - date format |
Referenced by ocilib::DirectPath::SetDateFormat().
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetParallel | ( | OCI_DirPath * | dp, |
boolean | value | ||
) |
#include <api.h>
Set the parallel loading mode.
dp | - Direct path Handle |
value | - enable/disable parallel mode |
A direct load operation requires that the object being loaded is locked to prevent DML on the object. Note that queries are lock-free and are allowed while the object is being loaded.
Referenced by ocilib::DirectPath::SetParallel().
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetNoLog | ( | OCI_DirPath * | dp, |
boolean | value | ||
) |
#include <api.h>
Set the logging mode for the loading operation.
dp | - Direct path Handle |
value | - enable/disable logging |
The NOLOG attribute of each segment determines whether image redo or invalidation redo is generated:
Referenced by ocilib::DirectPath::SetNoLog().
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetCacheSize | ( | OCI_DirPath * | dp, |
unsigned int | size | ||
) |
#include <api.h>
Set number of elements in the date cache.
dp | - Direct path Handle |
size | - Buffer size |
Referenced by ocilib::DirectPath::SetCacheSize().
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetBufferSize | ( | OCI_DirPath * | dp, |
unsigned int | size | ||
) |
#include <api.h>
Set the size of the internal stream transfer buffer.
dp | - Direct path Handle |
size | - Buffer size |
Referenced by ocilib::DirectPath::SetBufferSize().
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetConvertMode | ( | OCI_DirPath * | dp, |
unsigned int | mode | ||
) |
#include <api.h>
Set the direct path conversion mode.
dp | - Direct path Handle |
mode | - Conversion mode |
Referenced by ocilib::DirectPath::SetConversionMode().
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DirPathGetRowCount | ( | OCI_DirPath * | dp | ) |
#include <api.h>
Return the number of rows successfully loaded into the database so far.
dp | - Direct path Handle |
Referenced by ocilib::DirectPath::GetRowCount().
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DirPathGetAffectedRows | ( | OCI_DirPath * | dp | ) |
#include <api.h>
return the number of rows successfully processed during in the last conversion or loading call
dp | - Direct path Handle |
Referenced by ocilib::DirectPath::GetAffectedRows().
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DirPathGetErrorColumn | ( | OCI_DirPath * | dp | ) |
#include <api.h>
Return the index of a column which caused an error during data conversion.
dp | - Direct path Handle |
Referenced by ocilib::DirectPath::GetErrorColumn().
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DirPathGetErrorRow | ( | OCI_DirPath * | dp | ) |
#include <api.h>
Return the index of a row which caused an error during data conversion.
dp | - Direct path Handle |
Referenced by ocilib::DirectPath::GetErrorRow().