23 #include "ocilibcpp/core.hpp"
33 static T* OnAllocate(T* address,
size_t count = 1)
35 #ifdef OCILIBPP_DEBUG_MEMORY_ENABLED
36 GetMemoryDebugInfo().OnAllocate(address, count);
43 static T* OnDeallocate(T* address)
45 #ifdef OCILIBPP_DEBUG_MEMORY_ENABLED
46 GetMemoryDebugInfo().OnDeallocate(address);
72 unsigned char* ptr =
static_cast<unsigned char*
>(result);
74 return (ptr && size > 0 ?
Raw(ptr, ptr + size) :
Raw());
79 const int UTF8_BytesPerChar = 4;
81 unsigned int res =
sizeof(ostring::value_type);
87 #pragma warning(disable: 4996)
89 char* str = getenv(
"NLS_LANG");
97 std::string nlsLang = str;
99 for (
char &i :nlsLang)
101 i =
static_cast<std::string::value_type
>(toupper(i));
104 if (ostring::npos != nlsLang.find(
"UTF8"))
106 res = UTF8_BytesPerChar;
Exception class handling all OCILIB errors.
Template Enumeration template class providing some type safety to some extends for manipulating enume...
struct OCI_Error OCI_Error
Encapsulates an Oracle or OCILIB exception.
OCI_SYM_PUBLIC OCI_Error *OCI_API OCI_GetLastError(void)
Retrieve the last error or warning occurred within the last OCILIB call.
static T Check(T result)
Internal usage. Checks if the last OCILIB function call has raised an error. If so,...
ostring MakeString(const otext *result, int size=-1)
Internal usage. Constructs a C++ string object from the given OCILIB string pointer.
Raw MakeRaw(AnyPointer result, unsigned int size)
Internal usage. Constructs a C++ Raw object from the given OCILIB raw buffer.
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 )
std::vector< unsigned char > Raw
C++ counterpart of SQL RAW data type.
void * AnyPointer
Alias for the generic void pointer.