OCILIB (C and C++ Driver for Oracle)
4.6.3
|
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 Result enumerated values. More... | |
typedef Enum< ConversionModeValues > | ConversionMode |
Conversion Mode. More... | |
typedef Enum< ResultValues > | Result |
Direct 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 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. 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 save-point (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 8747 of file ocilib.hpp.
Conversion Mode.
Possible values are DirectPath::ConversionModeValues
Definition at line 8771 of file ocilib.hpp.
typedef Enum<ResultValues> ocilib::DirectPath::Result |
Direct Operation Result.
Possible values are DirectPath::ResultValues
Definition at line 8799 of file ocilib.hpp.
Conversion mode enumerated values.
Enumerator | |
---|---|
Default | Conversion fails on error |
Force | Conversion does not fail on error |
Definition at line 8756 of file ocilib.hpp.
Direct Operation Result enumerated values.
Definition at line 8778 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 7143 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 7148 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.
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 7154 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathSetEntry().
|
inline |
Reset internal arrays and streams to prepare another load.
Definition at line 7159 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 7169 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathConvert().
|
inline |
Loads the data converted to direct path stream format.
Definition at line 7174 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 7179 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathFinish().
|
inline |
Terminate a direct path operation without committing changes.
Definition at line 7184 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathAbort().
|
inline |
Execute a data save-point (server side)
Definition at line 7189 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 7199 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 7204 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 7209 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 7214 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 7219 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 7224 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 7229 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 7234 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 7239 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 7244 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathSetBufferSize().
|
inline |
Set the direct path conversion mode.
value | - Conversion mode |
Definition at line 7249 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 7254 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 7259 of file ocilib_impl.hpp.
References ocilib::Check(), and OCI_DirPathGetErrorRow().