23 #include "ocilibcpp/types.hpp" 39 inline void DirectPath::SetEntry(
unsigned int rowIndex,
unsigned int colIndex,
const T &value,
bool complete)
41 core::Check(
OCI_DirPathSetEntry(*
this, rowIndex, colIndex, static_cast<const AnyPointer>(const_cast<typename T::value_type *>(value.c_str())),
static_cast<unsigned int>(value.size()), complete));
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathReset(OCI_DirPath *dp)
Reset internal arrays and streams to prepare another load.
unsigned int GetErrorRow()
Return the index of a row which caused an error during data conversion.
void SetCacheSize(unsigned int value)
Set number of elements in the date cache.
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 unsigned int OCI_API OCI_DirPathGetRowCount(OCI_DirPath *dp)
Return the number of rows successfully loaded into the database so far.
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.
void SetNoLog(bool value)
Set the logging mode for the loading operation.
unsigned int GetRowCount() const
Return the number of rows successfully loaded into the database so far.
core::Enum< ResultValues > Result
Direct Operation Result.
static T Check(T result)
Internal usage. Checks if the last OCILIB function call has raised an error. If so, it raises a C++ exception using the retrieved error handle.
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 boolean OCI_API OCI_DirPathSetCurrentRows(OCI_DirPath *dp, unsigned int nb_rows)
Set the current number of rows to convert and load.
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.
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 ...
void SetBufferSize(unsigned int value)
Set the size of the internal stream transfer buffer.
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 unsigned int OCI_API OCI_DirPathGetCurrentRows(OCI_DirPath *dp)
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...
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetDateFormat(OCI_DirPath *dp, const otext *format)
Set the default date format string for input conversion.
void SetConversionMode(ConversionMode value)
Set the direct path conversion mode.
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathFlushRow(OCI_DirPath *dp)
Flushes a partially loaded row from server.
unsigned int GetCurrentRows() const
Return the current number of rows used in the OCILIB internal arrays of rows.
unsigned int GetErrorColumn()
Return the index of a column which caused an error during data conversion.
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.
unsigned int GetAffectedRows() const
return the number of rows successfully processed during in the last conversion or loading call ...
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DirPathLoad(OCI_DirPath *dp)
Loads the data converted to direct path stream format.
Template Enumeration template class providing some type safety to some extends for manipulating enume...
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathFree(OCI_DirPath *dp)
Free an OCI_DirPath handle.
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathFinish(OCI_DirPath *dp)
Terminate a direct path operation and commit changes into the database.
void SetColumn(unsigned int colIndex, const ostring &name, unsigned int maxSize, const ostring &format=OTEXT(""))
Describe a column to load into the given table.
void Finish()
Terminate a direct path operation and commit changes into the database.
DirectPath::Result Convert()
Convert provided user data to the direct path stream format.
void Prepare()
Prepares the OCI direct path load interface before any rows can be converted or loaded.
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetConvertMode(OCI_DirPath *dp, unsigned int mode)
Set the direct path conversion mode.
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_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_DirPathSetParallel(OCI_DirPath *dp, boolean value)
Set the parallel loading mode.
Provides type information on Oracle Database objects.
void SetCurrentRows(unsigned int value)
Set the current number of rows to convert and load.
DirectPath::Result Load()
Loads the data converted to direct path stream format.
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.
void Abort()
Terminate a direct path operation without committing changes.
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetBufferSize(OCI_DirPath *dp, unsigned int size)
Set the size of the internal stream transfer buffer.
void SetParallel(bool value)
Set the parallel loading mode.
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathAbort(OCI_DirPath *dp)
Terminate a direct path operation without committing changes.
DirectPath(const TypeInfo &typeInfo, unsigned int nbCols, unsigned int nbRows, const ostring &partition=OTEXT(""))
Constructor.
void SetDateFormat(const ostring &format)
Set the default date format string for input conversion.
std::basic_string< otext, std::char_traits< otext >, std::allocator< otext > > ostring
string class wrapping the OCILIB otext * type and OTEXT() macros ( see Character sets ) ...
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSetNoLog(OCI_DirPath *dp, boolean value)
Set the logging mode for the loading operation.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_DirPathConvert(OCI_DirPath *dp)
Convert provided user data to the direct path stream format.
void FlushRow()
Flushes a partially loaded row from server.
void Save()
Execute a data save-point (server side)
OCI_SYM_PUBLIC boolean OCI_API OCI_DirPathSave(OCI_DirPath *dp)
Execute a data save-point (server side)