#include <map>#include <set>#include <string>#include <vector>#include <ostream>#include <sstream>#include <exception>#include <oci.h>#include <wchar.h>

Go to the source code of this file.
Classes | |
| struct | OCIPL::OciException |
| OCI Error handling. More... | |
| struct | OCIPL::OciHandleID< TYPE > |
| mapping between OCI handle types and the corresponding type and attribute constants More... | |
| struct | OCIPL::OciSimpleHandle< TYPE > |
| "simple" OCI handles without OciEnv More... | |
| struct | OCIPL::OciHandleWrapper< TYPE > |
| wrapping of already existing OCI handles without freeing them in destructor More... | |
| struct | OCIPL::OciEnv |
| OCI environment handles. More... | |
| struct | OCIPL::OciEnvAlloc |
| wrapper for the OCIEnv handle More... | |
| struct | OCIPL::OciHandle< TYPE > |
| OCI handles. More... | |
| struct | OCIPL::OciDescriptor< TYPE > |
| OCI descriptor handles. More... | |
| struct | OCIPL::OracleServer |
| encapsulation of the OCIServer handle, used in OCIPL::OciLogin More... | |
| struct | OCIPL::LoginPara |
| database login parameter structure More... | |
| struct | OCIPL::OciContext |
| struct | OCIPL::OciLogin |
| simple OCI login to database More... | |
| struct | OCIPL::OciConnection |
| wrap OCIEnv and OCISvcCtx together More... | |
| struct | OCIPL::DatabaseConnect |
| DatabaseConnect to encapsulate all structures needed to connect to an Oracle database. More... | |
| struct | OCIPL::ColumnTypeInfo |
| column type information More... | |
| struct | OCIPL::ColumnType |
| column type description including name More... | |
| struct | OCIPL::SqlInd |
| Indicator variables are used to store information about the NULL-state of bind variables and result columns. More... | |
| struct | OCIPL::SqlValue |
| base class of bind variable structures containing the indicator variable More... | |
| struct | OCIPL::SqlIndArray |
| array of indicator variables More... | |
| struct | OCIPL::SqlInt |
| int wrapper with indicator variable More... | |
| struct | OCIPL::SqlIntArray |
| array of integer bind variable buffers More... | |
| struct | OCIPL::SqlString |
| string buffer bind variable structure More... | |
| struct | OCIPL::SqlStringArray |
| array of string bind variable buffers More... | |
| struct | OCIPL::ocidatetime |
| internal DATE representation More... | |
| struct | OCIPL::OciDate |
| wrapper for OCI DATE type More... | |
| struct | OCIPL::OciDateArray |
| OCI DATE type bind variable array. More... | |
| struct | OCIPL::SqlDateTime |
| wrapper for internal Oracle DATE type More... | |
| struct | OCIPL::SqlDateTimeArray |
| wrapper for internal Oracle DATE type More... | |
| struct | OCIPL::oraclenumber |
| internal NUMBER representation More... | |
| struct | OCIPL::SqlNumber |
| wrapper for internal Oracle NUMBER type More... | |
| struct | OCIPL::SqlNumberArray |
| array of NUMBER bind variable buffers More... | |
| struct | OCIPL::OciLob |
| base class for the BLOB/CLOB data holders OCIPL::OciLob and OCIPL::OciClob More... | |
| struct | OCIPL::OciClob |
| CLOB data holder structure. More... | |
| struct | OCIPL::BindInput |
| factory for call parameters of OCI bind functions More... | |
| struct | OCIPL::BindOutput |
| factory for call parameters of OCI bind functions More... | |
| struct | OCIPL::TrimBindPar |
| Binding of input strings with trimming to the specified maximum length. More... | |
| struct | OCIPL::DefinePar |
| factory for call parameters for OCI define functions More... | |
| struct | OCIPL::LocalOciState |
| struct | OCIPL::SqlStatement |
| an OCI SQL statement More... | |
| struct | OCIPL::SqlVariantArray |
| variant array to be used as bind variable buffer More... | |
| struct | OCIPL::SqlRecord |
| a record to hold return columns for a given statement More... | |
| struct | OCIPL::SqlRecord::Data |
| data structure for the content of single column More... | |
| struct | OCIPL::SqlResult |
| class to retrieve query result values More... | |
| struct | OCIPL::ResultIterator |
| iterator utilizing bulk mode fetching More... | |
Namespaces | |
| namespace | OCIPL |
Defines | |
| #define | TCHAR char |
| #define | LONGLONG long long |
| #define | strcpy_s(d, l, s) strcpy(d, s) |
| #define | _strupr_s(b, s) strupr(b) |
| #define | _tcscpy_s(d, l, s) _tcscpy(d, s) |
| #define | _tcsupr_s(b, s) _tcsupr(b) |
| #define | _stprintf_s1(b, l, f, p1) ((b)+(l),_stprintf(b, f, p1)) |
| #define | COUNTOF(b) (sizeof(b)/sizeof(b[0])) |
| #define | _countof COUNTOF |
| #define | min(a, b) ((a)<(b)?(a):(b)) |
| #define | iterator __iterator_ |
| #define | __STDC__ 1 |
| #define | ORACLE_VERSION 80 |
| #define | TEXT(x) x |
| #define | _stprintf sprintf |
| #define | _tcscmp strcmp |
| #define | _tcscpy strcpy |
| #define | _tcsdup _strdup |
| #define | _tcslen strlen |
| #define | _tcsnicmp strncasecmp |
| #define | _tcsupr strupr |
| #define | _tcspbrk strpbrk |
| #define | _strdup strdup |
| #define | _snprintf snprintf |
| #define | ocipl_alloc malloc |
| #define | ocipl_realloc realloc |
| #define | ocipl_free free |
| #define | OCIPL_DEFAULT_STRING_BUFFER 2000 |
| #define | SQLCODE_DUPLICATE_KEY 1 |
| #define | SQLCODE_NO_DATA_FOUND 1403 |
| #define | SQLCODE_TOO_MANY_ROWS 1422 |
| #define | CODEPOS __FILE__, __LINE__ |
| #define | THROW_OCI_EXCEPTION(par) throw_ocipl_exception(OCIPL::OciException(par, CODEPOS)) |
| #define | _OCIPL_H |
Typedefs | |
| typedef OraText | TOraText |
| typedef std::string | tstring |
| typedef std::stringbuf | tstringbuf |
| typedef std::ostringstream | tostringstream |
| typedef std::istream | tistream |
| typedef std::ostream | tostream |
| typedef OciSimpleHandle< OCIError > | OCIPL::OciError |
| OCI Error Handles. | |
| typedef OciSimpleHandle < OCIDescribe > | OCIPL::OciDescribe |
| OCI Describe Handles. | |
| typedef OciDescriptor< OCIParam > | OCIPL::OciParam |
| typedef OciHandle< OCIBind > | OCIPL::OciBindHandle |
| typedef OciHandle< OCIDefine > | OCIPL::OciDefineHandle |
Enumerations | |
| enum | OCIPL::OCI_STATE { OCIPL::OS_NONE, OCIPL::OS_PREPARE, OCIPL::OS_RELEASE, OCIPL::OS_EXECUTE, OCIPL::OS_FETCH, OCIPL::OS_TRANSACTION } |
| enum | { OCIPL::INT_NULL = -1 } |
Functions | |
| char * | strupr (char *) |
| size_t | max_strlen (const char *s, size_t max_len) |
| char * | max_strdup (const char *s, size_t max_len) |
| int | OCIPL::istspace (TCHAR c) |
| void | OCIPL::throw_oci_exception (OCIError *errh, sword res) |
| void | OCIPL::throw_oci_exception (OCIEnv *envh, sword res) |
| void | OCIPL::oci_check_error (OCIError *errh, sword res) |
| void | OCIPL::oci_check_error (OCIEnv *envh, sword res) |
| void | OCIPL::oci_check_error (OciEnv &env, sword res) |
| void | OCIPL::throw_ocipl_exception (OciException e) |
| This function is called to throw OCIPL Exceptions in response to Oracle Errors. | |
| tstring | OCIPL::ocidate_to_string (const OCIDate &date) |
| tstring | OCIPL::ocidate_to_short_string (const OCIDate &date) |
| struct tm * | OCIPL::ocidate_to_gmt (const OCIDate &date) |
| struct tm * | OCIPL::ocidate_to_lctime (const OCIDate &date) |
| time_t | OCIPL::ocidate_to_time_t (const OCIDate &date) |
| tstring | OCIPL::ocidatetime_to_string (const ocidatetime &date) |
| int | OCIPL::number_to_int (const oraclenumber &val, OCIError *errh) |
| double | OCIPL::number_to_double (const oraclenumber &val, OCIError *errh) |
| tstring | OCIPL::number_to_str (const oraclenumber &val, OCIError *errh, const TCHAR *fmt, const TCHAR *nls_fmt) |
| const TCHAR * | OCIPL::get_oci_ptype_str (ub1 type) |
OCIPL header file.
Definition in file ocipl.h.
| #define _snprintf snprintf |
Definition at line 212 of file ocipl.h.
Referenced by OCIPL::OciException::OciException().
| #define _stprintf sprintf |
Definition at line 197 of file ocipl.h.
Referenced by OCIPL::ocidate_to_short_string(), OCIPL::ocidate_to_string(), OCIPL::ocidatetime_to_string(), and OCIPL::SqlVariantArray::str().
| #define _stprintf_s1 | ( | b, | |
| l, | |||
| f, | |||
| p1 | |||
| ) | ((b)+(l),_stprintf(b, f, p1)) |
Definition at line 95 of file ocipl.h.
Referenced by OCIPL::SqlIntArray::str(), and OCIPL::SqlInt::str().
| #define _strdup strdup |
Definition at line 208 of file ocipl.h.
Referenced by OCIPL::OciException::OciException().
| #define _tcscmp strcmp |
Definition at line 198 of file ocipl.h.
Referenced by OCIPL::SqlString::operator!=(), OCIPL::SqlString::operator<(), and OCIPL::SqlString::operator==().
| #define _tcscpy_s | ( | d, | |
| l, | |||
| s | |||
| ) | _tcscpy(d, s) |
Definition at line 87 of file ocipl.h.
Referenced by OCIPL::SqlString::operator=().
| #define _tcslen strlen |
Definition at line 201 of file ocipl.h.
Referenced by OCIPL::BindInput::BindInput(), OCIPL::BindOutput::BindOutput(), OCIPL::SqlStringArray::len(), OCIPL::SqlString::len(), OCIPL::number_to_str(), OCIPL::OciDate::OciDate(), OCIPL::OciException::OciException(), OCIPL::SqlString::operator=(), OCIPL::SqlNumber::SqlNumber(), OCIPL::tokenize(), and OCIPL::TrimBindPar::TrimBindPar().
| #define _tcsnicmp strncasecmp |
Definition at line 202 of file ocipl.h.
Referenced by OCIPL::LoginPara::parse().
| #define _tcspbrk strpbrk |
Definition at line 204 of file ocipl.h.
Referenced by OCIPL::tokenize().
| #define _tcsupr_s | ( | b, | |
| s | |||
| ) | _tcsupr(b) |
Definition at line 91 of file ocipl.h.
Referenced by OCIPL::SqlRecord::find_column().
| #define CODEPOS __FILE__, __LINE__ |
Definition at line 357 of file ocipl.h.
Referenced by OCIPL::SqlStatement::execute_internal(), and OCIPL::SqlStatement::print_results().
| #define COUNTOF | ( | b ) | (sizeof(b)/sizeof(b[0])) |
Definition at line 113 of file ocipl.h.
Referenced by OCIPL::ocidate_to_short_string(), OCIPL::ocidate_to_string(), OCIPL::ocidatetime_to_string(), OCIPL::OciException::OciException(), and OCIPL::SqlVariantArray::str().
| #define iterator __iterator_ |
Definition at line 136 of file ocipl.h.
Referenced by OCIPL::SqlRecord::bind_result(), OCIPL::SqlRecord::SqlRecord(), and OCIPL::SqlRecord::~SqlRecord().
| #define LONGLONG long long |
Definition at line 65 of file ocipl.h.
Referenced by OCIPL::DefinePar::DefinePar().
| #define min | ( | a, | |
| b | |||
| ) | ((a)<(b)?(a):(b)) |
Definition at line 129 of file ocipl.h.
Referenced by OCIPL::TrimBindPar::TrimBindPar().
| #define ocipl_free free |
Definition at line 272 of file ocipl.h.
Referenced by OCIPL::OciDateArray::~OciDateArray(), OCIPL::SqlDateTimeArray::~SqlDateTimeArray(), OCIPL::SqlIntArray::~SqlIntArray(), OCIPL::SqlNumberArray::~SqlNumberArray(), OCIPL::SqlString::~SqlString(), and OCIPL::SqlStringArray::~SqlStringArray().
| #define ocipl_realloc realloc |
Definition at line 271 of file ocipl.h.
Referenced by OCIPL::SqlString::resize().
| #define strcpy_s | ( | d, | |
| l, | |||
| s | |||
| ) | strcpy(d, s) |
Definition at line 79 of file ocipl.h.
Referenced by OCIPL::SqlStringArray::assign().
| #define TCHAR char |
Definition at line 59 of file ocipl.h.
Referenced by OCIPL::BindInput::BindInput(), OCIPL::BindOutput::BindOutput(), OCIPL::OciLogin::connect(), OCIPL::DefinePar::DefinePar(), OCIPL::SqlRecord::find_column(), OCIPL::ColumnType::init(), OCIPL::number_to_str(), OCIPL::ocidate_to_short_string(), OCIPL::ocidate_to_string(), OCIPL::ocidatetime_to_string(), OCIPL::OciException::OciException(), OCIPL::SqlString::ocipl_tcscpyn(), OCIPL::LoginPara::parse(), OCIPL::SqlString::resize(), OCIPL::SqlStringArray::SqlStringArray(), OCIPL::SqlIntArray::str(), OCIPL::SqlInt::str(), OCIPL::SqlVariantArray::str(), OCIPL::tokenize(), and OCIPL::TrimBindPar::TrimBindPar().
| #define TEXT | ( | x ) | x |
Definition at line 172 of file ocipl.h.
Referenced by OCIPL::SqlStringArray::c_str(), OCIPL::SqlString::c_str(), OCIPL::get_oci_ptype_str(), OCIPL::ColumnTypeInfo::get_type_str(), OCIPL::ocidate_to_short_string(), OCIPL::ocidate_to_string(), OCIPL::ocidatetime_to_string(), OCIPL::SqlString::operator const TCHAR *(), OCIPL::SqlString::operator=(), OCIPL::LoginPara::parse(), OCIPL::SqlRecord::print_columns(), OCIPL::SqlStatement::print_results(), OCIPL::SqlRecord::print_values(), OCIPL::SqlIntArray::str(), OCIPL::SqlInt::str(), OCIPL::SqlVariantArray::str(), and OCIPL::tokenize().
| #define THROW_OCI_EXCEPTION | ( | par ) | throw_ocipl_exception(OCIPL::OciException(par, CODEPOS)) |
Definition at line 366 of file ocipl.h.
Referenced by OCIPL::SqlRecord::get_column(), OCIPL::SqlRecord::get_column_type(), OCIPL::SqlVariantArray::number(), OCIPL::SqlVariantArray::oci_date(), OCIPL::SqlVariantArray::set_date(), OCIPL::SqlVariantArray::set_datetime(), OCIPL::SqlVariantArray::set_number(), OCIPL::SqlVariantArray::set_string(), OCIPL::SqlVariantArray::sql_date(), OCIPL::SqlVariantArray::SqlVariantArray(), and OCIPL::throw_oci_exception().
| typedef std::ostringstream tostringstream |
| typedef std::stringbuf tstringbuf |
| char* max_strdup | ( | const char * | s, |
| size_t | max_len | ||
| ) |
Definition at line 79 of file ocipl.cpp.
References max_strlen().
Referenced by OCIPL::OciException::OciException().
{
if (!s)
return NULL;
size_t l = max_strlen(s, max_len);
char* ret = (char*) malloc(l+1);
#ifdef __STDC_WANT_SECURE_LIB__
strncpy_s(ret, l+1, s, l);
#else
strncpy(ret, s, l);
#endif
ret[l] = '\0';
return ret;
}


| size_t max_strlen | ( | const char * | s, |
| size_t | max_len | ||
| ) |
Definition at line 66 of file ocipl.cpp.
Referenced by max_strdup(), and OCIPL::OciException::OciException().
{
if (!s)
return 0;
size_t cnt = 0;
while(cnt<max_len && *s)
++cnt, ++s;
return cnt;
}

1.7.2