|
OCILIB (C and C++ Driver for Oracle)
4.0.0
|
Oracle Direct path loading encapsulation. More...
#include <ocilib.hpp>
Inherits ocilib::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 operation Result enumerated values. More... | |
| typedef Enum < ConversionModeValues > | ConversionMode |
| Conversion Mode. More... | |
| typedef Enum< ResultValues > | Result |
| Direct Operation operation Result. More... | |
Public Member Functions | |
| DirectPath (const TypeInfo &typeInfo, unsigned int nbCols, unsigned int nbRows, const ostring &partition=OTEXT("")) | |
| Constructor. More... | |
| void | SetColumn (unsigned int colIndex, const ostring &name, unsigned int maxSize, const ostring &format=OTEXT("")) |
| Describe a column to load into the given table. More... | |
| template<class TDataType > | |
| void | SetEntry (unsigned int rowIndex, unsigned int colIndex, const TDataType &value, bool complete=true) |
| Set the value of the given row/column array entry from the given string. More... | |
| void | Reset () |
| Reset internal arrays and streams to prepare another load. More... | |
| 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. More... | |
| DirectPath::Result | Load () |
| Loads the data converted to direct path stream format. More... | |
| void | Finish () |
| Terminate a direct path operation and commit changes into the database. More... | |
| void | Abort () |
| Terminate a direct path operation without committing changes. More... | |
| void | Save () |
| Execute a data savepoint (server side) More... | |
| void | FlushRow () |
| Flushes a partially loaded row from server. | |
| void | SetCurrentRows (unsigned int value) |
| Set the current number of rows to convert and load. More... | |
| unsigned int | GetCurrentRows () const |
| Return the current number of rows used in the OCILIB internal arrays of rows. More... | |
| unsigned int | GetMaxRows () const |
| Return the maximum number of rows allocated in the OCI and OCILIB internal arrays of rows. More... | |
| unsigned int | GetRowCount () const |
| Return the number of rows successfully loaded into the database so far. More... | |
| unsigned int | GetAffectedRows () const |
| return the number of rows successfully processed during in the last conversion or loading call More... | |
| void | SetDateFormat (const ostring &format) |
| Set the default date format string for input conversion. More... | |
| void | SetParallel (bool value) |
| Set the parallel loading mode. More... | |
| void | SetNoLog (bool value) |
| Set the logging mode for the loading operation. More... | |
| void | SetCacheSize (unsigned int value) |
| Set number of elements in the date cache. More... | |
| void | SetBufferSize (unsigned int value) |
| Set the size of the internal stream transfer buffer. More... | |
| void | SetConversionMode (ConversionMode value) |
| Set the direct path conversion mode. More... | |
| unsigned int | GetErrorColumn () |
| Return the index of a column which caused an error during data conversion. More... | |
| unsigned int | GetErrorRow () |
| Return the index of a row which caused an error during data conversion. More... | |
Oracle Direct path loading encapsulation.
This class wraps the OCILIB object handle OCI_DirPath and its related methods
Definition at line 7731 of file ocilib.hpp.
Conversion Mode.
Possible values are DirectPath::ConversionModeValues
Definition at line 7755 of file ocilib.hpp.
| typedef Enum<ResultValues> ocilib::DirectPath::Result |
Direct Operation operation Result.
Possible values are DirectPath::ResultValues
Definition at line 7783 of file ocilib.hpp.
Conversion mode enumerated values.
| Enumerator | |
|---|---|
| Default |
Conversion fails on error |
| Force |
Conversion does not fail on error |
Definition at line 7740 of file ocilib.hpp.
Direct Operation operation Result enumerated values.
Definition at line 7762 of file ocilib.hpp.
|
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 5825 of file ocilib_impl.hpp.
References ocilib::Check(), OCI_DirPathCreate(), and OCI_DirPathFree().
|
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 5830 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathSetColumn().
|
inline |
Set the value of the given row/column array entry from the given string.
| TDataType | - 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 5836 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathSetEntry().
|
inline |
Reset internal arrays and streams to prepare another load.
Definition at line 5841 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathReset().
|
inline |
Convert provided user data to the direct path stream format.
Definition at line 5851 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathConvert().
|
inline |
Loads the data converted to direct path stream format.
Definition at line 5856 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathLoad().
|
inline |
Terminate a direct path operation and commit changes into the database.
Definition at line 5861 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathFinish().
|
inline |
Terminate a direct path operation without committing changes.
Definition at line 5866 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathAbort().
|
inline |
Execute a data savepoint (server side)
Definition at line 5871 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathSave().
|
inline |
Set the current number of rows to convert and load.
| value | - Number of row to process |
Definition at line 5881 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathSetCurrentRows().
|
inline |
Return the current number of rows used in the OCILIB internal arrays of rows.
Definition at line 5886 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathGetCurrentRows().
|
inline |
Return the maximum number of rows allocated in the OCI and OCILIB internal arrays of rows.
Definition at line 5891 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathGetMaxRows().
|
inline |
Return the number of rows successfully loaded into the database so far.
Definition at line 5896 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathGetRowCount().
|
inline |
return the number of rows successfully processed during in the last conversion or loading call
Definition at line 5901 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathGetAffectedRows().
|
inline |
Set the default date format string for input conversion.
| format | - date format |
Definition at line 5906 of file ocilib_impl.hpp.
References ocilib::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 5911 of file ocilib_impl.hpp.
References ocilib::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 5916 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathSetNoLog().
|
inline |
Set number of elements in the date cache.
| value | - Buffer size |
Definition at line 5921 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathSetCacheSize().
|
inline |
Set the size of the internal stream transfer buffer.
| value | - Buffer size |
Definition at line 5926 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathSetBufferSize().
|
inline |
Set the direct path conversion mode.
| value | - Conversion mode |
Definition at line 5931 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathSetConvertMode().
|
inline |
Return the index of a column which caused an error during data conversion.
Definition at line 5936 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathGetErrorColumn().
|
inline |
Return the index of a row which caused an error during data conversion.
Definition at line 5941 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathGetErrorRow().