OCILIB (C and C++ Driver for Oracle)
4.7.5
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
|
Oracle Direct path loading encapsulation. More...
#include <types.hpp>
Inherits ocilib::core::HandleHolder< OCI_DirPath * >.
Public Types | |
enum | ConversionModeValues { Default = OCI_DCM_DEFAULT , Force = OCI_DCM_FORCE } |
Conversion mode enumerated values. More... | |
enum | ResultValues { ResultComplete = OCI_DPR_COMPLETE , ResultError = OCI_DPR_ERROR , ResultFull = OCI_DPR_FULL , ResultPartial = OCI_DPR_PARTIAL , ResultEmpty = OCI_DPR_EMPTY } |
Direct Operation Result enumerated values. More... | |
typedef core::Enum< ConversionModeValues > | ConversionMode |
Conversion Mode. | |
typedef core::Enum< ResultValues > | Result |
Direct Operation Result. | |
Public Member Functions | |
DirectPath (const TypeInfo &typeInfo, unsigned int nbCols, unsigned int nbRows, const ostring &partition=OTEXT("")) | |
Constructor. | |
void | SetColumn (unsigned int colIndex, const ostring &name, unsigned int maxSize, const ostring &format=OTEXT("")) |
Describe a column to load into the given table. | |
template<class T > | |
void | SetEntry (unsigned int rowIndex, unsigned int colIndex, const T &value, bool complete=true) |
Set the value of the given row/column array entry from the given string. | |
void | Reset () |
Reset internal arrays and streams to prepare another load. | |
void | Prepare () |
Prepares the OCI direct path load interface before any rows can be converted or loaded. | |
DirectPath::Result | Convert () |
Convert provided user data to the direct path stream format. | |
DirectPath::Result | Load () |
Loads the data converted to direct path stream format. | |
void | Finish () |
Terminate a direct path operation and commit changes into the database. | |
void | Abort () |
Terminate a direct path operation without committing changes. | |
void | Save () |
Execute a data save-point (server side) | |
void | FlushRow () |
Flushes a partially loaded row from server. | |
void | SetCurrentRows (unsigned int value) |
Set the current number of rows to convert and load. | |
unsigned int | GetCurrentRows () const |
Return the current number of rows used in the OCILIB internal arrays of rows. | |
unsigned int | GetMaxRows () const |
Return the maximum number of rows allocated in the OCI and OCILIB internal arrays of rows. | |
unsigned int | GetRowCount () const |
Return the number of rows successfully loaded into the database so far. | |
unsigned int | GetAffectedRows () const |
return the number of rows successfully processed during in the last conversion or loading call | |
void | SetDateFormat (const ostring &format) |
Set the default date format string for input conversion. | |
void | SetParallel (bool value) |
Set the parallel loading mode. | |
void | SetNoLog (bool value) |
Set the logging mode for the loading operation. | |
void | SetCacheSize (unsigned int value) |
Set number of elements in the date cache. | |
void | SetBufferSize (unsigned int value) |
Set the size of the internal stream transfer buffer. | |
void | SetConversionMode (ConversionMode value) |
Set the direct path conversion mode. | |
unsigned int | GetErrorColumn () |
Return the index of a column which caused an error during data conversion. | |
unsigned int | GetErrorRow () |
Return the index of a row which caused an error during data conversion. | |
Oracle Direct path loading encapsulation.
This class wraps the OCILIB object handle OCI_DirPath and its related methods
Conversion Mode.
Possible values are DirectPath::ConversionModeValues
Direct Operation Result.
Possible values are DirectPath::ResultValues
Direct Operation Result enumerated values.
|
inline |
Constructor.
typeInfo | - Table type info object |
nbCols | - Number of columns to load |
nbRows | - Maximum of rows to handle per load operation |
partition | - Partition name |
Definition at line 28 of file DirectPath.hpp.
References ocilib::core::Check(), ocilib::TypeInfo::GetConnection(), and OCI_DirPathCreate().
|
inline |
Describe a column to load into the given table.
colIndex | - Column index |
name | - Column name |
maxSize | - Maximum input value size for a column entry |
format | - Date or numeric format to use |
Definition at line 39 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathSetColumn().
|
inline |
Set the value of the given row/column array entry from the given string.
T | - type of data to set (only supported types are ostring and Raw) |
rowIndex | - Row index |
colIndex | - Column index |
value | - Value to set |
complete | - Is the entry content fully provided ? |
Definition at line 45 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathSetEntry().
|
inline |
Reset internal arrays and streams to prepare another load.
Definition at line 50 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathReset().
|
inline |
Prepares the OCI direct path load interface before any rows can be converted or loaded.
Definition at line 55 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathPrepare().
|
inline |
Convert provided user data to the direct path stream format.
Definition at line 60 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathConvert().
|
inline |
Loads the data converted to direct path stream format.
Definition at line 65 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathLoad().
|
inline |
Terminate a direct path operation and commit changes into the database.
Definition at line 70 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathFinish().
|
inline |
Terminate a direct path operation without committing changes.
Definition at line 75 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathAbort().
|
inline |
Execute a data save-point (server side)
Definition at line 80 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathSave().
|
inline |
Flushes a partially loaded row from server.
Definition at line 85 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathFlushRow().
|
inline |
Set the current number of rows to convert and load.
value | - Number of row to process |
Definition at line 90 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathSetCurrentRows().
|
inline |
Return the current number of rows used in the OCILIB internal arrays of rows.
Definition at line 95 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathGetCurrentRows().
|
inline |
Return the maximum number of rows allocated in the OCI and OCILIB internal arrays of rows.
Definition at line 100 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathGetMaxRows().
|
inline |
Return the number of rows successfully loaded into the database so far.
Definition at line 105 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathGetRowCount().
|
inline |
return the number of rows successfully processed during in the last conversion or loading call
Definition at line 110 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathGetAffectedRows().
|
inline |
Set the default date format string for input conversion.
format | - date format |
Definition at line 115 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathSetDateFormat().
|
inline |
Set the parallel loading mode.
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.
Definition at line 120 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathSetParallel().
|
inline |
Set the logging mode for the loading operation.
value | - enable/disable logging |
The NOLOG attribute of each segment determines whether image redo or invalidation redo is generated:
Definition at line 125 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathSetNoLog().
|
inline |
Set number of elements in the date cache.
value | - Buffer size |
Definition at line 130 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathSetCacheSize().
|
inline |
Set the size of the internal stream transfer buffer.
value | - Buffer size |
Definition at line 135 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathSetBufferSize().
|
inline |
Set the direct path conversion mode.
value | - Conversion mode |
Definition at line 140 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathSetConvertMode().
|
inline |
Return the index of a column which caused an error during data conversion.
Definition at line 145 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathGetErrorColumn().
|
inline |
Return the index of a row which caused an error during data conversion.
Definition at line 150 of file DirectPath.hpp.
References ocilib::core::Check(), and OCI_DirPathGetErrorRow().