62 template<
class TResultType>
63 inline TResultType
Check(TResultType result)
72 return ostring(result ? result : OTEXT(
""));
78 unsigned char *start =
static_cast<unsigned char *
>(result);
80 return Raw(start, start + size);
89 inline Enum<TEnum>::Enum(
void) : _value(0)
94 inline Enum<TEnum>::Enum(TEnum value) : _value(value)
99 inline TEnum Enum<TEnum>::GetValue()
105 template<
class TEnum>
106 inline Enum<TEnum>::operator TEnum ()
111 template<
class TEnum>
112 inline Enum<TEnum>::operator
unsigned int ()
114 return static_cast<unsigned int>(_value);
117 template<
class TEnum>
118 inline bool Enum<TEnum>::operator == (
const Enum& other)
const
120 return other._value == _value;
123 template<
class TEnum>
124 inline bool Enum<TEnum>::operator != (
const Enum& other)
const
126 return !(*
this == other);
129 template<
class TEnum>
130 inline bool Enum<TEnum>::operator == (
const TEnum& other)
const
132 return other == _value;
135 template<
class TEnum>
136 inline bool Enum<TEnum>::operator != (
const TEnum& other)
const
138 return !(*
this == other);
145 template<
class TEnum>
146 inline Flags<TEnum>::Flags(
void) : _flags( (TEnum) 0)
150 template<
class TEnum>
151 inline Flags<TEnum>::Flags(TEnum flag) : _flags( flag)
155 template<
class TEnum>
156 inline Flags<TEnum>::Flags(
const Flags& other) : _flags(other._flags)
161 template<
class TEnum>
162 inline Flags<TEnum>::Flags(
unsigned int flag) : _flags( (TEnum) flag)
166 template<
class TEnum>
167 inline Flags<TEnum> Flags<TEnum>::operator~ ()
const
169 return Flags<TEnum>(~_flags);
172 template<
class TEnum>
173 inline Flags<TEnum> Flags<TEnum>::operator | (
const Flags& other)
const
175 return Flags<TEnum>(_flags | other._flags);
178 template<
class TEnum>
179 inline Flags<TEnum> Flags<TEnum>::operator & (
const Flags& other)
const
181 return Flags<TEnum>(_flags & other._flags);
184 template<
class TEnum>
185 inline Flags<TEnum> Flags<TEnum>::operator ^ (
const Flags& other)
const
187 return Flags<TEnum>(_flags ^ other._flags);
190 template<
class TEnum>
191 inline Flags<TEnum> Flags<TEnum>::operator | (TEnum other)
const
193 return Flags<TEnum>(_flags | other);
196 template<
class TEnum>
197 inline Flags<TEnum> Flags<TEnum>::operator & (TEnum other)
const
199 return Flags<TEnum>(_flags & other);
202 template<
class TEnum>
203 inline Flags<TEnum> Flags<TEnum>::operator ^ (TEnum other)
const
205 return Flags<TEnum>(_flags ^ other);
208 template<
class TEnum>
209 inline Flags<TEnum>& Flags<TEnum>::operator |= (
const Flags<TEnum>& other)
211 _flags |= other._flags;
215 template<
class TEnum>
216 inline Flags<TEnum>& Flags<TEnum>::operator &= (
const Flags<TEnum>& other)
218 _flags &= other._flags;
222 template<
class TEnum>
223 inline Flags<TEnum>& Flags<TEnum>::operator ^= (
const Flags<TEnum>& other)
225 _flags ^= other._flags;
230 template<
class TEnum>
231 inline Flags<TEnum>& Flags<TEnum>::operator |= (TEnum other)
237 template<
class TEnum>
238 inline Flags<TEnum>& Flags<TEnum>::operator &= (TEnum other)
244 template<
class TEnum>
245 inline Flags<TEnum>& Flags<TEnum>::operator ^= (TEnum other)
251 template<
class TEnum>
252 inline bool Flags<TEnum>::operator == (TEnum other)
const
254 return _flags == other;
257 template<
class TEnum>
258 inline bool Flags<TEnum>::operator == (
const Flags& other)
const
260 return _flags == other._flags;
263 template<
class TEnum>
264 inline bool Flags<TEnum>::IsSet(TEnum other)
const
266 return ((_flags & other) == _flags);
269 template<
class TEnum>
270 inline unsigned int Flags<TEnum>::GetValues()
const
275 #define OCI_DEFINE_FLAG_OPERATORS(TEnum) \
276 inline Flags<TEnum> operator | (TEnum a, TEnum b) { return Flags<TEnum>(a) | Flags<TEnum>(b); } \
278 OCI_DEFINE_FLAG_OPERATORS(Environment::EnvironmentFlagsValues)
279 OCI_DEFINE_FLAG_OPERATORS(Environment::SessionFlagsValues)
280 OCI_DEFINE_FLAG_OPERATORS(Environment::StartFlagsValues)
281 OCI_DEFINE_FLAG_OPERATORS(Environment::ShutdownFlagsValues)
282 OCI_DEFINE_FLAG_OPERATORS(Transaction::TransactionFlagsValues)
283 OCI_DEFINE_FLAG_OPERATORS(Column::PropertyFlagsValues)
284 OCI_DEFINE_FLAG_OPERATORS(Subscription::ChangeTypesValues)
290 template< typename TBufferType>
291 inline ManagedBuffer<TBufferType>::ManagedBuffer() : _buffer(NULL), _size(0)
295 template<
typename TBufferType>
296 inline ManagedBuffer<TBufferType>::ManagedBuffer(TBufferType *buffer,
size_t size) : _buffer(buffer), _size(size)
300 template<
typename TBufferType>
301 inline ManagedBuffer<TBufferType>::ManagedBuffer(
size_t size) : _buffer(new TBufferType[size]), _size(size)
303 memset(_buffer, 0,
sizeof(TBufferType) * size);
305 template<
typename TBufferType>
306 inline ManagedBuffer<TBufferType>::~ManagedBuffer()
311 template<
typename TBufferType>
312 inline ManagedBuffer<TBufferType>::operator TBufferType* ()
const
317 template<
typename TBufferType>
318 inline ManagedBuffer<TBufferType>::operator
const TBufferType* ()
const
327 template<
class THandleType>
328 inline HandleHolder<THandleType>::HandleHolder() : _smartHandle(0)
332 template<
class THandleType>
333 inline HandleHolder<THandleType>::HandleHolder(
const HandleHolder &other) : _smartHandle(0)
335 Acquire(other, 0, other._smartHandle ? other._smartHandle->GetParent() : 0);
338 template<
class THandleType>
339 inline HandleHolder<THandleType>::~HandleHolder()
344 template<
class THandleType>
345 inline HandleHolder<THandleType>& HandleHolder<THandleType>::operator = (
const HandleHolder<THandleType> &other)
347 Acquire(other, 0, other._smartHandle ? other._smartHandle->GetParent() : 0);
351 template<
class THandleType>
352 inline bool HandleHolder<THandleType>::IsNull()
const
354 return (((THandleType) *
this) == 0);
357 template<
class THandleType>
358 inline HandleHolder<THandleType>::operator THandleType()
360 return _smartHandle ? _smartHandle->GetHandle() : 0;
363 template<
class THandleType>
364 inline HandleHolder<THandleType>::operator THandleType()
const
366 return _smartHandle ? _smartHandle->GetHandle() : 0;
369 template<
class THandleType>
370 inline HandleHolder<THandleType>::operator bool()
const
375 template<
class THandleType>
376 inline Handle * HandleHolder<THandleType>::GetHandle()
const
378 return static_cast<Handle *
>(_smartHandle);
381 template<
class THandleType>
382 inline void HandleHolder<THandleType>::Acquire(THandleType handle, HandleFreeFunc func, Handle *parent)
388 _smartHandle =
new HandleHolder<THandleType>::SmartHandle(
this, handle, func, parent);
390 Environment::GetEnvironmentHandle().Handles.Set(handle, _smartHandle);
394 _smartHandle =
dynamic_cast<HandleHolder<THandleType>::SmartHandle *
>(Environment::GetEnvironmentHandle().Handles.Get(handle));
398 _smartHandle =
new HandleHolder<THandleType>::SmartHandle(
this, handle, 0, parent);
402 _smartHandle->Acquire(
this);
407 template<
class THandleType>
408 inline void HandleHolder<THandleType>::Acquire(HandleHolder<THandleType> &other)
410 if (&other !=
this && _smartHandle != other._smartHandle)
414 if (other._smartHandle)
416 other._smartHandle->Acquire(
this);
417 _smartHandle = other._smartHandle;
422 template<
class THandleType>
423 inline void HandleHolder<THandleType>::Release()
427 _smartHandle->Release(
this);
434 template <
class TKey,
class TValue>
435 inline ConcurrentPool<TKey, TValue>::ConcurrentPool() : _map(), _mutex(0)
440 template <
class TKey,
class TValue>
441 inline void ConcurrentPool<TKey, TValue>::Initialize(
unsigned int envMode)
443 if (envMode & OCI_ENV_THREADED)
445 _mutex = Mutex::Create();
449 template <
class TKey,
class TValue>
450 inline void ConcurrentPool<TKey, TValue>::Release()
454 Mutex::Destroy(_mutex);
462 template <
class TKey,
class TValue>
463 inline void ConcurrentPool<TKey, TValue>::Remove(TKey key)
470 template <
class TKey,
class TValue>
471 inline TValue ConcurrentPool<TKey, TValue>::Get(TKey key)
const
476 typename ConcurrentPoolMap::const_iterator it = _map.find(key);
477 if (it != _map.end() )
486 template <
class TKey,
class TValue>
487 inline void ConcurrentPool<TKey, TValue>::Set(TKey key, TValue value)
494 template <
class TKey,
class TValue>
495 inline void ConcurrentPool<TKey, TValue>::Lock()
const
499 Mutex::Acquire(_mutex);
503 template <
class TKey,
class TValue>
504 inline void ConcurrentPool<TKey, TValue>::Unlock()
const
508 Mutex::Release(_mutex);
512 template <
class THandleType>
513 inline HandleHolder<THandleType>::SmartHandle::SmartHandle(HandleHolder *holder, THandleType handle, HandleFreeFunc func, Handle *parent)
514 : _holders(), _children(), _handle(handle), _func(func), _parent(parent), _extraInfo(0)
518 if (_parent && _handle)
520 _parent->GetChildren().push_back(
this);
524 template <
class THandleType>
525 inline HandleHolder<THandleType>::SmartHandle::~SmartHandle()
530 if (_parent && _handle)
532 _parent->GetChildren().remove(
this);
535 for(std::list<Handle *>::iterator it = _children.begin(); it != _children.end(); it++)
537 Handle *handle = *it;
539 handle->DetachFromParent();
540 handle->DetachFromHolders();
545 Environment::GetEnvironmentHandle().Handles.Remove(_handle);
550 ret = _func(_handle);
560 template <
class THandleType>
561 inline void HandleHolder<THandleType>::SmartHandle::Acquire(HandleHolder *holder)
563 _holders.push_back(holder);
566 template <
class THandleType>
567 inline void HandleHolder<THandleType>::SmartHandle::Release(HandleHolder *holder)
569 _holders.remove(holder);
571 if (_holders.size() == 0)
576 holder->_smartHandle = 0;
579 template <
class THandleType>
580 inline bool HandleHolder<THandleType>::SmartHandle::IsLastHolder(HandleHolder *holder)
const
582 return ((_holders.size() == 1) && (*(_holders.begin()) == holder));
585 template <
class THandleType>
586 inline THandleType HandleHolder<THandleType>::SmartHandle::GetHandle()
const
591 template <
class THandleType>
592 inline Handle * HandleHolder<THandleType>::SmartHandle::GetParent()
const
597 template <
class THandleType>
598 inline AnyPointer HandleHolder<THandleType>::SmartHandle::GetExtraInfos()
const
603 template <
class THandleType>
604 inline void HandleHolder<THandleType>::SmartHandle::SetExtraInfos(AnyPointer extraInfo)
606 _extraInfo = extraInfo;
609 template <
class THandleType>
610 inline std::list<Handle *> & HandleHolder<THandleType>::SmartHandle::GetChildren()
615 template <
class THandleType>
616 inline void HandleHolder<THandleType>::SmartHandle::DetachFromHolders()
618 for(
typename std::list<HandleHolder<THandleType> *>::iterator it = _holders.begin(); it != _holders.end(); it++)
620 (*it)->_smartHandle = 0;
626 template <
class THandleType>
627 inline void HandleHolder<THandleType>::SmartHandle::DetachFromParent()
636 inline Exception::Exception() : _what()
641 inline Exception::~Exception() throw ()
646 inline Exception::Exception(
OCI_Error *err) : _what()
654 size_t i = 0, size = ostrlen(str);
658 while (i < size) { _what[i] =
static_cast<char>(str[i]); i++; }
664 return _what.c_str();
708 unsigned int ociMode = mode.GetValues();
719 GetEnvironmentHandle().Finalize();
728 return EnvironmentFlags(static_cast<EnvironmentFlags::type>(GetEnvironmentHandle().Mode));
762 startMode, startFlags.GetValues(), spfile.c_str() ));
769 shutdownMode, shutdownFlags.GetValues() ));
779 Environment::CallbackPool & pool = GetEnvironmentHandle().Callbacks;
783 pool.Set(GetEnvironmentHandle(), reinterpret_cast<CallbackPointer>(handler));
786 inline void Environment::HAHandler(
OCI_Connection *pConnection,
unsigned int source,
unsigned int event,
OCI_Timestamp *pTimestamp)
793 Timestamp timestamp(pTimestamp, connection.GetHandle());
797 HAEventType (static_cast<HAEventType::type> (event)),
802 inline unsigned int Environment::TAFHandler(
OCI_Connection *pConnection,
unsigned int type,
unsigned int event)
804 unsigned int res = OCI_FOC_OK;
810 Connection connection(pConnection, 0);
812 res = handler(connection,
820 inline void Environment::NotifyHandler(
OCI_Event *pEvent)
831 inline void Environment::NotifyHandlerAQ(
OCI_Dequeue *pDequeue)
837 Dequeue dequeue(pDequeue);
842 inline Environment::EnvironmentHandle & Environment::GetEnvironmentHandle()
844 static EnvironmentHandle envHandle;
849 inline Environment::EnvironmentHandle::EnvironmentHandle() : Handles(), Callbacks(), Mode(0)
854 inline void Environment::EnvironmentHandle::Initialize(
AnyPointer handle,
unsigned int envMode)
857 Callbacks.Initialize(envMode);
858 Handles.Initialize(envMode);
860 Acquire(handle, 0, 0);
863 inline void Environment::EnvironmentHandle::Finalize()
955 Open(db, user, pwd, poolType, minSize, maxSize, increment, sessionFlags);
963 Acquire(
Check(
OCI_PoolCreate(db.c_str(), user.c_str(), pwd.c_str(), poolType, sessionFlags.GetValues(),
964 minSize, maxSize, increment)),
reinterpret_cast<HandleFreeFunc
>(
OCI_PoolFree), 0);
1043 Open(db, user, pwd, sessionFlags);
1048 Acquire(con, reinterpret_cast<HandleFreeFunc>(parent ?
OCI_ConnectionFree : 0), parent);
1054 reinterpret_cast<HandleFreeFunc
>(
OCI_ConnectionFree), Environment::GetEnvironmentHandle().GetHandle());
1207 lines.push_back(str);
1279 Environment::CallbackPool & pool = Environment::GetEnvironmentHandle().Callbacks;
1281 Check(
OCI_SetTAFHandler(*
this, static_cast<POCI_TAF_HANDLER>(handler != 0 ? Environment::TAFHandler : 0 )));
1283 pool.Set((
OCI_Connection*)*
this, reinterpret_cast<CallbackPointer>(handler));
1307 Acquire(trans, 0, 0);
1356 Acquire(pDate, 0, parent);
1368 inline int Date::Compare(
const Date& other)
const
1380 int year, month, day;
1389 int year, month, day;
1397 int year, month, day;
1406 int year, month, day;
1414 int year, month, day;
1423 int year, month, day;
1431 int hour, minutes, seconds;
1433 GetTime(hour, minutes, seconds);
1440 int hour, minutes, seconds;
1442 GetTime(hour, minutes, seconds);
1443 SetTime(value, minutes, seconds);
1448 int hour, minutes, seconds;
1450 GetTime(hour, minutes, seconds);
1457 int hour, minutes, seconds;
1459 GetTime(hour, minutes, seconds);
1460 SetTime(hour, value, seconds);
1465 int hour, minutes, seconds;
1467 GetTime(hour, minutes, seconds);
1474 int hour, minutes, seconds;
1476 GetTime(hour, minutes, seconds);
1477 SetTime(hour, minutes, value);
1560 size_t size = OCI_SIZE_BUFFER;
1562 ManagedBuffer<otext> buffer(size + 1);
1566 return MakeString(static_cast<const otext *>(buffer));
1605 return result += value;
1611 return result -= value;
1628 return Compare(other) == 0;
1633 return (!(*
this == other));
1638 return (Compare(other) > 0);
1643 return (Compare(other) < 0);
1648 int res = Compare(other);
1650 return (res == 0 || res < 0);
1655 int res = Compare(other);
1657 return (res == 0 || res > 0);
1671 Acquire(pInterval, 0, parent);
1683 inline int Interval::Compare(
const Interval& other)
const
1734 int day, hour, minutes, seconds, milliseconds;
1736 GetDaySecond(day, hour, minutes, seconds, milliseconds);
1743 int day, hour, minutes, seconds, milliseconds;
1745 GetDaySecond(day, hour, minutes, seconds, milliseconds);
1746 SetDaySecond(value, hour, minutes, seconds, milliseconds);
1751 int day, hour, minutes, seconds, milliseconds;
1753 GetDaySecond(day, hour, minutes, seconds, milliseconds);
1760 int day, hour, minutes, seconds, milliseconds;
1762 GetDaySecond(day, hour, minutes, seconds, milliseconds);
1763 SetDaySecond(day, value, minutes, seconds, milliseconds);
1768 int day, hour, minutes, seconds, milliseconds;
1770 GetDaySecond(day, hour, minutes, seconds, milliseconds);
1777 int day, hour, minutes, seconds, milliseconds;
1779 GetDaySecond(day, hour, minutes, seconds, milliseconds);
1785 int day, hour, minutes, seconds, milliseconds;
1787 GetDaySecond(day, hour, minutes, seconds, milliseconds);
1794 int day, hour, minutes, seconds, milliseconds;
1796 GetDaySecond(day, hour, minutes, seconds, milliseconds);
1802 int day, hour, minutes, seconds, milliseconds;
1804 GetDaySecond(day, hour, minutes, seconds, milliseconds);
1806 return milliseconds;
1811 int day, hour, minutes, seconds, milliseconds;
1813 GetDaySecond(day, hour, minutes, seconds, milliseconds);
1848 size_t size = OCI_SIZE_BUFFER;
1850 ManagedBuffer<otext> buffer(size + 1);
1854 return MakeString(static_cast<const otext *>(buffer));
1865 return result += other;
1871 return result -= other;
1888 return Compare(other) == 0;
1893 return (!(*
this == other));
1898 return (Compare(other) > 0);
1903 return (Compare(other) < 0);
1908 int res = Compare(other);
1910 return (res == 0 || res < 0);
1915 int res = Compare(other);
1917 return (res == 0 || res > 0);
1924 inline Timestamp::Timestamp(TimestampType type)
1929 inline Timestamp::Timestamp(
OCI_Timestamp *pTimestamp, Handle *parent)
1931 Acquire(pTimestamp, 0, parent);
1943 inline int Timestamp::Compare(
const Timestamp& other)
const
1970 int year, month, day;
1979 int year, month, day;
1987 int year, month, day;
1996 int year, month, day;
2004 int year, month, day;
2013 int year, month, day;
2021 int hour, minutes, seconds, milliseconds;
2023 GetTime(hour, minutes, seconds, milliseconds);
2030 int hour, minutes, seconds, milliseconds;
2032 GetTime(hour, minutes, seconds, milliseconds);
2033 SetTime(value, minutes, seconds, milliseconds);
2038 int hour, minutes, seconds, milliseconds;
2040 GetTime(hour, minutes, seconds, milliseconds);
2047 int hour, minutes, seconds, milliseconds;
2049 GetTime(hour, minutes, seconds, milliseconds);
2050 SetTime(hour, value, seconds, milliseconds);
2055 int hour, minutes, seconds, milliseconds;
2057 GetTime(hour, minutes, seconds, milliseconds);
2064 int hour, minutes, seconds, milliseconds;
2066 GetTime(hour, minutes, seconds, milliseconds);
2067 SetTime(hour, minutes, value, milliseconds);
2072 int hour, minutes, seconds, milliseconds;
2074 GetTime(hour, minutes, seconds, milliseconds);
2076 return milliseconds;
2081 int hour, minutes, seconds, milliseconds;
2083 GetTime(hour, minutes, seconds, milliseconds);
2084 SetTime(hour, minutes, seconds, value);
2104 int tmpYear, tmpMonth, tempDay, hour, minutes, seconds, milliseconds;
2106 GetDateTime(year, month, day, hour, tmpYear, tmpMonth, tempDay);
2107 SetDateTime(year, month, day, hour, minutes, seconds, milliseconds);
2112 int year, month, day, tmpHour, tmpMinutes, tmpSeconds, tmpMilliseconds;
2114 GetDateTime(year, month, day, tmpHour, tmpMinutes, tmpSeconds, tmpMilliseconds);
2115 SetDateTime(year, month, day, hour, min, sec, fsec);
2122 int year, month, day, hour, minutes, seconds, milliseconds;
2124 GetDateTime(year, month, day, hour, minutes, seconds, milliseconds);
2125 SetDateTime(year, month, day, hour, minutes, seconds, milliseconds, timeZone);
2133 size_t size = OCI_SIZE_BUFFER;
2135 ManagedBuffer<otext> buffer(size + 1);
2139 return MakeString(static_cast<const otext *>(buffer));
2169 size_t size = OCI_SIZE_BUFFER;
2171 ManagedBuffer<otext> buffer(size + 1);
2175 return MakeString(static_cast<const otext *>(buffer));
2216 return result += value;
2224 return result -= value;
2237 return result += other;
2243 return result -= other;
2262 return *
this += interval;
2269 return *
this -= interval;
2274 return Compare(other) == 0;
2279 return (!(*
this == other));
2284 return (Compare(other) > 0);
2289 return (Compare(other) < 0);
2294 int res = Compare(other);
2296 return (res == 0 || res < 0);
2301 int res = Compare(other);
2303 return (res == 0 || res > 0);
2310 template<
class TLobObjectType,
int TLobOracleType>
2316 template<
class TLobObjectType,
int TLobOracleType>
2319 Acquire(pLob, 0, parent);
2325 ManagedBuffer<otext> buffer(length + 1);
2329 return MakeString(static_cast<const otext *>(buffer));
2335 ManagedBuffer<otext> buffer(length + 1);
2339 return MakeString(static_cast<const otext *>(buffer));
2345 ManagedBuffer<unsigned char> buffer(length + 1);
2347 length =
Check(
OCI_LobRead(*
this, static_cast<AnyPointer>(buffer), length));
2349 return MakeRaw(buffer, length);
2352 template<
class TLobObjectType,
int TLobOracleType>
2355 return Check(
OCI_LobWrite(*
this, static_cast<AnyPointer>(const_cast<typename TLobObjectType::value_type *>(content.data())),
static_cast<unsigned int>(content.size())));
2358 template<
class TLobObjectType,
int TLobOracleType>
2364 template<
class TLobObjectType,
int TLobOracleType>
2367 return Check(
OCI_LobAppend(*
this, static_cast<AnyPointer>(const_cast<typename TLobObjectType::value_type *>(content.data())),
static_cast<unsigned int>(content.size())));
2370 template<
class TLobObjectType,
int TLobOracleType>
2376 template<
class TLobObjectType,
int TLobOracleType>
2379 Lob result(GetConnection());
2386 template<
class TLobObjectType,
int TLobOracleType>
2392 template<
class TLobObjectType,
int TLobOracleType>
2398 template<
class TLobObjectType,
int TLobOracleType>
2404 template<
class TLobObjectType,
int TLobOracleType>
2410 template<
class TLobObjectType,
int TLobOracleType>
2416 template<
class TLobObjectType,
int TLobOracleType>
2422 template<
class TLobObjectType,
int TLobOracleType>
2428 template<
class TLobObjectType,
int TLobOracleType>
2434 template<
class TLobObjectType,
int TLobOracleType>
2440 template<
class TLobObjectType,
int TLobOracleType>
2446 template<
class TLobObjectType,
int TLobOracleType>
2452 template<
class TLobObjectType,
int TLobOracleType>
2458 template<
class TLobObjectType,
int TLobOracleType>
2464 template<
class TLobObjectType,
int TLobOracleType>
2470 template<
class TLobObjectType,
int TLobOracleType>
2476 template<
class TLobObjectType,
int TLobOracleType>
2482 template<
class TLobObjectType,
int TLobOracleType>
2489 template<
class TLobObjectType,
int TLobOracleType>
2492 return Equals(other);
2495 template<
class TLobObjectType,
int TLobOracleType>
2498 return (!(*
this == other));
2519 Acquire(pFile, 0, parent);
2524 ManagedBuffer<unsigned char> buffer(size + 1);
2545 inline bool File::Equals(
const File &other)
const
2602 return Equals(other);
2607 return (!(*
this == other));
2616 Acquire(
Check(
OCI_TypeInfoGet(connection, name.c_str(), type)),
reinterpret_cast<HandleFreeFunc
>(0), connection.GetHandle());
2621 Acquire(pTypeInfo, 0, 0);
2629 inline ostring TypeInfo::GetName()
const
2661 Acquire(pObject, 0, parent);
2706 inline short Object::Get<short>(
const ostring& name)
const
2712 inline unsigned short Object::Get<unsigned short>(
const ostring& name)
const
2718 inline int Object::Get<int>(
const ostring& name)
const
2724 inline unsigned int Object::Get<unsigned int>(
const ostring& name)
const
2736 inline big_uint Object::Get<big_uint>(
const ostring& name)
const
2742 inline float Object::Get<float>(
const ostring& name)
const
2748 inline double Object::Get<double>(
const ostring& name)
const
2760 inline Date Object::Get<Date>(
const ostring& name)
const
2766 inline Timestamp Object::Get<Timestamp>(
const ostring& name)
const
2772 inline Interval Object::Get<Interval>(
const ostring& name)
const
2778 inline Object Object::Get<Object>(
const ostring& name)
const
2784 inline Reference Object::Get<Reference>(
const ostring& name)
const
2790 inline Clob Object::Get<Clob>(
const ostring& name)
const
2796 inline NClob Object::Get<NClob>(
const ostring& name)
const
2803 inline Blob Object::Get<Blob>(
const ostring& name)
const
2809 inline File Object::Get<File>(
const ostring& name)
const
2815 inline Raw Object::Get<Raw>(
const ostring& name)
const
2819 ManagedBuffer<unsigned char> buffer(size + 1);
2826 template<
class TDataType>
2833 inline void Object::Set<short>(
const ostring& name,
const short &value)
2839 inline void Object::Set<unsigned short>(
const ostring& name,
const unsigned short &value)
2845 inline void Object::Set<int>(
const ostring& name,
const int &value)
2851 inline void Object::Set<unsigned int>(
const ostring& name,
const unsigned int &value)
2857 inline void Object::Set<big_int>(
const ostring& name,
const big_int &value)
2863 inline void Object::Set<big_uint>(
const ostring& name,
const big_uint &value)
2869 inline void Object::Set<float>(
const ostring& name,
const float &value)
2875 inline void Object::Set<double>(
const ostring& name,
const double &value)
2881 inline void Object::Set<ostring>(
const ostring& name,
const ostring &value)
2887 inline void Object::Set<Date>(
const ostring& name,
const Date &value)
2893 inline void Object::Set<Timestamp>(
const ostring& name,
const Timestamp &value)
2899 inline void Object::Set<Interval>(
const ostring& name,
const Interval &value)
2905 inline void Object::Set<Object>(
const ostring& name,
const Object &value)
2911 inline void Object::Set<Reference>(
const ostring& name,
const Reference &value)
2917 inline void Object::Set<Clob>(
const ostring& name,
const Clob &value)
2923 inline void Object::Set<NClob>(
const ostring& name,
const NClob &value)
2929 inline void Object::Set<Blob>(
const ostring& name,
const Blob &value)
2935 inline void Object::Set<File>(
const ostring& name,
const File &value)
2941 inline void Object::Set<Raw>(
const ostring& name,
const Raw &value)
2943 Check(
OCI_ObjectSetRaw(*
this, name.c_str(),
static_cast<AnyPointer>(
const_cast<Raw::value_type *
>(value.data())),
static_cast<unsigned int>(value.size())));
2946 template<
class TDataType>
2954 unsigned int len = 0;
2958 ManagedBuffer<otext> buffer(len + 1);
2962 return MakeString(static_cast<const otext *>(buffer));
2982 Acquire(pRef, 0, parent);
3018 ManagedBuffer<otext> buffer(size + 1);
3022 return MakeString(static_cast<const otext *>(buffer));
3034 template<
class TDataType>
3040 template<
class TDataType>
3043 Acquire(pColl, 0, parent);
3046 template<
class TDataType>
3056 template<
class TDataType>
3062 template<
class TDataType>
3068 template<
class TDataType>
3074 template<
class TDataType>
3081 template<
class TDataType>
3088 template<
class TDataType>
3094 template<
class TDataType>
3100 template<
class TDataType>
3106 template<
class TDataType>
3112 template<
class TDataType>
3119 template <
class TDataType>
3125 template <
class TDataType>
3128 return Iterator(*
this, GetCount() + 1);
3131 template <
class TDataType>
3137 template <
class TDataType>
3142 SetElem(elem, data);
3147 template <
class TDataType>
3152 SetElem(elem, value);
3161 ARG_NOT_USED(parent);
3167 inline unsigned short Collection<unsigned short>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3169 ARG_NOT_USED(parent);
3175 inline int Collection<int>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3177 ARG_NOT_USED(parent);
3183 inline unsigned int Collection<unsigned int>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3185 ARG_NOT_USED(parent);
3191 inline big_int Collection<big_int>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3193 ARG_NOT_USED(parent);
3199 inline big_uint Collection<big_uint>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3201 ARG_NOT_USED(parent);
3207 inline float Collection<float>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3209 ARG_NOT_USED(parent);
3215 inline double Collection<double>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3217 ARG_NOT_USED(parent);
3223 inline ostring Collection<ostring>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3225 ARG_NOT_USED(parent);
3231 inline Raw Collection<Raw>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3233 ARG_NOT_USED(parent);
3237 ManagedBuffer<unsigned char> buffer(size + 1);
3245 inline Date Collection<Date>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3251 inline Timestamp Collection<Timestamp>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3257 inline Interval Collection<Interval>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3263 inline Object Collection<Object>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3269 inline Reference Collection<Reference>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3275 inline Clob Collection<Clob>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3281 inline NClob Collection<NClob>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3286 inline Blob Collection<Blob>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3292 inline File Collection<File>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3297 template<
class TDataType>
3298 inline TDataType Collection<TDataType>::GetElem(
OCI_Elem *elem, Handle *parent)
const
3304 inline void Collection<short>::SetElem(
OCI_Elem *elem,
const short &value)
3310 inline void Collection<unsigned short>::SetElem(
OCI_Elem *elem,
const unsigned short &value)
3316 inline void Collection<int>::SetElem(
OCI_Elem *elem,
const int &value)
3322 inline void Collection<unsigned int>::SetElem(
OCI_Elem *elem,
const unsigned int &value)
3328 inline void Collection<big_int>::SetElem(
OCI_Elem *elem,
const big_int &value)
3334 inline void Collection<big_uint>::SetElem(
OCI_Elem *elem,
const big_uint &value)
3340 inline void Collection<float>::SetElem(
OCI_Elem *elem,
const float &value)
3346 inline void Collection<double>::SetElem(
OCI_Elem *elem,
const double &value)
3352 inline void Collection<ostring>::SetElem(
OCI_Elem *elem,
const ostring& value)
3358 inline void Collection<Raw>::SetElem(
OCI_Elem *elem,
const Raw &value)
3360 Check(
OCI_ElemSetRaw(elem, static_cast<AnyPointer>(const_cast<Raw::value_type *>(value.data())),
static_cast<unsigned int>(value.size())));
3364 inline void Collection<Date>::SetElem(
OCI_Elem *elem,
const Date &value)
3370 inline void Collection<Timestamp>::SetElem(
OCI_Elem *elem,
const Timestamp &value)
3376 inline void Collection<Interval>::SetElem(
OCI_Elem *elem,
const Interval &value)
3382 inline void Collection<Object>::SetElem(
OCI_Elem *elem,
const Object &value)
3388 inline void Collection<Reference>::SetElem(
OCI_Elem *elem,
const Reference &value)
3394 inline void Collection<Clob>::SetElem(
OCI_Elem *elem,
const Clob &value)
3400 inline void Collection<NClob>::SetElem(
OCI_Elem *elem,
const NClob &value)
3406 inline void Collection<Blob>::SetElem(
OCI_Elem *elem,
const Blob &value)
3412 inline void Collection<File>::SetElem(
OCI_Elem *elem,
const File &value)
3417 template <
class TDataType>
3418 inline void Collection<TDataType>::SetElem(
OCI_Elem *elem,
const TDataType &value)
3423 template<
class TDataType>
3426 unsigned int len = 0;
3430 ManagedBuffer<otext> buffer(len + 1);
3434 return MakeString(static_cast<const otext *>(buffer));
3437 template<
class TDataType>
3443 template<
class TDataType>
3449 template<
class TDataType>
3454 template<
class TDataType>
3455 inline Collection<TDataType>::Iterator::Iterator(
const Iterator& other) : _elem(other._elem)
3459 template<
class TDataType>
3460 inline bool Collection<TDataType>::Iterator::operator== (
const Iterator& other)
3462 return _elem._pos == other._elem._pos && ((
OCI_Coll *)(_elem._coll)) == ((
OCI_Coll *)(other._elem._coll));
3466 template<
class TDataType>
3467 inline bool Collection<TDataType>::Iterator::operator!= (
const Iterator& other)
3469 return !(*
this == other);
3472 template<
class TDataType>
3473 inline typename Collection<TDataType>::Element& Collection<TDataType>::Iterator::operator*()
3478 template<
class TDataType>
3479 inline typename Collection<TDataType>::Iterator & Collection<TDataType>::Iterator::operator--()
3485 template<
class TDataType>
3486 inline typename Collection<TDataType>::Iterator Collection<TDataType>::Iterator::operator--(
int)
3488 Iterator old(*
this);
3493 template<
class TDataType>
3494 inline typename Collection<TDataType>::Iterator & Collection<TDataType>::Iterator::operator++()
3500 template<
class TDataType>
3501 inline typename Collection<TDataType>::Iterator Collection<TDataType>::Iterator::operator++(
int)
3503 Iterator old(*
this);
3508 template<
class TDataType>
3509 inline Collection<TDataType>::Element::Element(Collection &coll,
unsigned int pos) : _coll(coll), _pos(pos)
3514 template<
class TDataType>
3515 inline Collection<TDataType>::Element::operator TDataType()
const
3517 return _coll.Get(_pos);
3520 template<
class TDataType>
3521 inline typename Collection<TDataType>::Element& Collection<TDataType>::Element::operator = (TDataType value)
3523 _coll.
Set(_pos, value);
3527 template<
class TDataType>
3528 inline bool Collection<TDataType>::Element::IsNull()
const
3530 return _coll->IsElementNull(_pos);
3533 template<
class TDataType>
3534 inline void Collection<TDataType>::Element::SetNull()
3536 _coll->SetElementNull(_pos);
3543 template<
class TLongObjectType,
int TLongOracleType>
3549 template<
class TLongObjectType,
int TLongOracleType>
3552 Acquire(pLong, 0, parent);
3555 template<
class TLongObjectType,
int TLongOracleType>
3558 return Check(
OCI_LongWrite(*
this, static_cast<AnyPointer>(const_cast<typename TLongObjectType::value_type *>(content.data())),
static_cast<unsigned int>(content.size())));
3561 template<
class TLongObjectType,
int TLongOracleType>
3607 template<
class TValueType>
3608 inline BindValue<TValueType>::BindValue() : _value(0)
3613 template<
class TValueType>
3614 inline BindValue<TValueType>::BindValue(TValueType value) : _value(value)
3619 template<
class TValueType>
3620 inline BindValue<TValueType>::operator TValueType()
const
3629 inline BindObject::BindObject(
const Statement &statement,
const ostring& name) : _name(name), _pStatement(statement)
3633 inline BindObject::~BindObject()
3637 inline ostring BindObject::GetName()
const
3642 inline Statement BindObject::GetStatement()
const
3644 return Statement(_pStatement);
3651 inline BindArray::BindArray(
const Statement &statement,
const ostring& name) : BindObject(statement, name), _object(0)
3656 template <
class TObjectType,
class TDataType>
3657 inline void BindArray::SetVector(std::vector<TObjectType> & vector,
unsigned int mode,
unsigned int elemSize)
3659 _object =
new BindArrayObject<TObjectType, TDataType>(GetStatement(), GetName(), vector, mode, elemSize);
3662 inline BindArray::~BindArray()
3667 template <
class TObjectType,
class TDataType>
3668 inline TDataType * BindArray::GetData ()
const
3670 return static_cast<TDataType *
>(*(
dynamic_cast< BindArrayObject<TObjectType, TDataType> *
> (_object)));
3673 inline void BindArray::SetInData()
3675 _object->SetInData();
3678 inline void BindArray::SetOutData()
3680 _object->SetOutData();
3683 template <
class TObjectType,
class TDataType>
3684 inline BindArray::BindArrayObject<TObjectType, TDataType>::BindArrayObject(
const Statement &statement,
const ostring& name, std::vector<TObjectType> &vector,
unsigned int mode,
unsigned int elemSize)
3685 : _pStatement(statement), _name(name), _vector(vector), _data(0), _mode(mode), _elemCount(statement.GetBindArraySize()), _elemSize(elemSize)
3690 template <
class TObjectType,
class TDataType>
3691 inline BindArray::BindArrayObject<TObjectType, TDataType>::~BindArrayObject()
3696 template <
class TObjectType,
class TDataType>
3697 inline void BindArray::BindArrayObject<TObjectType, TDataType>::AllocData()
3699 _data =
new TDataType[_elemCount];
3703 inline void BindArray::BindArrayObject<ostring, otext>::AllocData()
3705 _data =
new otext[_elemSize * _elemCount];
3707 memset(_data, 0, _elemSize * _elemCount *
sizeof(otext));
3710 template <
class TObjectType,
class TDataType>
3711 inline void BindArray::BindArrayObject<TObjectType, TDataType>::FreeData()
3716 template <
class TObjectType,
class TDataType>
3717 inline void BindArray::BindArrayObject<TObjectType, TDataType>::SetInData()
3719 if (_mode & OCI_BDM_IN)
3721 typename std::vector<TObjectType>::iterator it, it_end;
3723 unsigned int index = 0;
3726 for (it = _vector.begin(), it_end = _vector.end(); it != it_end && index < _elemCount && index < currElemCount; it++, index++)
3728 _data[index] = BindValue<TDataType>( *it);
3734 inline void BindArray::BindArrayObject<ostring, otext>::SetInData()
3736 if (_mode & OCI_BDM_IN)
3738 std::vector<ostring>::iterator it, it_end;
3740 unsigned int index = 0;
3743 for (it = _vector.begin(), it_end = _vector.end(); it != it_end && index < _elemCount && index < currElemCount; it++, index++)
3747 memcpy( _data + (_elemSize * index), value.c_str(), (value.size() + 1) *
sizeof(otext));
3754 inline void BindArray::BindArrayObject<Raw, unsigned char>::SetInData()
3756 if (_mode & OCI_BDM_IN)
3758 std::vector<Raw>::iterator it, it_end;
3760 unsigned int index = 0;
3763 for (it = _vector.begin(), it_end = _vector.end(); it != it_end && index < _elemCount && index < currElemCount; it++, index++)
3767 memcpy(_data + (_elemSize * index), value.data(), (value.size() + 1) *
sizeof(otext));
3772 template <
class TObjectType,
class TDataType>
3773 inline void BindArray::BindArrayObject<TObjectType, TDataType>::SetOutData()
3775 if (_mode & OCI_BDM_OUT)
3777 typename std::vector<TObjectType>::iterator it, it_end;
3779 unsigned int index = 0;
3782 for (it = _vector.begin(), it_end = _vector.end(); it != it_end && index < _elemCount && index < currElemCount; it++, index++)
3784 TObjectType&
object = *it;
3786 object =
static_cast<TDataType
>(_data[index]);
3792 inline void BindArray::BindArrayObject<Raw, unsigned char>::SetOutData()
3794 if (_mode & OCI_BDM_OUT)
3796 std::vector<Raw>::iterator it, it_end;
3800 unsigned int index = 0;
3803 for (it = _vector.begin(), it_end = _vector.end(); it != it_end && index < _elemCount && index < currElemCount; it++, index++)
3805 unsigned char *currData = _data + (_elemSize * index);
3813 template <
class TObjectType,
class TDataType>
3814 inline ostring BindArray::BindArrayObject<TObjectType, TDataType>::GetName()
3819 template <
class TObjectType,
class TDataType>
3820 inline BindArray::BindArrayObject<TObjectType, TDataType>:: operator std::vector<TObjectType> & ()
const
3825 template <
class TObjectType,
class TDataType>
3826 inline BindArray::BindArrayObject<TObjectType, TDataType>:: operator TDataType * ()
const
3835 template <
class TNativeType,
class TObjectType>
3836 inline void BindAdaptor<TNativeType, TObjectType>::SetInData()
3838 size_t size = _object.size();
3845 memcpy(_data, _object.data(), size *
sizeof(TNativeType));
3850 template <
class TNativeType,
class TObjectType>
3851 inline void BindAdaptor<TNativeType, TObjectType>::SetOutData()
3853 _object.assign(_data, _data + _size);
3856 template <
class TNativeType,
class TObjectType>
3857 inline BindAdaptor<TNativeType, TObjectType>::BindAdaptor(
const Statement &statement,
const ostring& name, TObjectType &
object,
unsigned int size) :
3858 BindObject(statement, name),
3860 _data(new TNativeType[_size]),
3863 memset(_data, 0, _size *
sizeof(TNativeType));
3866 template <
class TNativeType,
class TObjectType>
3867 inline BindAdaptor<TNativeType, TObjectType>::~BindAdaptor()
3872 template <
class TNativeType,
class TObjectType>
3873 inline BindAdaptor<TNativeType, TObjectType>::operator TNativeType *()
const
3882 inline BindsHolder::BindsHolder(
const Statement &statement) : _bindObjects(), _pStatement(statement)
3887 inline BindsHolder::~BindsHolder()
3892 inline void BindsHolder::Clear()
3894 std::vector<BindObject *>::iterator it, it_end;
3896 for(it = _bindObjects.begin(), it_end = _bindObjects.end(); it != it_end; it++)
3902 inline void BindsHolder::AddBindObject(BindObject *bindObject)
3906 std::vector<BindObject *>::iterator it, it_end;
3908 for(it = _bindObjects.begin(), it_end = _bindObjects.end(); it != it_end; it++)
3910 if ((*it)->GetName() == bindObject->GetName())
3912 _bindObjects.erase(it);
3918 _bindObjects.push_back(bindObject);
3921 inline void BindsHolder::SetOutData()
3923 std::vector<BindObject *>::iterator it, it_end;
3925 for(it = _bindObjects.begin(), it_end = _bindObjects.end(); it != it_end; it++)
3927 (*it)->SetOutData();
3931 inline void BindsHolder::SetInData()
3933 std::vector<BindObject *>::iterator it, it_end;
3935 for(it = _bindObjects.begin(), it_end = _bindObjects.end(); it != it_end; it++)
3945 inline BindInfo::BindInfo(
OCI_Bind *pBind, Handle *parent)
3947 Acquire(pBind, 0, parent);
3960 inline unsigned int BindInfo::GetSubType()
const
3965 inline unsigned int BindInfo::GetDataCount()
const
3975 inline void BindInfo::SetDataNull(
bool value,
unsigned int index)
3987 inline bool BindInfo::IsDataNull(
unsigned int index)
const
4011 inline Statement::Statement(
OCI_Statement *stmt, Handle *parent)
4013 Acquire(stmt, reinterpret_cast<HandleFreeFunc>(parent ?
OCI_StatementFree : 0), parent);
4016 inline Statement::~Statement()
4018 if (_smartHandle && _smartHandle->IsLastHolder(
this))
4020 BindsHolder *bindsHolder = GetBindsHolder(
false);
4031 inline void Statement::Describe(
const ostring& sql)
4034 ReleaseResultsets();
4041 ReleaseResultsets();
4045 inline void Statement::Prepare(
const ostring& sql)
4048 ReleaseResultsets();
4052 inline void Statement::Execute()
4054 ReleaseResultsets();
4060 inline void Statement::Execute(
const ostring& sql)
4063 ReleaseResultsets();
4067 inline unsigned int Statement::GetAffectedRows()
const
4087 inline void Statement::SetBindArraySize(
unsigned int size)
4092 inline unsigned int Statement::GetBindArraySize()
const
4097 inline void Statement::AllowRebinding(
bool value)
4102 inline bool Statement::IsRebindingAllowed()
const
4107 inline unsigned int Statement::GetBindIndex(
const ostring& name)
const
4112 inline unsigned int Statement::GetBindCount()
const
4117 inline BindInfo Statement::GetBind(
unsigned int index)
const
4127 template <
typename TBindMethod,
class TDataType>
4130 Check(method(*
this, name.c_str(), &value));
4131 SetLastBindMode(mode);
4134 template <
typename TBindMethod,
class TObjectType,
class TDataType>
4135 inline void Statement::Bind (TBindMethod &method,
const ostring& name, TObjectType& value, BindValue<TDataType> datatype, BindInfo::BindDirection mode)
4137 ARG_NOT_USED(datatype);
4139 Check(method(*
this, name.c_str(), (TDataType) value));
4140 SetLastBindMode(mode);
4143 template <
typename TBindMethod,
class TObjectType,
class TDataType>
4144 inline void Statement::Bind (TBindMethod &method,
const ostring& name, std::vector<TObjectType> &values, BindValue<TDataType> datatype, BindInfo::BindDirection mode)
4146 ARG_NOT_USED(datatype);
4148 BindArray * bnd =
new BindArray(*
this, name);
4149 bnd->SetVector<TObjectType, TDataType>(values, mode,
sizeof(TDataType));
4151 if (method(*
this, name.c_str(),
static_cast<TDataType *
>(bnd->GetData<TObjectType, TDataType>()), 0))
4153 BindsHolder *bindsHolder = GetBindsHolder(
true);
4154 bindsHolder->AddBindObject(bnd);
4155 SetLastBindMode(mode);
4165 template <
typename TBindMethod,
class TObjectType,
class TDataType,
class TElemType>
4166 inline void Statement::Bind (TBindMethod &method,
const ostring& name, std::vector<TObjectType> &values, BindValue<TDataType> datatype, BindInfo::BindDirection mode, TElemType type)
4168 ARG_NOT_USED(datatype);
4170 BindArray * bnd =
new BindArray(*
this, name);
4171 bnd->SetVector<TObjectType, TDataType>(values, mode,
sizeof(TDataType));
4173 if (method(*
this, name.c_str(),
static_cast<TDataType *
>(bnd->GetData<TObjectType, TDataType>()), type, 0))
4175 BindsHolder *bindsHolder = GetBindsHolder(
true);
4176 bindsHolder->AddBindObject(bnd);
4177 SetLastBindMode(mode);
4188 inline void Statement::Bind<short>(
const ostring& name,
short &value, BindInfo::BindDirection mode)
4194 inline void Statement::Bind<unsigned short>(
const ostring& name,
unsigned short &value, BindInfo::BindDirection mode)
4200 inline void Statement::Bind<int>(
const ostring& name,
int &value, BindInfo::BindDirection mode)
4206 inline void Statement::Bind<unsigned int>(
const ostring& name,
unsigned int &value, BindInfo::BindDirection mode)
4212 inline void Statement::Bind<big_int>(
const ostring& name,
big_int &value, BindInfo::BindDirection mode)
4218 inline void Statement::Bind<big_uint>(
const ostring& name, big_uint &value, BindInfo::BindDirection mode)
4224 inline void Statement::Bind<float>(
const ostring& name,
float &value, BindInfo::BindDirection mode)
4230 inline void Statement::Bind<double>(
const ostring& name,
double &value, BindInfo::BindDirection mode)
4236 inline void Statement::Bind<Date>(
const ostring& name, Date &value, BindInfo::BindDirection mode)
4238 Bind(
OCI_BindDate, name, value, BindValue<OCI_Date *>(), mode);
4242 inline void Statement::Bind<Timestamp>(
const ostring& name, Timestamp &value, BindInfo::BindDirection mode)
4248 inline void Statement::Bind<Interval>(
const ostring& name, Interval &value, BindInfo::BindDirection mode)
4254 inline void Statement::Bind<Clob>(
const ostring& name,
Clob &value, BindInfo::BindDirection mode)
4256 Bind(
OCI_BindLob, name, value, BindValue<OCI_Lob *>(), mode);
4260 inline void Statement::Bind<NClob>(
const ostring& name,
NClob &value, BindInfo::BindDirection mode)
4262 Bind(
OCI_BindLob, name, value, BindValue<OCI_Lob *>(), mode);
4266 inline void Statement::Bind<Blob>(
const ostring& name,
Blob &value, BindInfo::BindDirection mode)
4268 Bind(
OCI_BindLob, name, value, BindValue<OCI_Lob *>(), mode);
4272 inline void Statement::Bind<File>(
const ostring& name, File &value, BindInfo::BindDirection mode)
4274 Bind(
OCI_BindFile, name, value, BindValue<OCI_File *>(), mode);
4278 inline void Statement::Bind<Object>(
const ostring& name, Object &value, BindInfo::BindDirection mode)
4280 Bind(
OCI_BindObject, name, value, BindValue<OCI_Object *>(), mode);
4284 inline void Statement::Bind<Reference>(
const ostring& name, Reference &value, BindInfo::BindDirection mode)
4286 Bind(
OCI_BindRef, name, value, BindValue<OCI_Ref *>(), mode);
4290 inline void Statement::Bind<Statement>(
const ostring& name, Statement &value, BindInfo::BindDirection mode)
4296 inline void Statement::Bind<Clong, unsigned int>(
const ostring& name,
Clong &value,
unsigned int maxSize, BindInfo::BindDirection mode)
4299 SetLastBindMode(mode);
4303 inline void Statement::Bind<Clong, int>(
const ostring& name,
Clong &value,
int maxSize, BindInfo::BindDirection mode)
4305 Bind<Clong, unsigned int>(name, value,
static_cast<unsigned int>(maxSize), mode);
4309 inline void Statement::Bind<Blong, unsigned int>(
const ostring& name,
Blong &value,
unsigned int maxSize, BindInfo::BindDirection mode)
4312 SetLastBindMode(mode);
4316 inline void Statement::Bind<Blong, int>(
const ostring& name,
Blong &value,
int maxSize, BindInfo::BindDirection mode)
4318 Bind<Blong, unsigned int>(name, value,
static_cast<unsigned int>(maxSize), mode);
4322 inline void Statement::Bind<ostring, unsigned int>(
const ostring& name,
ostring &value,
unsigned int maxSize, BindInfo::BindDirection mode)
4326 maxSize =
static_cast<unsigned int>(value.size());
4329 value.reserve(maxSize);
4331 BindAdaptor<otext, ostring> * bnd =
new BindAdaptor<otext, ostring>(*
this, name, value, maxSize + 1);
4333 if (
OCI_BindString(*
this, name.c_str(),
static_cast<otext *
>(*bnd), maxSize))
4335 BindsHolder *bindsHolder = GetBindsHolder(
true);
4336 bindsHolder->AddBindObject(bnd);
4337 SetLastBindMode(mode);
4348 inline void Statement::Bind<ostring, int>(
const ostring& name,
ostring &value,
int maxSize, BindInfo::BindDirection mode)
4350 Bind<ostring, unsigned int>(name, value,
static_cast<unsigned int>(maxSize), mode);
4354 inline void Statement::Bind<Raw, unsigned int>(
const ostring& name,
Raw &value,
unsigned int maxSize, BindInfo::BindDirection mode)
4358 maxSize =
static_cast<unsigned int>(value.size());
4361 value.reserve(maxSize);
4363 BindAdaptor<unsigned char, Raw> * bnd =
new BindAdaptor<unsigned char, Raw>(*
this, name, value, maxSize + 1);
4365 if (
OCI_BindRaw(*
this, name.c_str(),
static_cast<unsigned char *
>(*bnd), maxSize))
4367 BindsHolder *bindsHolder = GetBindsHolder(
true);
4368 bindsHolder->AddBindObject(bnd);
4369 SetLastBindMode(mode);
4380 inline void Statement::Bind<Raw, int>(
const ostring& name,
Raw &value,
int maxSize, BindInfo::BindDirection mode)
4382 Bind<Raw, unsigned int>(name, value,
static_cast<unsigned int>(maxSize), mode);
4386 inline void Statement::Bind<short>(
const ostring& name, std::vector<short> &values, BindInfo::BindDirection mode)
4392 inline void Statement::Bind<unsigned short>(
const ostring& name, std::vector<unsigned short> &values, BindInfo::BindDirection mode)
4398 inline void Statement::Bind<int>(
const ostring& name, std::vector<int> &values, BindInfo::BindDirection mode)
4404 inline void Statement::Bind<unsigned int>(
const ostring& name, std::vector<unsigned int> &values, BindInfo::BindDirection mode)
4410 inline void Statement::Bind<big_int>(
const ostring& name, std::vector<big_int> &values, BindInfo::BindDirection mode)
4416 inline void Statement::Bind<big_uint>(
const ostring& name, std::vector<big_uint> &values, BindInfo::BindDirection mode)
4422 inline void Statement::Bind<float>(
const ostring& name, std::vector<float> &values, BindInfo::BindDirection mode)
4428 inline void Statement::Bind<double>(
const ostring& name, std::vector<double> &values, BindInfo::BindDirection mode)
4434 inline void Statement::Bind<Date>(
const ostring& name, std::vector<Date> &values, BindInfo::BindDirection mode)
4439 template<
class TDataType>
4442 Bind(
OCI_BindColl, name, value, BindValue<OCI_Coll *>(), mode);
4452 inline void Statement::Bind<Timestamp, Timestamp::TimestampType>(
const ostring& name, std::vector<Timestamp> &values, Timestamp::TimestampType type, BindInfo::BindDirection mode)
4454 Bind<Timestamp, Timestamp::TimestampTypeValues>(name, values, type.GetValue(), mode);
4458 inline void Statement::Bind<Interval, Interval::IntervalTypeValues>(
const ostring& name, std::vector<Interval> &values, Interval::IntervalTypeValues type, BindInfo::BindDirection mode)
4464 inline void Statement::Bind<Interval, Interval::IntervalType>(
const ostring& name, std::vector<Interval> &values, Interval::IntervalType type, BindInfo::BindDirection mode)
4466 Bind<Interval, Interval::IntervalTypeValues>(name, values, type.GetValue(), mode);
4470 inline void Statement::Bind<Clob>(
const ostring& name, std::vector<Clob> &values, BindInfo::BindDirection mode)
4476 inline void Statement::Bind<NClob>(
const ostring& name, std::vector<NClob> &values, BindInfo::BindDirection mode)
4482 inline void Statement::Bind<Blob>(
const ostring& name, std::vector<Blob> &values, BindInfo::BindDirection mode)
4488 inline void Statement::Bind<File>(
const ostring& name, std::vector<File> &values, BindInfo::BindDirection mode)
4494 inline void Statement::Bind<Object>(
const ostring& name, std::vector<Object> &values, TypeInfo &typeInfo, BindInfo::BindDirection mode)
4496 Bind(
OCI_BindArrayOfObjects, name, values, BindValue<OCI_Object *>(), mode, static_cast<OCI_TypeInfo *>(typeInfo));
4500 inline void Statement::Bind<Reference>(
const ostring& name, std::vector<Reference> &values, TypeInfo &typeInfo, BindInfo::BindDirection mode)
4502 Bind(
OCI_BindArrayOfRefs, name, values, BindValue<OCI_Ref *>(), mode, static_cast<OCI_TypeInfo *>(typeInfo));
4506 inline void Statement::Bind<ostring, unsigned int>(
const ostring& name, std::vector<ostring> &values,
unsigned int maxSize, BindInfo::BindDirection mode)
4508 BindArray * bnd =
new BindArray(*
this, name);
4509 bnd->SetVector<
ostring, otext>(values, mode, maxSize+1);
4513 BindsHolder *bindsHolder = GetBindsHolder(
true);
4514 bindsHolder->AddBindObject(bnd);
4515 SetLastBindMode(mode);
4526 inline void Statement::Bind<ostring, int>(
const ostring& name, std::vector<ostring> &values,
int maxSize, BindInfo::BindDirection mode)
4528 Bind<ostring, unsigned int>(name, values, (
unsigned int) maxSize, mode);
4532 inline void Statement::Bind<Raw, unsigned int>(
const ostring& name, std::vector<Raw> &values,
unsigned int maxSize, BindInfo::BindDirection mode)
4534 BindArray * bnd =
new BindArray(*
this, name);
4535 bnd->SetVector<
Raw,
unsigned char>(values, mode, maxSize + 1);
4539 BindsHolder *bindsHolder = GetBindsHolder(
true);
4540 bindsHolder->AddBindObject(bnd);
4541 SetLastBindMode(mode);
4551 template<
class TDataType>
4554 Bind(
OCI_BindArrayOfColls, name, values, BindValue<OCI_Coll *>(), mode, static_cast<OCI_TypeInfo *>(typeInfo));
4558 inline void Statement::Register<unsigned short>(
const ostring& name)
4564 inline void Statement::Register<short>(
const ostring& name)
4570 inline void Statement::Register<unsigned int>(
const ostring& name)
4576 inline void Statement::Register<int>(
const ostring& name)
4582 inline void Statement::Register<big_uint>(
const ostring& name)
4588 inline void Statement::Register<big_int>(
const ostring& name)
4594 inline void Statement::Register<float>(
const ostring& name)
4600 inline void Statement::Register<double>(
const ostring& name)
4606 inline void Statement::Register<Date>(
const ostring& name)
4612 inline void Statement::Register<Timestamp, Timestamp::TimestampTypeValues>(
const ostring& name, Timestamp::TimestampTypeValues type)
4618 inline void Statement::Register<Timestamp, Timestamp::TimestampType>(
const ostring& name, Timestamp::TimestampType type)
4620 Register<Timestamp, Timestamp::TimestampTypeValues>(name, type.GetValue());
4624 inline void Statement::Register<Interval, Interval::IntervalTypeValues>(
const ostring& name, Interval::IntervalTypeValues type)
4630 inline void Statement::Register<Interval, Interval::IntervalType>(
const ostring& name, Interval::IntervalType type)
4632 Register<Interval, Interval::IntervalTypeValues>(name, type.GetValue());
4636 inline void Statement::Register<Clob>(
const ostring& name)
4642 inline void Statement::Register<NClob>(
const ostring& name)
4648 inline void Statement::Register<Blob>(
const ostring& name)
4654 inline void Statement::Register<File>(
const ostring& name)
4660 inline void Statement::Register<Object, TypeInfo>(
const ostring& name, TypeInfo& typeInfo)
4666 inline void Statement::Register<Reference, TypeInfo>(
const ostring& name, TypeInfo& typeInfo)
4672 inline void Statement::Register<ostring, unsigned int>(
const ostring& name,
unsigned int len)
4678 inline void Statement::Register<ostring, int>(
const ostring& name,
int len)
4680 Register<ostring, unsigned int>(name,
static_cast<unsigned int>(len));
4684 inline void Statement::Register<Raw, unsigned int>(
const ostring& name,
unsigned int len)
4690 inline void Statement::Register<Raw, int>(
const ostring& name,
int len)
4692 Register<Raw, unsigned int>(name,
static_cast<unsigned int>(len));
4701 inline unsigned int Statement::GetSqlErrorPos()
const
4726 inline void Statement::SetFetchSize(
unsigned int value)
4731 inline unsigned int Statement::GetFetchSize()
const
4736 inline void Statement::SetPrefetchSize(
unsigned int value)
4741 inline unsigned int Statement::GetPrefetchSize()
const
4746 inline void Statement::SetPrefetchMemory(
unsigned int value)
4751 inline unsigned int Statement::GetPrefetchMemory()
const
4756 inline void Statement::SetLongMaxSize(
unsigned int value)
4761 inline unsigned int Statement::GetLongMaxSize()
const
4776 inline unsigned int Statement::GetSQLCommand()
const
4786 inline void Statement::GetBatchErrors(std::vector<Exception> &exceptions)
4800 inline void Statement::ClearBinds()
4802 BindsHolder *bindsHolder = GetBindsHolder(
false);
4806 bindsHolder->Clear();
4810 inline void Statement::SetOutData()
4812 BindsHolder *bindsHolder = GetBindsHolder(
false);
4816 bindsHolder->SetOutData();
4820 inline void Statement::SetInData()
4822 BindsHolder *bindsHolder = GetBindsHolder(
false);
4826 bindsHolder->SetInData();
4830 inline void Statement::ReleaseResultsets()
4834 std::list<Handle *> &children = _smartHandle->GetChildren();
4836 size_t nbHandles = children.size();
4838 while (nbHandles-- > 0)
4840 Resultset::SmartHandle *smartHandle =
dynamic_cast<Resultset::SmartHandle *
>(*children.begin());
4844 smartHandle->DetachFromHolders();
4852 inline void Statement::SetLastBindMode(BindInfo::BindDirection mode)
4857 inline BindsHolder * Statement::GetBindsHolder(
bool create)
4859 BindsHolder * bindsHolder =
static_cast<BindsHolder *
>(_smartHandle->GetExtraInfos());
4861 if (bindsHolder == 0 && create)
4863 bindsHolder =
new BindsHolder(*
this);
4864 _smartHandle->SetExtraInfos(bindsHolder);
4874 inline Resultset::Resultset(
OCI_Resultset *resultset, Handle *parent)
4876 Acquire(resultset, 0, parent);
4879 inline bool Resultset::Next()
4884 inline bool Resultset::Prev()
4889 inline bool Resultset::First()
4894 inline bool Resultset::Last()
4904 inline unsigned int Resultset::GetCount()
const
4909 inline unsigned int Resultset::GetCurrentRow()
const
4914 inline unsigned int Resultset::GetColumnIndex(
const ostring& name)
const
4919 inline unsigned int Resultset::GetColumnCount()
const
4924 inline Column Resultset::GetColumn(
unsigned int index)
const
4934 inline bool Resultset::IsColumnNull(
unsigned int index)
const
4939 inline bool Resultset::IsColumnNull(
const ostring& name)
const
4949 inline bool Resultset::operator ++ (
int)
4954 inline bool Resultset::operator -- (
int)
4959 inline bool Resultset::operator += (
int offset)
4961 return Seek(Resultset::SeekRelative, offset);
4964 inline bool Resultset::operator -= (
int offset)
4966 return Seek(Resultset::SeekRelative, -offset);
4970 inline short Resultset::Get<short>(
unsigned int index)
const
4976 inline short Resultset::Get<short>(
const ostring& name)
const
4982 inline unsigned short Resultset::Get<unsigned short>(
unsigned int index)
const
4988 inline unsigned short Resultset::Get<unsigned short>(
const ostring& name)
const
4994 inline int Resultset::Get<int>(
unsigned int index)
const
5000 inline int Resultset::Get<int>(
const ostring& name)
const
5006 inline unsigned int Resultset::Get<unsigned int>(
unsigned int index)
const
5012 inline unsigned int Resultset::Get<unsigned int>(
const ostring& name)
const
5018 inline big_int Resultset::Get<big_int>(
unsigned int index)
const
5024 inline big_int Resultset::Get<big_int>(
const ostring& name)
const
5030 inline big_uint Resultset::Get<big_uint>(
unsigned int index)
const
5036 inline big_uint Resultset::Get<big_uint>(
const ostring& name)
const
5042 inline float Resultset::Get<float>(
unsigned int index)
const
5048 inline float Resultset::Get<float>(
const ostring& name)
const
5054 inline double Resultset::Get<double>(
unsigned int index)
const
5060 inline double Resultset::Get<double>(
const ostring& name)
const
5066 inline ostring Resultset::Get<ostring>(
unsigned int index)
const
5072 inline ostring Resultset::Get<ostring>(
const ostring& name)
const
5078 inline Raw Resultset::Get<Raw>(
unsigned int index)
const
5082 ManagedBuffer<unsigned char> buffer(size + 1);
5084 size =
Check(
OCI_GetRaw(*
this, index, static_cast<AnyPointer>(buffer), size));
5090 inline Raw Resultset::Get<Raw>(
const ostring& name)
const
5094 ManagedBuffer<unsigned char> buffer(size + 1);
5102 inline Date Resultset::Get<Date>(
unsigned int index)
const
5108 inline Date Resultset::Get<Date>(
const ostring& name)
const
5114 inline Timestamp Resultset::Get<Timestamp>(
unsigned int index)
const
5120 inline Timestamp Resultset::Get<Timestamp>(
const ostring& name)
const
5126 inline Interval Resultset::Get<Interval>(
unsigned int index)
const
5132 inline Interval Resultset::Get<Interval>(
const ostring& name)
const
5138 inline Object Resultset::Get<Object>(
unsigned int index)
const
5144 inline Object Resultset::Get<Object>(
const ostring& name)
const
5150 inline Reference Resultset::Get<Reference>(
unsigned int index)
const
5156 inline Reference Resultset::Get<Reference>(
const ostring& name)
const
5162 inline Statement Resultset::Get<Statement>(
unsigned int index)
const
5168 inline Statement Resultset::Get<Statement>(
const ostring& name)
const
5174 inline Clob Resultset::Get<Clob>(
unsigned int index)
const
5180 inline Clob Resultset::Get<Clob>(
const ostring& name)
const
5186 inline NClob Resultset::Get<NClob>(
unsigned int index)
const
5192 inline NClob Resultset::Get<NClob>(
const ostring& name)
const
5198 inline Blob Resultset::Get<Blob>(
unsigned int index)
const
5204 inline Blob Resultset::Get<Blob>(
const ostring& name)
const
5210 inline File Resultset::Get<File>(
unsigned int index)
const
5216 inline File Resultset::Get<File>(
const ostring& name)
const
5222 inline Clong Resultset::Get<Clong>(
unsigned int index)
const
5228 inline Clong Resultset::Get<Clong>(
const ostring& name)
const
5234 inline Blong Resultset::Get<Blong>(
unsigned int index)
const
5240 inline Blong Resultset::Get<Blong>(
const ostring& name)
const
5245 template<
class TDataType>
5246 inline TDataType Resultset::Get(
unsigned int index)
const
5251 template<
class TDataType>
5252 inline TDataType Resultset::Get(
const ostring& name)
const
5261 inline Column::Column(
OCI_Column *pColumn, Handle *parent)
5263 Acquire(pColumn, 0, parent);
5266 inline ostring Column::GetName()
const
5278 unsigned int size = OCI_SIZE_BUFFER;
5280 ManagedBuffer<otext> buffer(size + 1);
5284 return MakeString(static_cast<const otext *>(buffer));
5292 inline unsigned int Column::GetSubType()
const
5302 inline unsigned int Column::GetSize()
const
5307 inline int Column::GetScale()
const
5312 inline int Column::GetPrecision()
const
5317 inline int Column::GetFractionalPrecision()
const
5322 inline int Column::GetLeadingPrecision()
const
5332 inline bool Column::IsNullable()
const
5337 inline bool Column::IsCharSemanticUsed()
const
5351 inline Subscription::Subscription()
5358 Acquire(pSubcription, 0, 0);
5361 inline void Subscription::Register(
const Connection &connection,
const ostring& name,
ChangeTypes changeTypes, NotifyHandlerProc handler,
unsigned int port,
unsigned int timeout)
5364 static_cast<POCI_NOTIFY> (handler != 0 ? Environment::NotifyHandler : 0 ), port, timeout)),
5367 Environment::GetEnvironmentHandle().Callbacks.Set(static_cast<OCI_Subscription*>(*
this), reinterpret_cast<CallbackPointer>(handler));
5370 inline void Subscription::Unregister()
5372 Environment::GetEnvironmentHandle().Callbacks.Remove(*
this);
5376 inline void Subscription::Watch(
const ostring& sql)
5390 inline unsigned int Subscription::GetTimeout()
const
5395 inline unsigned int Subscription::GetPort()
const
5411 Acquire(pEvent, 0, 0);
5453 inline Agent::Agent(
OCI_Agent *pAgent, Handle *parent)
5455 Acquire(pAgent, 0, parent);
5473 inline void Agent::SetAddress(
const ostring& value)
5487 inline Message::Message(
OCI_Msg *pMessage, Handle *parent)
5489 Acquire(pMessage, 0, parent);
5492 inline void Message::Reset()
5498 inline Object Message::GetPayload<Object>()
5504 inline void Message::SetPayload<Object>(
const Object &value)
5510 inline Raw Message::GetPayload<Raw>()
5512 unsigned int size = 0;
5514 ManagedBuffer<unsigned char> buffer(size + 1);
5522 inline void Message::SetPayload<Raw>(
const Raw &value)
5524 Check(
OCI_MsgSetRaw(*
this, static_cast<AnyPointer>(const_cast<Raw::value_type *>(value.data())),
static_cast<unsigned int>(value.size())));
5527 inline Date Message::GetEnqueueTime()
const
5532 inline int Message::GetAttemptCount()
const
5542 inline Raw Message::GetID()
const
5544 unsigned int size = OCI_SIZE_BUFFER;
5546 ManagedBuffer<unsigned char> buffer(size + 1);
5553 inline int Message::GetExpiration()
const
5558 inline void Message::SetExpiration(
int value)
5563 inline int Message::GetEnqueueDelay()
const
5568 inline void Message::SetEnqueueDelay(
int value)
5573 inline int Message::GetPriority()
const
5578 inline void Message::SetPriority(
int value)
5583 inline Raw Message::GetOriginalID()
const
5585 unsigned int size = OCI_SIZE_BUFFER;
5587 ManagedBuffer<unsigned char> buffer(size + 1);
5594 inline void Message::SetOriginalID(
const Raw &value)
5596 Check(
OCI_MsgSetOriginalID(*
this, static_cast<AnyPointer>(const_cast<Raw::value_type *>(value.data())),
static_cast<unsigned int>(value.size())));
5604 inline void Message::SetCorrelation(
const ostring& value)
5614 inline void Message::SetExceptionQueue(
const ostring& value)
5624 inline void Message::SetSender(
const Agent &agent)
5629 inline void Message::SetConsumers(std::vector<Agent> &agents)
5631 size_t size = agents.size();
5632 ManagedBuffer<OCI_Agent*> buffer(size);
5636 for (
size_t i = 0; i < size; i++)
5638 pAgents[i] =
static_cast<const Agent &
>(agents[i]);
5678 inline Raw Enqueue::GetRelativeMsgID()
const
5680 unsigned int size = OCI_SIZE_BUFFER;
5682 ManagedBuffer<unsigned char> buffer(size + 1);
5689 inline void Enqueue::SetRelativeMsgID(
const Raw &value)
5705 Acquire(pDequeue, 0, 0);
5713 inline Agent Dequeue::Listen(
int timeout)
5723 inline void Dequeue::SetConsumer(
const ostring& value)
5733 inline void Dequeue::SetCorrelation(
const ostring& value)
5738 inline Raw Dequeue::GetRelativeMsgID()
const
5740 unsigned int size = OCI_SIZE_BUFFER;
5742 ManagedBuffer<unsigned char> buffer(size + 1);
5749 inline void Dequeue::SetRelativeMsgID(
const Raw &value)
5784 inline int Dequeue::GetWaitTime()
const
5789 inline void Dequeue::SetWaitTime(
int value)
5794 inline void Dequeue::SetAgents(std::vector<Agent> &agents)
5796 size_t size = agents.size();
5797 ManagedBuffer<OCI_Agent*> buffer(size);
5801 for (
size_t i = 0; i < size; i++)
5803 pAgents[i] =
static_cast<const Agent &
>(agents[i]);
5809 inline void Dequeue::Subscribe(
unsigned int port,
unsigned int timeout, NotifyAQHandlerProc handler)
5811 Check(
OCI_DequeueSubscribe(*
this, port, timeout, static_cast<POCI_NOTIFY_AQ>(handler != 0 ? Environment::NotifyHandlerAQ : 0 )));
5813 Environment::GetEnvironmentHandle().Callbacks.Set(static_cast<OCI_Dequeue*>(*
this), reinterpret_cast<CallbackPointer>(handler));
5816 inline void Dequeue::Unsubscribe()
5825 inline DirectPath::DirectPath(
const TypeInfo &typeInfo,
unsigned int nbCols,
unsigned int nbRows,
const ostring& partition)
5830 inline void DirectPath::SetColumn(
unsigned int colIndex,
const ostring& name,
unsigned int maxSize,
const ostring& format)
5835 template <
class TDataType>
5836 inline void DirectPath::SetEntry(
unsigned int rowIndex,
unsigned int colIndex,
const TDataType &value,
bool complete)
5838 Check(
OCI_DirPathSetEntry(*
this, rowIndex, colIndex, static_cast<const AnyPointer>(const_cast<typename TDataType::value_type *>(value.c_str())),
static_cast<unsigned int>(value.size()), complete));
5841 inline void DirectPath::Reset()
5846 inline void DirectPath::Prepare()
5861 inline void DirectPath::Finish()
5866 inline void DirectPath::Abort()
5871 inline void DirectPath::Save()
5876 inline void DirectPath::FlushRow()
5881 inline void DirectPath::SetCurrentRows(
unsigned int value)
5886 inline unsigned int DirectPath::GetCurrentRows()
const
5891 inline unsigned int DirectPath::GetMaxRows()
const
5896 inline unsigned int DirectPath::GetRowCount()
const
5901 inline unsigned int DirectPath::GetAffectedRows()
const
5906 inline void DirectPath::SetDateFormat(
const ostring& format)
5911 inline void DirectPath::SetParallel(
bool value)
5916 inline void DirectPath::SetNoLog(
bool value)
5921 inline void DirectPath::SetCacheSize(
unsigned int value)
5926 inline void DirectPath::SetBufferSize(
unsigned int value)
5936 inline unsigned int DirectPath::GetErrorColumn()
5941 inline unsigned int DirectPath::GetErrorRow()
5951 unsigned int retryDelay,
unsigned int retentionTime,
bool dependencyTracking,
const ostring& comment)
5953 Check(
OCI_QueueCreate(connection, queue.c_str(), table.c_str(), queueType, maxRetries, retryDelay, retentionTime, dependencyTracking, comment.c_str()));
5956 inline void Queue::Alter(
const Connection &connection,
const ostring& queue,
unsigned int maxRetries,
unsigned int retryDelay,
unsigned int retentionTime,
const ostring& comment)
5958 Check(
OCI_QueueAlter(connection, queue.c_str(), maxRetries, retryDelay, retentionTime, comment.c_str()));
5966 inline void Queue::Start(
const Connection &connection,
const ostring& queue,
bool enableEnqueue,
bool enableDequeue)
5971 inline void Queue::Stop(
const Connection &connection,
const ostring& queue,
bool stopEnqueue,
bool stopDequeue,
bool wait)
5981 GroupingMode groupingMode,
const ostring& comment,
unsigned int primaryInstance,
unsigned int secondaryInstance,
const ostring& compatible)
5984 Check(
OCI_QueueTableCreate(connection, table.c_str(), payloadType.c_str(), storageClause.c_str(), sortList.c_str(), multipleConsumers,
5985 groupingMode, comment.c_str(), primaryInstance, secondaryInstance, compatible.c_str()));
5988 inline void QueueTable::Alter(
const Connection &connection,
const ostring& table,
const ostring& comment,
unsigned int primaryInstance,
unsigned int secondaryInstance)
ostring GetServer() const
Return the Oracle server Hos name of the connected database/service name.
OCI_EXPORT OCI_Subscription *OCI_API OCI_EventGetSubscription(OCI_Event *event)
Return the subscription handle that generated this event.
Oracle Named types representation.
OCI_EXPORT boolean OCI_API OCI_ObjectSetFile(OCI_Object *obj, const otext *attr, OCI_File *value)
Set an object attribute of type File.
Transaction GetTransaction() const
Return the current transaction of the connection.
OCI_EXPORT boolean OCI_API OCI_BindUnsignedBigInt(OCI_Statement *stmt, const otext *name, big_uint *data)
Bind an unsigned big integer variable.
OCI_EXPORT unsigned int OCI_API OCI_GetLongMode(OCI_Statement *stmt)
Return the long datatype handling mode of a SQL statement.
OCI_EXPORT unsigned int OCI_API OCI_EnqueueGetVisibility(OCI_Enqueue *enqueue)
Get the enqueuing/locking behavior.
OCI_EXPORT OCI_Column *OCI_API OCI_GetColumn(OCI_Resultset *rs, unsigned int index)
Return the column object handle at the given index in the resultset.
Oracle Collection item representation.
Encapsulate a Resultset column or object member properties.
OCI_EXPORT int OCI_API OCI_ErrorGetInternalCode(OCI_Error *err)
Retrieve Internal Error code from error handle.
OCI_EXPORT big_int OCI_API OCI_ElemGetBigInt(OCI_Elem *elem)
Return the big int value of the given collection element.
void SetHours(int value)
Set the interval hours value.
OCI_EXPORT const otext *OCI_API OCI_GetVersionServer(OCI_Connection *con)
Return the connected database server version.
OCI_EXPORT boolean OCI_API OCI_DateLastDay(OCI_Date *date)
Place the last day of month (from the given date) into the given date.
Interval Clone() const
Clone the current instance to a new one performing deep copy.
int GetMilliSeconds() const
Return the interval seconds value.
OCI_EXPORT boolean OCI_API OCI_MsgGetID(OCI_Msg *msg, void *id, unsigned int *len)
Return the ID of the message.
ObjectType GetType() const
Return the type of the given object.
bool operator>(const Date &other) const
Indicates if the current date value is superior to the given date value.
OCI_EXPORT boolean OCI_API OCI_ConnectionFree(OCI_Connection *con)
Close a physical connection to an Oracle database server.
Lob< Raw, LobBinary > Blob
Class handling BLOB oracle type.
TypeInfo GetTypeInfo() const
Return the TypeInfo object describing the referenced object.
OCI_EXPORT boolean OCI_API OCI_QueueStart(OCI_Connection *con, const otext *queue_name, boolean enqueue, boolean dequeue)
Start the given queue.
OCI_EXPORT boolean OCI_API OCI_DequeueSubscribe(OCI_Dequeue *dequeue, unsigned int port, unsigned int timeout, POCI_NOTIFY_AQ callback)
Subscribe for asynchronous messages notifications.
OCI_EXPORT const otext *OCI_API OCI_ServerGetOutput(OCI_Connection *con)
Retrieve one line of the server buffer.
OCI_EXPORT boolean OCI_API OCI_ColumnGetCharUsed(OCI_Column *col)
Return TRUE if the length of the column is character-length or FALSE if it is byte-length.
OCI_EXPORT boolean OCI_API OCI_SubscriptionUnregister(OCI_Subscription *sub)
Unregister a previously registered notification.
long long big_int
big_int is a C scalar integer (32 or 64 bits) depending on compiler support for 64bits integers...
OCI_EXPORT unsigned int OCI_API OCI_LobGetType(OCI_Lob *lob)
Return the type of the given Lob object.
void Open(const ostring &db, const ostring &user, const ostring &pwd, Pool::PoolType poolType, unsigned int minSize, unsigned int maxSize, unsigned int increment=1, Environment::SessionFlags sessionFlags=Environment::SessionDefault)
Create an Oracle pool of connections or sessions.
static void Initialize(EnvironmentFlags mode=Environment::Default, const ostring &libpath=OTEXT(""))
Initialize the OCILIB environment.
OCI_EXPORT boolean OCI_API OCI_CollClear(OCI_Coll *coll)
clear all items of the given collection
OCI_EXPORT boolean OCI_API OCI_BindSetNullAtPos(OCI_Bind *bnd, unsigned int position)
Set to null the entry in the bind variable input array.
OCI_EXPORT OCI_Object *OCI_API OCI_ObjectCreate(OCI_Connection *con, OCI_TypeInfo *typinf)
Create a local object instance.
Timestamp & operator-=(int value)
Decrement the Timestamp by the given number of days.
OCI_EXPORT unsigned int OCI_API OCI_MsgGetState(OCI_Msg *msg)
Return the state of the message at the time of the dequeue.
OCI_EXPORT boolean OCI_API OCI_ElemSetNull(OCI_Elem *elem)
Set a collection element value to null.
int GetHours() const
Return the timestamp hours value.
OCI_EXPORT boolean OCI_API OCI_ObjectSetLob(OCI_Object *obj, const otext *attr, OCI_Lob *value)
Set an object attribute of type Lob.
OCI_EXPORT boolean OCI_API OCI_ExecuteStmt(OCI_Statement *stmt, const otext *sql)
Prepare and Execute a SQL statement or PL/SQL block.
int GetYear() const
Return the date year value.
ostring ToString(const ostring &format=OCI_STRING_FORMAT_DATE, int precision=0) const
Convert the timestamp value to a string.
OCI_EXPORT boolean OCI_API OCI_ObjectSetNull(OCI_Object *obj, const otext *attr)
Set an object attribute to null.
bool IsElementNull(unsigned int index) const
check if the element at the given index is null
OCI_EXPORT OCI_Column *OCI_API OCI_GetColumn2(OCI_Resultset *rs, const otext *name)
Return the column object handle from its name in the resultset.
OCI_EXPORT boolean OCI_API OCI_DateAddDays(OCI_Date *date, int nb)
Add or subtract days to a date handle.
OCI_EXPORT boolean OCI_API OCI_RegisterUnsignedShort(OCI_Statement *stmt, const otext *name)
Register an unsigned short output bind placeholder.
void Truncate(big_uint length)
Truncate the lob to a shorter length.
OCI_EXPORT boolean OCI_API OCI_RegisterUnsignedBigInt(OCI_Statement *stmt, const otext *name)
Register an unsigned big integer output bind placeholder.
void(* NotifyAQHandlerProc)(Dequeue &dequeue)
User callback for dequeue event notifications.
OCI_EXPORT boolean OCI_API OCI_EnqueueSetRelativeMsgID(OCI_Enqueue *enqueue, const void *id, unsigned int len)
Set a message identifier to use for enqueuing messages using a sequence deviation.
unsigned int GetTimeout() const
Return the transaction Timeout.
OCI_EXPORT boolean OCI_API OCI_RegisterFile(OCI_Statement *stmt, const otext *name, unsigned int type)
Register a file output bind placeholder.
void SetTAFHandler(TAFHandlerProc handler)
Set the Transparent Application Failover (TAF) user handler.
OCI_EXPORT unsigned int OCI_API OCI_GetPrefetchSize(OCI_Statement *stmt)
Return the number of rows pre-fetched by OCI Client.
OCI_EXPORT boolean OCI_API OCI_RegisterDate(OCI_Statement *stmt, const otext *name)
Register a date output bind placeholder.
static void EnableWarnings(bool value)
Enable or disable Oracle warning notifications.
Date operator-(int value)
Return a new date holding the current date value decremented by the given number of days...
OCI_EXPORT OCI_Statement *OCI_API OCI_StatementCreate(OCI_Connection *con)
Create a statement object and return its handle.
OCI_EXPORT boolean OCI_API OCI_ServerDisableOutput(OCI_Connection *con)
Disable the server output.
OCI_EXPORT boolean OCI_API OCI_BindUnsignedInt(OCI_Statement *stmt, const otext *name, unsigned int *data)
Bind an unsigned integer variable.
OCI_EXPORT boolean OCI_API OCI_RefSetNull(OCI_Ref *ref)
Nullify the given Ref handle.
bool Delete(unsigned int index) const
Delete the element at the given position in the Nested Table Collection.
OCI_EXPORT int OCI_API OCI_ObjectGetInt(OCI_Object *obj, const otext *attr)
Return the integer value of the given object attribute.
OCI_EXPORT boolean OCI_API OCI_ThreadRun(OCI_Thread *thread, POCI_THREAD proc, void *arg)
Execute the given routine within the given thread object.
Reference Clone() const
Clone the current instance to a new one performing deep copy.
Timestamp operator-(int value)
Return a new Timestamp holding the current Timestamp value decremented by the given number of days...
Exception class handling all OCILIB errors.
OCI_EXPORT unsigned int OCI_API OCI_GetLongMaxSize(OCI_Statement *stmt)
Return the LONG data type piece buffer size.
void SetMinutes(int value)
Set the date minutes value.
OCI_EXPORT boolean OCI_API OCI_BindSetNotNullAtPos(OCI_Bind *bnd, unsigned int position)
Set to NOT null the entry in the bind variable input array.
int GetOracleErrorCode() const
Return the Oracle error code.
OCI_EXPORT unsigned int OCI_API OCI_IntervalGetType(OCI_Interval *itv)
Return the type of the given Interval object.
OCI_EXPORT boolean OCI_API OCI_SetDefaultFormatDate(OCI_Connection *con, const otext *format)
Set the date format for implicit string / date conversions.
Provides SQL bind informations.
OCI_EXPORT boolean OCI_API OCI_SetDefaultFormatNumeric(OCI_Connection *con, const otext *format)
Set the numeric format for implicit string / numeric conversions.
OCI_EXPORT boolean OCI_API OCI_DequeueFree(OCI_Dequeue *dequeue)
Free a Dequeue object.
Timestamp operator+(int value)
Return a new Timestamp holding the current Timestamp value incremented by the given number of days...
ostring GetDatabase() const
Return the Oracle server database name of the connected database/service name.
OCI_EXPORT OCI_Connection *OCI_API OCI_ErrorGetConnection(OCI_Error *err)
Retrieve connection handle within the error occurred.
unsigned int GetServerMinorVersion() const
Return the minor version number of the connected database server.
void SetTrace(SessionTrace trace, const ostring &value)
Set tracing information for the session.
OCI_EXPORT boolean OCI_API OCI_FileAssign(OCI_File *file, OCI_File *file_src)
Assign a file to another one.
OCI_EXPORT boolean OCI_API OCI_DateFromText(OCI_Date *date, const otext *str, const otext *fmt)
Convert a string to a date and store it in the given date handle.
OCI_EXPORT const otext *OCI_API OCI_GetUserName(OCI_Connection *con)
Return the current logged user name.
OCI_EXPORT const otext *OCI_API OCI_ColumnGetSQLType(OCI_Column *col)
Return the Oracle SQL type name of the column data type.
OCI_EXPORT boolean OCI_API OCI_PoolSetStatementCacheSize(OCI_Pool *pool, unsigned int value)
Set the maximum number of statements to keep in the pool statement cache.
OCI_EXPORT boolean OCI_API OCI_DequeueSetWaitTime(OCI_Dequeue *dequeue, int timeout)
set the time that OCIDequeueGet() waits for messages if no messages are currently available ...
OCI_EXPORT boolean OCI_API OCI_FetchPrev(OCI_Resultset *rs)
Fetch the previous row of the resultset.
OCI_EXPORT boolean OCI_API OCI_DequeueSetNavigation(OCI_Dequeue *dequeue, unsigned int position)
Set the position of messages to be retrieved.
OCI_EXPORT boolean OCI_API OCI_IsNull(OCI_Resultset *rs, unsigned int index)
Check if the current row value is null for the column at the given index in the resultset.
OCI_EXPORT unsigned int OCI_API OCI_ElemGetUnsignedInt(OCI_Elem *elem)
Return the unsigned int value of the given collection element.
OCI_EXPORT boolean OCI_API OCI_SetUserPassword(const otext *db, const otext *user, const otext *pwd, const otext *new_pwd)
Change the password of the given user on the given database.
OCI_EXPORT boolean OCI_API OCI_ObjectSetRaw(OCI_Object *obj, const otext *attr, void *value, unsigned int len)
Set an object attribute of type RAW.
OCI_EXPORT const otext *OCI_API OCI_ObjectGetString(OCI_Object *obj, const otext *attr)
Return the string value of the given object attribute.
OCI_EXPORT big_uint OCI_API OCI_LobGetOffset(OCI_Lob *lob)
Return the current position in the Lob content buffer.
OCI_EXPORT boolean OCI_API OCI_IntervalSubtract(OCI_Interval *itv, OCI_Interval *itv2)
Subtract an interval handle value from another.
OCI_EXPORT unsigned int OCI_API OCI_ColumnGetFullSQLType(OCI_Column *col, otext *buffer, unsigned int len)
Return the Oracle SQL Full name including precision and size of the column datatype.
void SetDefaultLobPrefetchSize(unsigned int value)
Enable or disable prefetching for all LOBs fetched in the connection.
void ChangePassword(const ostring &newPwd)
Change the password of the logged user.
OCI_EXPORT double OCI_API OCI_ObjectGetDouble(OCI_Object *obj, const otext *attr)
Return the double value of the given object attribute.
OCI_EXPORT boolean OCI_API OCI_BindString(OCI_Statement *stmt, const otext *name, otext *data, unsigned int len)
Bind a string variable.
int GetInternalErrorCode() const
Return the OCILIB error code.
OCI_EXPORT unsigned int OCI_API OCI_ObjectGetType(OCI_Object *obj)
Return the type of an object instance.
void GetDateTime(int &year, int &month, int &day, int &hour, int &min, int &sec) const
Extract the date and time parts.
ostring GetInstance() const
Return the Oracle server Instance name of the connected database/service name.
void(* HAHandlerProc)(Connection &con, HAEventSource eventSource, HAEventType eventType, Timestamp &time)
User callback for HA event notifications.
OCI_EXPORT OCI_Enqueue *OCI_API OCI_EnqueueCreate(OCI_TypeInfo *typinf, const otext *name)
Create a Enqueue object for the given queue.
OCI_EXPORT OCI_Elem *OCI_API OCI_ElemCreate(OCI_TypeInfo *typinf)
Create a local collection element instance based on a collection type descriptor. ...
OCI_EXPORT boolean OCI_API OCI_ElemSetRaw(OCI_Elem *elem, void *value, unsigned int len)
Set a RAW value to a collection element.
ostring GetUserName() const
Return the current logged user name.
OCI_EXPORT const otext *OCI_API OCI_ColumnGetName(OCI_Column *col)
Return the name of the given column.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfUnsignedShorts(OCI_Statement *stmt, const otext *name, unsigned short *data, unsigned int nbelem)
Bind an array of unsigned shorts.
OCI_EXPORT int OCI_API OCI_ObjectGetRaw(OCI_Object *obj, const otext *attr, void *value, unsigned int len)
Return the raw attribute value of the given object attribute into the given buffer.
OCI_EXPORT boolean OCI_API OCI_BindArraySetSize(OCI_Statement *stmt, unsigned int size)
Set the input array size for bulk operations.
OCI_EXPORT OCI_File *OCI_API OCI_ElemGetFile(OCI_Elem *elem)
Return the File value of the given collection element.
OCI_EXPORT OCI_Connection *OCI_API OCI_PoolGetConnection(OCI_Pool *pool, const otext *tag)
Get a connection from the pool.
void SetAutoCommit(bool enabled)
Enable or disable auto commit mode (implicit commits after every SQL execution)
OCI_EXPORT boolean OCI_API OCI_IntervalFromTimeZone(OCI_Interval *itv, const otext *str)
Correct an interval handle value with the given time zone.
OCI_EXPORT unsigned int OCI_API OCI_GetImportMode(void)
Return the Oracle shared library import mode.
OCI_EXPORT unsigned int OCI_API OCI_BindGetDirection(OCI_Bind *bnd)
Get the direction mode of a bind handle.
Long< Raw, LongBinary > Blong
Class handling LONG RAW oracle type.
OCI_EXPORT OCI_Connection *OCI_API OCI_FileGetConnection(OCI_File *file)
Retrieve connection handle from the file handle.
OCI_EXPORT boolean OCI_API OCI_SetBindMode(OCI_Statement *stmt, unsigned int mode)
Set the binding mode of a SQL statement.
OCI_EXPORT boolean OCI_API OCI_ObjectToText(OCI_Object *obj, unsigned int *size, otext *str)
Convert an object handle value to a string.
OCI_EXPORT boolean OCI_API OCI_DequeueSetVisibility(OCI_Dequeue *dequeue, unsigned int visibility)
Set whether the new message is dequeued as part of the current transaction.
OCI_EXPORT OCI_Statement *OCI_API OCI_GetStatement(OCI_Resultset *rs, unsigned int index)
Return the current cursor value (Nested table) of the column at the given index in the resultset...
OCI_EXPORT boolean OCI_API OCI_FileExists(OCI_File *file)
Check if the given file exists on server.
OCI_EXPORT boolean OCI_API OCI_FetchLast(OCI_Resultset *rs)
Fetch the last row of the resultset.
bool operator==(const Timestamp &other) const
Indicates if the current Timestamp value is equal to the given Timestamp value.
int GetMonth() const
Return the interval month value.
ostring MakeString(const otext *result)
Internal usage. Constructs a C++ string object from the given OCILIB string pointer.
OCI_EXPORT boolean OCI_API OCI_BindStatement(OCI_Statement *stmt, const otext *name, OCI_Statement *data)
Bind a Statement variable (PL/SQL Ref Cursor)
OCI_EXPORT boolean OCI_API OCI_ObjectSetShort(OCI_Object *obj, const otext *attr, short value)
Set an object attribute of type short.
OCI_EXPORT boolean OCI_API OCI_DateAddMonths(OCI_Date *date, int nb)
Add or subtract months to a date handle.
bool operator==(const Lob &other) const
Indicates if the current lob value is equal to the given lob value.
void Forget()
Cancel the prepared global transaction validation.
void ChangeTimeZone(const ostring &tzSrc, const ostring &tzDst)
Convert the date from one zone to another zone.
OCI_EXPORT boolean OCI_API OCI_MutexAcquire(OCI_Mutex *mutex)
Acquire a mutex lock.
OCI_EXPORT boolean OCI_API OCI_ElemSetString(OCI_Elem *elem, const otext *value)
Set a string value to a collection element.
void SetDaySecond(int day, int hour, int min, int sec, int fsec)
Set the Day / Second parts.
OCI_EXPORT boolean OCI_API OCI_Ping(OCI_Connection *con)
Makes a round trip call to the server to confirm that the connection and the server are active...
OCI_EXPORT unsigned int OCI_API OCI_GetAffectedRows(OCI_Statement *stmt)
Return the number of rows affected by the SQL statement.
OCI_EXPORT unsigned int OCI_API OCI_LobRead(OCI_Lob *lob, void *buffer, unsigned int len)
[OBSOLETE] Read a portion of a lob into the given buffer
void Open()
Open a file for reading on the server.
void SetHours(int value)
Set the timestamp hours value.
void GetTime(int &hour, int &min, int &sec) const
Extract time parts.
OCILIB encapsulation of OCI mutexes.
OCI_EXPORT unsigned short OCI_API OCI_GetUnsignedShort2(OCI_Resultset *rs, const otext *name)
Return the current unsigned short value of the column from its name in the resultset.
OCI_EXPORT boolean OCI_API OCI_ElemSetInterval(OCI_Elem *elem, OCI_Interval *value)
Assign an Interval handle to a collection element.
Date operator+(int value)
Return a new date holding the current date value incremented by the given number of days...
OCI_EXPORT unsigned int OCI_API OCI_PoolGetStatementCacheSize(OCI_Pool *pool)
Return the maximum number of statements to keep in the pool statement cache.
OCI_EXPORT boolean OCI_API OCI_BindDouble(OCI_Statement *stmt, const otext *name, double *data)
Bind a double variable.
OCI_EXPORT OCI_Ref *OCI_API OCI_ObjectGetRef(OCI_Object *obj, const otext *attr)
Return the Ref value of the given object attribute.
OCI_EXPORT boolean OCI_API OCI_ObjectSetDouble(OCI_Object *obj, const otext *attr, double value)
Set an object attribute of type double.
OCI_EXPORT OCI_Lob *OCI_API OCI_GetLob2(OCI_Resultset *rs, const otext *name)
Return the current lob value of the column from its name in the resultset.
Enum< LobTypeValues > LobType
Type of Lob.
OCI_EXPORT int OCI_API OCI_ColumnGetScale(OCI_Column *col)
Return the scale of the column for numeric columns.
static void Release(MutexHandle handle)
Release a mutex lock.
Statement GetStatement() const
Return the statement within the error occurred.
OCI_EXPORT boolean OCI_API OCI_SetDefaultLobPrefetchSize(OCI_Connection *con, unsigned int value)
Enable or disable prefetching for all LOBs fetched in the connection.
OCI_EXPORT boolean OCI_API OCI_CollDeleteElem(OCI_Coll *coll, unsigned int index)
Delete the element at the given position in the Nested Table Collection.
OCI_EXPORT boolean OCI_API OCI_TimestampFromText(OCI_Timestamp *tmsp, const otext *str, const otext *fmt)
Convert a string to a timestamp and store it in the given timestamp handle.
OCI_EXPORT int OCI_API OCI_DateCompare(OCI_Date *date, OCI_Date *date2)
Compares two date handles.
OCI_EXPORT boolean OCI_API OCI_MsgSetOriginalID(OCI_Msg *msg, const void *id, unsigned int len)
Set the original ID of the message in the last queue that generated this message. ...
ostring GetDomain() const
Return the Oracle server Domain name of the connected database/service name.
OCI_EXPORT OCI_Interval *OCI_API OCI_GetInterval(OCI_Resultset *rs, unsigned int index)
Return the current interval value of the column at the given index in the resultset.
OCI_EXPORT boolean OCI_API OCI_ObjectSetRef(OCI_Object *obj, const otext *attr, OCI_Ref *value)
Set an object attribute of type Ref.
Global transaction identifier.
OCI_EXPORT OCI_Bind *OCI_API OCI_GetBind(OCI_Statement *stmt, unsigned int index)
Return the bind handle at the given index in the internal array of bind handle.
unsigned int GetDefaultLobPrefetchSize() const
Return the default LOB prefetch buffer size for the connection.
OCI_EXPORT OCI_Lob *OCI_API OCI_ObjectGetLob(OCI_Object *obj, const otext *attr)
Return the lob value of the given object attribute.
Object used for executing SQL or PL/SQL statement and returning the produced results.
int GetDay() const
Return the interval day value.
OCI_EXPORT boolean OCI_API OCI_MsgGetOriginalID(OCI_Msg *msg, void *id, unsigned int *len)
Return the original ID of the message in the last queue that generated this message.
Encapsulates an Oracle or OCILIB exception.
static void ShutdownDatabase(const ostring &db, const ostring &user, const ostring &pwd, Environment::ShutdownFlags shutdownFlags, Environment::ShutdownMode shutdownMode, Environment::SessionFlags sessionFlags=SessionSysDba)
Shutdown a database instance.
A connection or session with a specific database.
OCI_EXPORT boolean OCI_API OCI_DirPathSetBufferSize(OCI_DirPath *dp, unsigned int size)
Set the size of the internal stream transfer buffer.
OCI_EXPORT boolean OCI_API OCI_Commit(OCI_Connection *con)
Commit current pending changes.
OCI_EXPORT OCI_Ref *OCI_API OCI_GetRef(OCI_Resultset *rs, unsigned int index)
Return the current Ref value of the column at the given index in the resultset.
void Convert(const Timestamp &other)
Convert the current timestamp to the type of the given timestamp.
OCI_EXPORT boolean OCI_API OCI_StatementFree(OCI_Statement *stmt)
Free a statement and all resources associated to it (resultsets ...)
Iterator end()
Returns an iterator referring to the past-the-end element in the collection.
OCI_EXPORT const otext *OCI_API OCI_GetString(OCI_Resultset *rs, unsigned int index)
Return the current string value of the column at the given index in the resultset.
unsigned int Write(const TLongObjectType &content)
Write the given string into the long Object.
void Close()
Close the physical connection to the DB server.
OCI_EXPORT boolean OCI_API OCI_ElemSetBigInt(OCI_Elem *elem, big_int value)
Set a big int value to a collection element.
unsigned int GetLength() const
Return the buffer length.
OCI_EXPORT unsigned int OCI_API OCI_ErrorGetType(OCI_Error *err)
Retrieve the type of error from error handle.
OCI_EXPORT int OCI_API OCI_DateCheck(OCI_Date *date)
Check if the given date is valid.
Timestamp & operator+=(int value)
Increment the Timestamp by the given number of days.
void SetYear(int value)
Set the interval year value.
OCI_EXPORT boolean OCI_API OCI_BindBigInt(OCI_Statement *stmt, const otext *name, big_int *data)
Bind a big integer variable.
OCI_EXPORT unsigned int OCI_API OCI_DirPathLoad(OCI_DirPath *dp)
Loads the data converted to direct path stream format.
OCI_EXPORT OCI_Date *OCI_API OCI_GetDate(OCI_Resultset *rs, unsigned int index)
Return the current date value of the column at the given index in the resultset.
OCI_EXPORT boolean OCI_API OCI_Break(OCI_Connection *con)
Perform an immediate abort of any currently Oracle OCI call.
void GetDateTime(int &year, int &month, int &day, int &hour, int &min, int &sec, int &fsec) const
Extract date and time parts.
unsigned int GetMinSize() const
Return the minimum number of connections/sessions that can be opened to the database.
Internal bind representation.
OCI_EXPORT boolean OCI_API OCI_SetTAFHandler(OCI_Connection *con, POCI_TAF_HANDLER handler)
Set the Transparent Application Failover (TAF) user handler.
OCI_EXPORT boolean OCI_API OCI_DirPathFree(OCI_DirPath *dp)
Free an OCI_DirPath handle.
static void Join(ThreadHandle handle)
Join the given thread.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfIntervals(OCI_Statement *stmt, const otext *name, OCI_Interval **data, unsigned int type, unsigned int nbelem)
Bind an array of interval handles.
OCI_EXPORT unsigned int OCI_API OCI_FileRead(OCI_File *file, void *buffer, unsigned int len)
Read a portion of a file into the given buffer.
Object identifying the SQL data type LONG.
OCI_EXPORT boolean OCI_API OCI_DateFree(OCI_Date *date)
Free a date object.
OCI_EXPORT const otext *OCI_API OCI_MsgGetExceptionQueue(OCI_Msg *msg)
Get the Exception queue name of the message.
Oracle Transaction object.
OCI_EXPORT OCI_Object *OCI_API OCI_GetObject2(OCI_Resultset *rs, const otext *name)
Return the current Object value of the column from its name in the resultset.
OCI_EXPORT boolean OCI_API OCI_GetAutoCommit(OCI_Connection *con)
Get current auto commit mode status.
OCI_EXPORT unsigned short OCI_API OCI_ElemGetUnsignedShort(OCI_Elem *elem)
Return the unsigned short value of the given collection element.
int GetMinutes() const
Return the date minutes value.
OCI_EXPORT OCI_Ref *OCI_API OCI_GetRef2(OCI_Resultset *rs, const otext *name)
Return the current Ref value of the column from its name in the resultset.
OCI_EXPORT big_uint OCI_API OCI_FileGetSize(OCI_File *file)
Return the size in bytes of a file.
int GetYear() const
Return the interval year value.
OCI_EXPORT OCI_File *OCI_API OCI_GetFile2(OCI_Resultset *rs, const otext *name)
Return the current File value of the column from its name in the resultset.
void SetMinutes(int value)
Set the interval minutes value.
Raw MakeRaw(void *result, unsigned int size)
Internal usage. Constructs a C++ Raw object from the given OCILIB raw buffer.
OCI_EXPORT boolean OCI_API OCI_BindInterval(OCI_Statement *stmt, const otext *name, OCI_Interval *data)
Bind an interval variable.
OCI_EXPORT boolean OCI_API OCI_FileSetName(OCI_File *file, const otext *dir, const otext *name)
Set the directory and file name of FILE handle.
OCI_EXPORT int OCI_API OCI_ErrorGetOCICode(OCI_Error *err)
Retrieve Oracle Error code from error handle.
OCI_EXPORT const otext *OCI_API OCI_MsgGetCorrelation(OCI_Msg *msg)
Get the correlation identifier of the message.
ostring GetSessionTag() const
Return the tag associated with the given connection.
OCI_EXPORT int OCI_API OCI_DateAssign(OCI_Date *date, OCI_Date *date_src)
Assign the value of a date handle to another one.
OCI_EXPORT boolean OCI_API OCI_BindInt(OCI_Statement *stmt, const otext *name, int *data)
Bind an integer variable.
OCI_EXPORT boolean OCI_API OCI_ThreadKeyCreate(const otext *name, POCI_THREADKEYDEST destfunc)
Create a thread key object.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfTimestamps(OCI_Statement *stmt, const otext *name, OCI_Timestamp **data, unsigned int type, unsigned int nbelem)
Bind an array of timestamp handles.
OCI_EXPORT boolean OCI_API OCI_ObjectSetObject(OCI_Object *obj, const otext *attr, OCI_Object *value)
Set an object attribute of type Object.
Enum< ObjectTypeValues > ObjectType
Object Type.
OCI_EXPORT boolean OCI_API OCI_TimestampGetDateTime(OCI_Timestamp *tmsp, int *year, int *month, int *day, int *hour, int *min, int *sec, int *fsec)
Extract the date and time parts from a date handle.
static Environment::EnvironmentFlags GetMode()
Return the Environment mode flags.
TimestampTypeValues
Interval types enumerated values.
void Clear()
Clear all items of the collection.
OCI_EXPORT boolean OCI_API OCI_BindFile(OCI_Statement *stmt, const otext *name, OCI_File *data)
Bind a File variable.
Object GetObject() const
Returns the object pointed by the reference.
AQ identified agent for messages delivery.
Lob & operator+=(const Lob &other)
Appending the given lob content to the current lob content.
TDataType Get(const ostring &name) const
Return the given object attribute value.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfShorts(OCI_Statement *stmt, const otext *name, short *data, unsigned int nbelem)
Bind an array of shorts.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfDoubles(OCI_Statement *stmt, const otext *name, double *data, unsigned int nbelem)
Bind an array of doubles.
void SetSeconds(int value)
Set the date seconds value.
OCI_EXPORT OCI_Statement *OCI_API OCI_ResultsetGetStatement(OCI_Resultset *rs)
Return the statement handle associated with a resultset handle.
OCI_EXPORT short OCI_API OCI_ObjectGetShort(OCI_Object *obj, const otext *attr)
Return the short value of the given object attribute.
OCI_EXPORT boolean OCI_API OCI_ObjectSetColl(OCI_Object *obj, const otext *attr, OCI_Coll *value)
Set an object attribute of type Collection.
OCI_EXPORT int OCI_API OCI_TimestampCompare(OCI_Timestamp *tmsp, OCI_Timestamp *tmsp2)
Compares two timestamp handles.
Collection Clone() const
Clone the current instance to a new one performing deep copy.
OCI_EXPORT double OCI_API OCI_GetDouble2(OCI_Resultset *rs, const otext *name)
Return the current double value of the column from its name in the resultset.
void GetDate(int &year, int &month, int &day) const
Extract the date parts.
OCI_EXPORT boolean OCI_API OCI_BindObject(OCI_Statement *stmt, const otext *name, OCI_Object *data)
Bind an object (named type) variable.
OCI_EXPORT const otext *OCI_API OCI_SubscriptionGetName(OCI_Subscription *sub)
Return the name of the given registered subscription.
static Environment::ImportMode GetImportMode()
Return the Oracle shared library import mode.
OCI_EXPORT unsigned int OCI_API OCI_PoolGetOpenedCount(OCI_Pool *pool)
Return the current number of opened connections/sessions.
OCI_EXPORT unsigned int OCI_API OCI_ColumnGetSubType(OCI_Column *col)
Return the OCILIB object subtype of a column.
OCI_EXPORT boolean OCI_API OCI_FileIsOpen(OCI_File *file)
Check if the specified file is opened within the file handle.
OCI_EXPORT int OCI_API OCI_GetInt2(OCI_Resultset *rs, const otext *name)
Return the current integer value of the column from its name in the resultset.
OCI_EXPORT boolean OCI_API OCI_PoolSetNoWait(OCI_Pool *pool, boolean value)
Set the waiting mode used when no more connections/sessions are available from the pool...
Class used for handling transient collection value. it is used internally by:
OCI_EXPORT boolean OCI_API OCI_DateGetDateTime(OCI_Date *date, int *year, int *month, int *day, int *hour, int *min, int *sec)
Extract the date and time parts from a date handle.
OCI_EXPORT OCI_Long *OCI_API OCI_GetLong(OCI_Resultset *rs, unsigned int index)
Return the current Long value of the column at the given index in the resultset.
OCI_EXPORT const otext *OCI_API OCI_EventGetObject(OCI_Event *event)
Return the name of the object that generated the event.
unsigned int Append(const TLobObjectType &content)
Append the given content to the lob.
OCI_EXPORT big_uint OCI_API OCI_ObjectGetUnsignedBigInt(OCI_Object *obj, const otext *attr)
Return the unsigned big integer value of the given object attribute.
OCI_EXPORT big_uint OCI_API OCI_GetUnsignedBigInt2(OCI_Resultset *rs, const otext *name)
Return the current unsigned big integer value of the column from its name in the resultset.
Object Clone() const
Clone the current instance to a new one performing deep copy.
OCI_EXPORT OCI_Timestamp *OCI_API OCI_GetInstanceStartTime(OCI_Connection *con)
Return the date and time (Timestamp) server instance start of the connected database/service name...
OCI_EXPORT OCI_Date *OCI_API OCI_GetDate2(OCI_Resultset *rs, const otext *name)
Return the current date value of the column from its name in the resultset.
OCI_EXPORT unsigned int OCI_API OCI_PoolGetIncrement(OCI_Pool *pool)
Return the increment for connections/sessions to be opened to the database when the pool is not full...
OCI_EXPORT boolean OCI_API OCI_DequeueSetConsumer(OCI_Dequeue *dequeue, const otext *consumer)
Set the current consumer name to retrieve message for.
OCI_EXPORT const otext *OCI_API OCI_GetSessionTag(OCI_Connection *con)
Return the tag associated the given connection.
OCI_EXPORT unsigned int OCI_API OCI_ElemGetRawSize(OCI_Elem *elem)
Return the raw attribute value size of the given element handle.
bool IsServerAlive() const
Indicate if the connection is still connected to the server.
OCI_EXPORT boolean OCI_API OCI_QueueTableAlter(OCI_Connection *con, const otext *queue_table, const otext *comment, unsigned int primary_instance, unsigned int secondary_instance)
Alter the given queue table.
OCI_EXPORT boolean OCI_API OCI_MsgReset(OCI_Msg *msg)
Reset all attributes of a message object.
void SetStatementCacheSize(unsigned int value)
Set the maximum number of statements to keep in the pool's statement cache.
void FromString(const ostring &str, const ostring &format=OCI_STRING_FORMAT_DATE)
Assign to the date object the value provided by the input date time string.
OCI_EXPORT boolean OCI_API OCI_AgentSetName(OCI_Agent *agent, const otext *name)
Set the given AQ agent name.
bool PingServer() const
Performs a round trip call to the server to confirm that the connection to the server is still valid...
OCI_EXPORT boolean OCI_API OCI_QueueTablePurge(OCI_Connection *con, const otext *queue_table, const otext *purge_condition, boolean block, unsigned int delivery_mode)
Purge messages from the given queue table.
bool IsTAFCapable() const
Verify if the connection support TAF events.
OCI_EXPORT unsigned int OCI_API OCI_PoolGetMax(OCI_Pool *pool)
Return the maximum number of connections/sessions that can be opened to the database.
OCI_EXPORT boolean OCI_API OCI_LobIsEqual(OCI_Lob *lob, OCI_Lob *lob2)
Compare two lob handles for equality.
ostring GetDefaultNumericFormat() const
Return the current numeric format for implicit string / numeric conversions.
void Truncate(unsigned int size)
Trim the given number of elements from the end of the collection.
Object(const TypeInfo &typeInfo)
Parametrized constructor.
OCI_EXPORT boolean OCI_API OCI_LobAssign(OCI_Lob *lob, OCI_Lob *lob_src)
Assign a lob to another one.
OCI_EXPORT big_uint OCI_API OCI_LobErase(OCI_Lob *lob, big_uint offset, big_uint len)
Erase a portion of the lob at a given position.
void SetDefaultDateFormat(const ostring &format)
Set the date format for implicit string / date conversions.
OCI_EXPORT const otext *OCI_API OCI_GetString2(OCI_Resultset *rs, const otext *name)
Return the current string value of the column from its name in the resultset.
OCI_EXPORT OCI_TypeInfo *OCI_API OCI_CollGetTypeInfo(OCI_Coll *coll)
Return the type info object associated to the collection.
ostring GetService() const
Return the Oracle server Service name of the connected database/service name.
Template Enum template class providing some type safety to some extends for manipulating enum variabl...
OCI_EXPORT unsigned int OCI_API OCI_LobGetChunkSize(OCI_Lob *lob)
Returns the chunk size of a LOB.
File Clone() const
Clone the current instance to a new one performing deep copy.
OCI_EXPORT boolean OCI_API OCI_RefToText(OCI_Ref *ref, unsigned int size, otext *str)
Converts a Ref handle value to a hexadecimal string.
OCI_EXPORT boolean OCI_API OCI_ThreadJoin(OCI_Thread *thread)
Join the given thread.
OCI_EXPORT unsigned int OCI_API OCI_GetCharset(void)
Return the OCILIB charset type.
Timestamp & operator++()
Increment the timestamp by 1 day.
OCI_EXPORT float OCI_API OCI_ElemGetFloat(OCI_Elem *elem)
Return the float value of the given collection element.
OCI_EXPORT unsigned int OCI_API OCI_GetServerRevisionVersion(OCI_Connection *con)
Return the revision version number of the connected database server.
OCI_EXPORT boolean OCI_API OCI_ObjectAssign(OCI_Object *obj, OCI_Object *obj_src)
Assign an object to another one.
void SetDateTime(int year, int month, int day, int hour, int min, int sec)
Set the date and time part.
OCI_EXPORT boolean OCI_API OCI_BindRaw(OCI_Statement *stmt, const otext *name, void *data, unsigned int len)
Bind a raw buffer.
Enum< ExceptionTypeValues > ExceptionType
Type of Exception.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfLobs(OCI_Statement *stmt, const otext *name, OCI_Lob **data, unsigned int type, unsigned int nbelem)
Bind an array of Lob handles.
Date Clone() const
Clone the current instance to a new one performing deep copy.
void SetHours(int value)
Set the date hours value.
bool operator!=(const Interval &other) const
Indicates if the current Interval value is not equal the given Interval value.
void FromString(const ostring &data)
Assign to the interval object the value provided by the input interval string.
Column GetColumn(unsigned int index) const
Return the column from its index in the resultset.
OCI_EXPORT boolean OCI_API OCI_DirPathSetCacheSize(OCI_DirPath *dp, unsigned int size)
Set number of elements in the date cache.
OCI_EXPORT OCI_Date *OCI_API OCI_ElemGetDate(OCI_Elem *elem)
Return the Date value of the given collection element.
static void ChangeUserPassword(const ostring &db, const ostring &user, const ostring &pwd, const ostring &newPwd)
Change the password of the given user on the given database.
OCI_EXPORT unsigned int OCI_API OCI_GetRowCount(OCI_Resultset *rs)
Retrieve the number of rows fetched so far.
Flags< EnvironmentFlagsValues > EnvironmentFlags
Environment Flags.
OCI_EXPORT unsigned int OCI_API OCI_LobWrite(OCI_Lob *lob, void *buffer, unsigned int len)
[OBSOLETE] Write a buffer into a LOB
ostring GetMessage() const
Retrieve the error message.
OCI_EXPORT unsigned int OCI_API OCI_BindArrayGetSize(OCI_Statement *stmt)
Return the current input array size for bulk operations.
OCI_EXPORT unsigned int OCI_API OCI_EventGetType(OCI_Event *event)
Return the type of event reported by a notification.
boolean OCI_API OCI_BindSetCharsetForm(OCI_Bind *bnd, unsigned int csfrm)
Set the charset form of the given character based bind variable.
OCI_EXPORT boolean OCI_API OCI_DatabaseShutdown(const otext *db, const otext *user, const otext *pwd, unsigned int sess_mode, unsigned int shut_mode, unsigned int shut_flag)
Shutdown a database instance.
OCI_EXPORT boolean OCI_API OCI_DateGetTime(OCI_Date *date, int *hour, int *min, int *sec)
Extract the time part from a date handle.
OCI_EXPORT const otext *OCI_API OCI_GetPassword(OCI_Connection *con)
Return the current logged user password.
OCI_EXPORT boolean OCI_API OCI_TimestampGetTime(OCI_Timestamp *tmsp, int *hour, int *min, int *sec, int *fsec)
Extract the time portion from a timestamp handle.
Timestamp Clone() const
Clone the current instance to a new one performing deep copy.
bool IsValid() const
Check if the given date is valid.
OCILIB encapsulation of Oracle DCN notification.
void Close()
Destroy the current Oracle pool of connections or sessions.
OCI_EXPORT unsigned int OCI_API OCI_GetUnsignedInt2(OCI_Resultset *rs, const otext *name)
Return the current unsigned integer value of the column from its name in the resultset.
OCILIB encapsulation of A/Q dequeuing operations.
static void Create(const ostring &name, ThreadKeyFreeProc freeProc=0)
Create a thread key object.
int GetHours() const
Return the date hours value.
OCI_EXPORT OCI_Timestamp *OCI_API OCI_ObjectGetTimestamp(OCI_Object *obj, const otext *attr)
Return the timestamp value of the given object attribute.
OCI_EXPORT boolean OCI_API OCI_BindSetDirection(OCI_Bind *bnd, unsigned int direction)
Set the direction mode of a bind handle.
OCI_EXPORT boolean OCI_API OCI_EnqueueGetRelativeMsgID(OCI_Enqueue *enqueue, void *id, unsigned int *len)
Get the current associated message identifier used for enqueuing messages using a sequence deviation...
OCI_EXPORT boolean OCI_API OCI_IsRebindingAllowed(OCI_Statement *stmt)
Indicate if rebinding is allowed on the given statement.
OCI_EXPORT boolean OCI_API OCI_TimestampGetTimeZoneName(OCI_Timestamp *tmsp, int size, otext *str)
Return the time zone name of a timestamp handle.
OCI_EXPORT unsigned int OCI_API OCI_TransactionGetMode(OCI_Transaction *trans)
Return global transaction mode.
OCI_EXPORT OCI_Statement *OCI_API OCI_BindGetStatement(OCI_Bind *bnd)
Return the statement handle associated with a bind handle.
OCI_EXPORT boolean OCI_API OCI_IntervalGetDaySecond(OCI_Interval *itv, int *day, int *hour, int *min, int *sec, int *fsec)
Return the day / time portion of an interval handle.
Oracle SQL or PL/SQL statement.
ostring ToString() const
return a string representation of the current reference
bool operator>=(const Timestamp &other) const
Indicates if the current Timestamp value is superior or equal to the given Timestamp value...
OCI_EXPORT boolean OCI_API OCI_ElemSetRef(OCI_Elem *elem, OCI_Ref *value)
Assign a Ref handle to a collection element.
const void * ThreadId
Thread Unique ID.
OCI_EXPORT OCI_Object *OCI_API OCI_ObjectGetObject(OCI_Object *obj, const otext *attr)
Return the object value of the given object attribute.
OCI_EXPORT unsigned int OCI_API OCI_EventGetOperation(OCI_Event *event)
Return the type of operation reported by a notification.
ostring GetDefaultDateFormat() const
Return the current date format for implicit string / date conversions.
bool GetAutoCommit() const
Indicates if auto commit is currently activated.
Object identifying the SQL data type REF.
void SetUserData(AnyPointer value)
Associate a pointer to user data to the given connection.
CollectionType GetType() const
Return the type of the collection.
ostring GetName() const
Return the file name.
OCI_EXPORT boolean OCI_API OCI_ThreadKeySetValue(const otext *name, void *value)
Set a thread key value.
OCI_EXPORT short OCI_API OCI_GetShort2(OCI_Resultset *rs, const otext *name)
Return the current short value of the column from its name in the resultset.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfUnsignedBigInts(OCI_Statement *stmt, const otext *name, big_uint *data, unsigned int nbelem)
Bind an array of unsigned big integers.
OCI_EXPORT boolean OCI_API OCI_TimestampIntervalSub(OCI_Timestamp *tmsp, OCI_Interval *itv)
Subtract an interval value from a timestamp value of a timestamp handle.
void SetDay(int value)
Set the date day value.
Enum< IntervalTypeValues > IntervalType
Interval types.
OCI_EXPORT boolean OCI_API OCI_MutexFree(OCI_Mutex *mutex)
Destroy a mutex object.
int DaysBetween(const Date &other) const
Return the number of days with the given date.
void FromString(const ostring &data, const ostring &format=OCI_STRING_FORMAT_DATE)
Assign to the timestamp object the value provided by the input date time string.
void SetDefaultNumericFormat(const ostring &format)
Set the numeric format for implicit string / numeric conversions.
OCILIB encapsulation of OCI Threads.
OCI_EXPORT boolean OCI_API OCI_TimestampFree(OCI_Timestamp *tmsp)
Free an OCI_Timestamp handle.
OCI_EXPORT unsigned int OCI_API OCI_BindGetSubtype(OCI_Bind *bnd)
Return the OCILIB object subtype of the given bind.
OCI_EXPORT boolean OCI_API OCI_SetUserData(OCI_Connection *con, void *data)
Associate a pointer to user data to the given connection.
OCI_EXPORT OCI_Date *OCI_API OCI_DateCreate(OCI_Connection *con)
Create a local date object.
OCI_EXPORT OCI_Ref *OCI_API OCI_RefCreate(OCI_Connection *con, OCI_TypeInfo *typinf)
Create a local Ref instance.
OCI_EXPORT OCI_Interval *OCI_API OCI_IntervalCreate(OCI_Connection *con, unsigned int type)
Create a local interval object.
OCI_EXPORT OCI_Connection *OCI_API OCI_LobGetConnection(OCI_Lob *lob)
Retrieve connection handle from the lob handle.
big_uint GetLength() const
Returns the number of bytes contained in the file.
OCI_EXPORT boolean OCI_API OCI_EnqueueSetSequenceDeviation(OCI_Enqueue *enqueue, unsigned int sequence)
Set the enqueuing sequence of messages to put in the queue.
OCI_EXPORT const otext *OCI_API OCI_GetDBName(OCI_Connection *con)
Return the Oracle server database name of the connected database/service name.
Oracle physical connection.
void SetDateTime(int year, int month, int day, int hour, int min, int sec, int fsec, const ostring &timeZone=OTEXT(""))
Set the timestamp value from given date time parts.
void Flush()
Flush the lob content to the server (if applicable)
OCI_EXPORT boolean OCI_API OCI_ElemIsNull(OCI_Elem *elem)
Check if the collection element value is null.
Reference(const TypeInfo &typeInfo)
Parametrized constructor.
void Stop()
Stop current global transaction.
OCI_EXPORT boolean OCI_API OCI_RegisterBigInt(OCI_Statement *stmt, const otext *name)
Register a big integer output bind placeholder.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfFloats(OCI_Statement *stmt, const otext *name, float *data, unsigned int nbelem)
Bind an array of floats.
OCI_EXPORT big_uint OCI_API OCI_FileGetOffset(OCI_File *file)
Return the current position in the file.
OCI_EXPORT boolean OCI_API OCI_SetLongMaxSize(OCI_Statement *stmt, unsigned int size)
Set the LONG data type piece buffer size.
void GetTime(int &hour, int &min, int &sec, int &fsec) const
Extract time parts.
OCI_EXPORT OCI_TypeInfo *OCI_API OCI_RefGetTypeInfo(OCI_Ref *ref)
Return the type info object associated to the Ref.
OCI_EXPORT boolean OCI_API OCI_ElemSetLob(OCI_Elem *elem, OCI_Lob *value)
Assign a Lob handle to a collection element.
OCI_EXPORT OCI_File *OCI_API OCI_FileCreate(OCI_Connection *con, unsigned int type)
Create a file object instance.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfUnsignedInts(OCI_Statement *stmt, const otext *name, unsigned int *data, unsigned int nbelem)
Bind an array of unsigned integers.
void SetMinutes(int value)
Set the timestamp minutes value.
OCI_EXPORT OCI_Transaction *OCI_API OCI_TransactionCreate(OCI_Connection *con, unsigned int timeout, unsigned int mode, OCI_XID *pxid)
Create a new global transaction or a serializable/read-only local transaction.
void SetDate(int year, int month, int day)
Set the date part.
void Close()
Close explicitly a Lob.
bool operator>(const Interval &other) const
Indicates if the current Interval value is superior to the given Interval value.
OCI_EXPORT OCI_Coll *OCI_API OCI_GetColl(OCI_Resultset *rs, unsigned int index)
Return the current Collection value of the column at the given index in the resultset.
OCI_EXPORT unsigned int OCI_API OCI_ObjectGetUnsignedInt(OCI_Object *obj, const otext *attr)
Return the unsigned integer value of the given object attribute.
OCI_EXPORT boolean OCI_API OCI_ElemSetUnsignedShort(OCI_Elem *elem, unsigned short value)
Set a unsigned short value to a collection element.
big_uint GetOffset() const
Returns the current R/W offset within the lob.
TypeInfo GetTypeInfo() const
Return the TypeInfo object describing the object.
OCI_EXPORT boolean OCI_API OCI_SetPassword(OCI_Connection *con, const otext *password)
Change the password of the logged user.
OCI_EXPORT int OCI_API OCI_TimestampCheck(OCI_Timestamp *tmsp)
Check if the given timestamp is valid.
void(* NotifyHandlerProc)(Event &evt)
User callback for subscriptions event notifications.
void SetTransaction(const Transaction &transaction)
Set a transaction to a connection.
OCI_EXPORT big_uint OCI_API OCI_GetUnsignedBigInt(OCI_Resultset *rs, unsigned int index)
Return the current unsigned big integer value of the column at the given index in the resultset...
Connection GetConnection() const
Return the connection within the error occurred.
OCI_EXPORT boolean OCI_API OCI_TransactionForget(OCI_Transaction *trans)
Cancel the prepared global transaction validation.
Element operator[](int index)
Returns the element at a given position in the collection.
OCI_EXPORT unsigned int OCI_API OCI_GetRaw2(OCI_Resultset *rs, const otext *name, void *buffer, unsigned int len)
Copy the current raw value of the column from its name into the specified buffer. ...
OCI_EXPORT boolean OCI_API OCI_IntervalToText(OCI_Interval *itv, int leading_prec, int fraction_prec, int size, otext *str)
Convert an interval value from the given interval handle to a string.
OCI_EXPORT boolean OCI_API OCI_RegisterInt(OCI_Statement *stmt, const otext *name)
Register an integer output bind placeholder.
OCI_EXPORT OCI_Resultset *OCI_API OCI_GetResultset(OCI_Statement *stmt)
Retrieve the resultset handle from an executed statement.
void Open(OpenMode mode)
Open explicitly a Lob.
void * AnyPointer
Alias for the generic void pointer.
OCI_EXPORT unsigned int OCI_API OCI_GetBindIndex(OCI_Statement *stmt, const otext *name)
Return the index of the bind from its name belonging to the given statement.
Oracle internal interval representation.
OCI_EXPORT boolean OCI_API OCI_TransactionFree(OCI_Transaction *trans)
Free current transaction.
OCI_EXPORT boolean OCI_API OCI_ObjectSetUnsignedBigInt(OCI_Object *obj, const otext *attr, big_uint value)
Set an object attribute of type unsigned big int.
OCI_EXPORT void *OCI_API OCI_GetUserData(OCI_Connection *con)
Return the pointer to user data previously associated with the connection.
ostring ToString() const
return a string representation of the current collection
ostring GetPassword() const
Return the current logged user password.
static void Cleanup()
Clean up all resources allocated by the environment.
int GetSeconds() const
Return the timestamp seconds value.
void SetMilliSeconds(int value)
Set the interval milliseconds value.
ExceptionType GetType() const
Return the Exception type.
OCI_EXPORT unsigned int OCI_API OCI_DequeueGetMode(OCI_Dequeue *dequeue)
Get the dequeuing/locking behavior.
OCI_EXPORT unsigned short OCI_API OCI_GetUnsignedShort(OCI_Resultset *rs, unsigned int index)
Return the current unsigned short value of the column at the given index in the resultset.
OCI_EXPORT boolean OCI_API OCI_FetchFirst(OCI_Resultset *rs)
Fetch the first row of the resultset.
Date()
Create an empty date object.
ostring GetDirectory() const
Return the file directory.
OCI_EXPORT boolean OCI_API OCI_DateSetTime(OCI_Date *date, int hour, int min, int sec)
Set the time portion if the given date handle.
OCI_EXPORT OCI_Timestamp *OCI_API OCI_GetTimestamp2(OCI_Resultset *rs, const otext *name)
Return the current timestamp value of the column from its name in the resultset.
bool operator<(const Date &other) const
Indicates if the current date value is inferior to the given date value.
Oracle REF type representation.
Interval & operator+=(const Interval &other)
Increment the current Value with the given Interval value.
static void Run(ThreadHandle handle, ThreadProc func, void *args)
Execute the given routine within the given thread.
OCI_EXPORT unsigned int OCI_API OCI_SubscriptionGetPort(OCI_Subscription *sub)
Return the port used by the notification.
OCI_EXPORT unsigned int OCI_API OCI_RefGetHexSize(OCI_Ref *ref)
Returns the size of the hex representation of the given Ref handle.
OCI_EXPORT const otext *OCI_API OCI_AgentGetAddress(OCI_Agent *agent)
Get the given AQ agent address.
OCI_EXPORT unsigned int OCI_API OCI_GetOCICompileVersion(void)
Return the version of OCI used for compilation.
OCI_EXPORT boolean OCI_API OCI_DatabaseStartup(const otext *db, const otext *user, const otext *pwd, unsigned int sess_mode, unsigned int start_mode, unsigned int start_flag, const otext *spfile)
Start a database instance.
OCI_EXPORT float OCI_API OCI_ObjectGetFloat(OCI_Object *obj, const otext *attr)
Return the float value of the given object attribute.
void Prepare()
Prepare a global transaction validation.
OCI_EXPORT int OCI_API OCI_ColumnGetLeadingPrecision(OCI_Column *col)
Return the leading precision of the column for interval columns.
OCI_EXPORT unsigned int OCI_API OCI_GetServerMinorVersion(OCI_Connection *con)
Return the minor version number of the connected database server.
OCI_EXPORT boolean OCI_API OCI_DirPathReset(OCI_DirPath *dp)
Reset internal arrays and streams to prepare another load.
IntervalType GetType() const
Return the type of the given interval object.
bool operator<(const Timestamp &other) const
Indicates if the current Timestamp value is inferior to the given Timestamp value.
OCI_EXPORT OCI_Interval *OCI_API OCI_ElemGetInterval(OCI_Elem *elem)
Return the Interval value of the given collection element.
OCI_EXPORT boolean OCI_API OCI_MsgSetObject(OCI_Msg *msg, OCI_Object *obj)
Set the object payload of the given message.
OCI_EXPORT unsigned int OCI_API OCI_CollGetMax(OCI_Coll *coll)
Returns the maximum number of elements of the given collection.
OCI_EXPORT const otext *OCI_API OCI_DequeueGetCorrelation(OCI_Dequeue *dequeue)
Get the correlation identifier of the message to be dequeued.
Object identifying the SQL data type BFILE.
Object identifying the SQL data types VARRAY and NESTED TABLE.
OCI_EXPORT unsigned int OCI_API OCI_ElemGetRaw(OCI_Elem *elem, void *value, unsigned int len)
Read the RAW value of the collection element into the given buffer.
static unsigned int GetCompileVersion()
Return the version of OCI used for compiling OCILIB.
Timestamp & operator--()
Decrement the Timestamp by 1 day.
OCI_EXPORT OCI_Statement *OCI_API OCI_GetStatement2(OCI_Resultset *rs, const otext *name)
Return the current cursor value of the column from its name in the resultset.
OCI_EXPORT boolean OCI_API OCI_FileFree(OCI_File *file)
Free a local File object.
OCI_EXPORT unsigned int OCI_API OCI_ColumnGetPropertyFlags(OCI_Column *col)
Return the column property flags.
void SetNoWait(bool value)
Set the waiting mode used when no more connections/sessions are available from the pool...
OCI_EXPORT boolean OCI_API OCI_LobOpen(OCI_Lob *lob, unsigned int mode)
Open explicitly a Lob.
void SetMonth(int value)
Set the date month value.
Interval(IntervalType type)
Create a new instance of the given type.
OCI_EXPORT big_int OCI_API OCI_GetBigInt(OCI_Resultset *rs, unsigned int index)
Return the current big integer value of the column at the given index in the resultset.
big_uint GetChunkSize() const
Returns the current lob chunk size.
bool operator!=(const Timestamp &other) const
Indicates if the current Timestamp value is not equal the given Timestamp value.
OCI_EXPORT unsigned int OCI_API OCI_DequeueGetNavigation(OCI_Dequeue *dequeue)
Return the navigation position of messages to retrieve from the queue.
unsigned int GetBusyConnectionsCount() const
Return the current number of busy connections/sessions.
OCI_EXPORT boolean OCI_API OCI_PoolGetNoWait(OCI_Pool *pool)
Get the waiting mode used when no more connections/sessions are available from the pool...
OCI_EXPORT unsigned int OCI_API OCI_DirPathConvert(OCI_DirPath *dp)
Convert provided user data to the direct path stream format.
OCI_EXPORT boolean OCI_API OCI_DateSetDate(OCI_Date *date, int year, int month, int day)
Set the date portion if the given date handle.
OCI_EXPORT int OCI_API OCI_DateDaysBetween(OCI_Date *date, OCI_Date *date2)
Return the number of days betWeen two dates.
void SetTimeZone(const ostring &timeZone)
Set the given time zone to the timestamp.
Connection GetConnection() const
Return the lob parent connection.
Object identifying the SQL data type INTERVAL.
OCI_EXPORT unsigned int OCI_API OCI_GetVersionConnection(OCI_Connection *con)
Return the highest Oracle version is supported by the connection.
OCI_EXPORT unsigned int OCI_API OCI_BindGetDataSizeAtPos(OCI_Bind *bnd, unsigned int position)
Return the actual size of the element at the given position in the bind input array.
OCI_EXPORT boolean OCI_API OCI_IsTAFCapable(OCI_Connection *con)
Verifiy if the given connection support TAF events.
bool operator!=(const Date &other) const
Indicates if the current date value is not equal the given date value.
OCI_EXPORT const void *OCI_API OCI_HandleGetEnvironment(void)
Return the OCI Environment Handle (OCIEnv *) of OCILIB library.
OCI_EXPORT int OCI_API OCI_MsgGetExpiration(OCI_Msg *msg)
Return the duration that the message is available for dequeuing.
static void Destroy(MutexHandle handle)
Destroy a mutex handle.
OCI_EXPORT boolean OCI_API OCI_BindDate(OCI_Statement *stmt, const otext *name, OCI_Date *data)
Bind a date variable.
File(const Connection &connection)
Parametrized constructor.
OCI_EXPORT boolean OCI_API OCI_CollFree(OCI_Coll *coll)
Free a local collection.
OCI_EXPORT boolean OCI_API OCI_DateSysDate(OCI_Date *date)
Return the current system date/time into the date handle.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfRaws(OCI_Statement *stmt, const otext *name, void *data, unsigned int len, unsigned int nbelem)
Bind an array of raw buffers.
OCI_EXPORT OCI_Object *OCI_API OCI_RefGetObject(OCI_Ref *ref)
Returns the object pointed by the Ref handle.
void GetTimeZoneOffset(int &hour, int &min) const
Return the time zone (hour, minute) offsets.
void EnableBuffering(bool value)
Enable / disable buffering mode on the given lob object.
OCI_EXPORT OCI_Coll *OCI_API OCI_ElemGetColl(OCI_Elem *elem)
Return the collection value of the given collection element.
bool IsValid() const
Check if the given interval is valid.
void Resume()
Resume a stopped global transaction.
void SetSeconds(int value)
Set the timestamp seconds value.
OCI_EXPORT unsigned int OCI_API OCI_CollGetCount(OCI_Coll *coll)
Returns the current number of elements of the given collection.
OCI_EXPORT OCI_Elem *OCI_API OCI_CollGetElem(OCI_Coll *coll, unsigned int index)
Return the element at the given position in the collection.
OCI_EXPORT boolean OCI_API OCI_ElemSetUnsignedInt(OCI_Elem *elem, unsigned int value)
Set a unsigned int value to a collection element.
OCI_EXPORT unsigned short OCI_API OCI_ObjectGetUnsignedShort(OCI_Object *obj, const otext *attr)
Return the unsigned short value of the given object attribute.
OCI_EXPORT const otext *OCI_API OCI_GetInstanceName(OCI_Connection *con)
Return the Oracle server Instance name of the connected database/service name.
OCI_EXPORT unsigned int OCI_API OCI_GetFetchMode(OCI_Statement *stmt)
Return the fetch mode of a SQL statement.
OCI_EXPORT boolean OCI_API OCI_SubscriptionAddStatement(OCI_Subscription *sub, OCI_Statement *stmt)
Add a statement to the notification to monitor.
OCI_EXPORT boolean OCI_API OCI_LobTruncate(OCI_Lob *lob, big_uint size)
Truncate the given lob to a shorter length.
Timestamp GetInstanceStartTime() const
Return the date and time (Timestamp) server instance start of the.
bool IsOpened() const
Check if the specified file is currently opened on the server by our object.
bool GetNoWait() const
Get the waiting mode used when no more connections/sessions are available from the pool...
OCI_EXPORT void *OCI_API OCI_ThreadKeyGetValue(const otext *name)
Get a thread key value.
void SetDay(int value)
Set the timestamp day value.
bool Seek(SeekMode seekMode, big_uint offset)
Move the current position within the lob for read/write operations.
OCI_EXPORT boolean OCI_API OCI_LobClose(OCI_Lob *lob)
Close explicitly a Lob.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfDates(OCI_Statement *stmt, const otext *name, OCI_Date **data, unsigned int nbelem)
Bind an array of dates.
bool IsValid() const
Check if the given timestamp is valid.
OCI_EXPORT OCI_Interval *OCI_API OCI_GetInterval2(OCI_Resultset *rs, const otext *name)
Return the current interval value of the column from its name in the resultset.
Date LastDay() const
Return the last day of month from the current date object.
void SetTimeout(unsigned int value)
Set the connections/sessions idle timeout.
OCI_EXPORT boolean OCI_API OCI_CollSetElem(OCI_Coll *coll, unsigned int index, OCI_Elem *elem)
Assign the given element value to the element at the given position in the collection.
LobType GetType() const
return the type of lob
virtual const char * what() const
Override the std::exception::what() method.
OCI_EXPORT boolean OCI_API OCI_DirPathAbort(OCI_DirPath *dp)
Terminate a direct path operation without committing changes.
Oracle internal date representation.
OCI_EXPORT boolean OCI_API OCI_CollAppend(OCI_Coll *coll, OCI_Elem *elem)
Append the given element at the end of the collection.
OCI_EXPORT boolean OCI_API OCI_ElemSetUnsignedBigInt(OCI_Elem *elem, big_uint value)
Set a unsigned big_int value to a collection element.
OCI_EXPORT boolean OCI_API OCI_BindLob(OCI_Statement *stmt, const otext *name, OCI_Lob *data)
Bind a Lob variable.
OCILIB encapsulation of Oracle DCN event.
OCI_EXPORT boolean OCI_API OCI_RegisterDouble(OCI_Statement *stmt, const otext *name)
Register a double output bind placeholder.
OCI_EXPORT unsigned int OCI_API OCI_GetColumnCount(OCI_Resultset *rs)
Return the number of columns in the resultset.
OCI_EXPORT unsigned int OCI_API OCI_DirPathGetErrorColumn(OCI_DirPath *dp)
Return the index of a column which caused an error during data conversion.
OCI_EXPORT unsigned int OCI_API OCI_ColumnGetCharsetForm(OCI_Column *col)
Return the charset form of the given column.
void(* POCI_NOTIFY)(OCI_Event *event)
Database Change Notification User callback prototype.
Enum< TimestampTypeValues > TimestampType
Type of Exception.
OCI_EXPORT boolean OCI_API OCI_AllowRebinding(OCI_Statement *stmt, boolean value)
Allow different host variables to be binded using the same bind name or position between executions o...
OCI_EXPORT boolean OCI_API OCI_Describe(OCI_Statement *stmt, const otext *sql)
Describe the select list of a SQL select statement.
Long(const Statement &statement)
Constructor.
OCI_EXPORT const otext *OCI_API OCI_BindGetName(OCI_Bind *bnd)
Return the name of the given bind.
void UpdateTimeZone(const ostring &timeZone)
Update the interval value with the given time zone.
OCI_EXPORT boolean OCI_API OCI_ServerEnableOutput(OCI_Connection *con, unsigned int bufsize, unsigned int arrsize, unsigned int lnsize)
Enable the server output.
OCI_EXPORT unsigned int OCI_API OCI_LobAppend(OCI_Lob *lob, void *buffer, unsigned int len)
Append a buffer at the end of a LOB.
OCI_EXPORT boolean OCI_API OCI_LobCopy(OCI_Lob *lob, OCI_Lob *lob_src, big_uint offset_dst, big_uint offset_src, big_uint count)
Copy a portion of a source LOB into a destination LOB.
bool IsAttributeNull(const ostring &name) const
Check if an object attribute is null.
OCI_EXPORT boolean OCI_API OCI_MsgSetSender(OCI_Msg *msg, OCI_Agent *sender)
Set the original sender of a message.
OCI_EXPORT const otext *OCI_API OCI_GetSQLVerb(OCI_Statement *stmt)
Return the verb of the SQL command held by the statement handle.
OCI_EXPORT const otext *OCI_API OCI_ErrorGetString(OCI_Error *err)
Retrieve error message from error handle.
void SetInfos(const ostring &directory, const ostring &name)
Set the directory and file name of our file object.
OCI_EXPORT const otext *OCI_API OCI_GetDomainName(OCI_Connection *con)
Return the Oracle server domain name of the connected database/service name.
OCI_EXPORT boolean OCI_API OCI_ObjectIsNull(OCI_Object *obj, const otext *attr)
Check if an object attribute is null.
OCI_EXPORT int OCI_API OCI_DequeueGetWaitTime(OCI_Dequeue *dequeue)
Return the time that OCIDequeueGet() waits for messages if no messages are currently available...
OCI_EXPORT boolean OCI_API OCI_Execute(OCI_Statement *stmt)
Execute a prepared SQL statement or PL/SQL block.
void SetStatementCacheSize(unsigned int value)
Set the maximum number of statements to keep in the statement cache.
bool operator==(const Date &other) const
Indicates if the current date value is equal to the given date value.
OCI_EXPORT boolean OCI_API OCI_ObjectFree(OCI_Object *obj)
Free a local object.
Oracle Collections (VARRAYs and Nested Tables) representation.
OCI_EXPORT boolean OCI_API OCI_ElemSetFile(OCI_Elem *elem, OCI_File *value)
Assign a File handle to a collection element.
OCI_EXPORT OCI_Error *OCI_API OCI_GetLastError(void)
Retrieve the last error or warning occurred within the last OCILIB call.
OCI_EXPORT boolean OCI_API OCI_TransactionPrepare(OCI_Transaction *trans)
Prepare a global transaction validation.
Enum< FailoverEventValues > FailoverEvent
Failover events.
OCI_EXPORT const otext *OCI_API OCI_FileGetDirectory(OCI_File *file)
Return the directory of the given file.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfInts(OCI_Statement *stmt, const otext *name, int *data, unsigned int nbelem)
Bind an array of integers.
void AddDays(int days)
Add or subtract days.
static unsigned int GetRuntimeVersion()
Return the version of OCI used at runtime.
OCI_EXPORT unsigned int OCI_API OCI_DirPathGetAffectedRows(OCI_DirPath *dp)
return the number of rows successfully processed during in the last conversion or loading call ...
OCI_EXPORT OCI_Date *OCI_API OCI_MsgGetEnqueueTime(OCI_Msg *msg)
return the time the message was enqueued
static void Destroy(ThreadHandle handle)
Destroy a thread.
TLongObjectType GetContent() const
Return the string read from a fetch sequence.
void Append(const TDataType &data)
Append the given element value at the end of the collection.
TimestampType GetType() const
Return the type of the given timestamp object.
OCI_EXPORT int OCI_API OCI_GetInt(OCI_Resultset *rs, unsigned int index)
Return the current integer value of the column at the given index in the resultset.
void SetTime(int hour, int min, int sec)
Set the time part.
OCI_EXPORT unsigned int OCI_API OCI_GetCurrentRow(OCI_Resultset *rs)
Retrieve the current row number.
Type info metadata handle.
OCI_EXPORT OCI_Connection *OCI_API OCI_SubscriptionGetConnection(OCI_Subscription *sub)
Return the connection handle associated with a subscription handle.
Enum< CollectionTypeValues > CollectionType
Collection type.
OCI_EXPORT boolean OCI_API OCI_ObjectSetUnsignedInt(OCI_Object *obj, const otext *attr, unsigned int value)
Set an object attribute of type unsigned int.
unsigned int Write(const TLobObjectType &content)
Write the given content at the current position within the lob.
OCI_EXPORT float OCI_API OCI_GetFloat2(OCI_Resultset *rs, const otext *name)
Return the current float value of the column from its name in the resultset.
bool operator>=(const Interval &other) const
Indicates if the current Interval value is superior or equal to the given Interval value...
OCI_EXPORT big_int OCI_API OCI_GetBigInt2(OCI_Resultset *rs, const otext *name)
Return the current big integer value of the column from its name in the resultset.
bool operator!=(const File &other) const
Indicates if the current file value is not equal the given file value.
Long< ostring, LongCharacter > Clong
Class handling LONG oracle type.
OCI_EXPORT boolean OCI_API OCI_DirPathSetCurrentRows(OCI_DirPath *dp, unsigned int nb_rows)
Set the current number of rows to convert and load.
void Start()
Start global transaction.
void SysTimestamp()
Assign the current system timestamp to the current timestamp object.
OCI_EXPORT boolean OCI_API OCI_MsgGetRaw(OCI_Msg *msg, void *raw, unsigned int *size)
Get the RAW payload of the given message.
Raw Read(unsigned int size)
Read a portion of a file.
OCI_EXPORT boolean OCI_API OCI_MutexRelease(OCI_Mutex *mutex)
Release a mutex lock.
void SetMilliSeconds(int value)
Set the timestamp milliseconds value.
OCI_EXPORT boolean OCI_API OCI_TimestampConstruct(OCI_Timestamp *tmsp, int year, int month, int day, int hour, int min, int sec, int fsec, const otext *time_zone)
Set a timestamp handle value.
OCI_EXPORT boolean OCI_API OCI_TimestampSubtract(OCI_Timestamp *tmsp, OCI_Timestamp *tmsp2, OCI_Interval *itv)
Store the difference of two timestamp handles into an interval handle.
static AnyPointer GetValue(const ostring &name)
Get a thread key value.
OCI_EXPORT int OCI_API OCI_MsgGetPriority(OCI_Msg *msg)
Return the priority of the message.
void DisableServerOutput()
Disable the server output.
OCI_EXPORT boolean OCI_API OCI_DateZoneToZone(OCI_Date *date, const otext *zone1, const otext *zone2)
Convert a date from one zone to another zone.
OCI_EXPORT unsigned int OCI_API OCI_CollGetSize(OCI_Coll *coll)
Returns the total number of elements of the given collection.
OCI_EXPORT const void *OCI_API OCI_HandleGetThreadID(OCI_Thread *thread)
Return OCI Thread ID (OCIThreadId *) of an OCILIB OCI_Thread object.
OCI_EXPORT boolean OCI_API OCI_MsgFree(OCI_Msg *msg)
Free a message object.
OCI_EXPORT boolean OCI_API OCI_RegisterUnsignedInt(OCI_Statement *stmt, const otext *name)
Register an unsigned integer output bind placeholder.
OCI_EXPORT boolean OCI_API OCI_EnqueueSetVisibility(OCI_Enqueue *enqueue, unsigned int visibility)
Set whether the new message is enqueued as part of the current transaction.
OCI_EXPORT unsigned int OCI_API OCI_PoolGetBusyCount(OCI_Pool *pool)
Return the current number of busy connections/sessions.
OCI_EXPORT OCI_Connection *OCI_API OCI_ConnectionCreate(const otext *db, const otext *user, const otext *pwd, unsigned int mode)
Create a physical connection to an Oracle database server.
OCILIB encapsulation of A/Q Agent.
OCI_EXPORT double OCI_API OCI_GetDouble(OCI_Resultset *rs, unsigned int index)
Return the current double value of the column at the given index in the resultset.
OCI_EXPORT boolean OCI_API OCI_CollAssign(OCI_Coll *coll, OCI_Coll *coll_src)
Assign a collection to another one.
OCI_EXPORT unsigned int OCI_API OCI_SubscriptionGetTimeout(OCI_Subscription *sub)
Return the timeout of the given registered subscription.
OCI_EXPORT OCI_Agent *OCI_API OCI_MsgGetSender(OCI_Msg *msg)
Return the original sender of a message.
OCI_EXPORT boolean OCI_API OCI_SetHAHandler(POCI_HA_HANDLER handler)
Set the High availability (HA) user handler.
Enum< HAEventSourceValues > HAEventSource
Source of HA events.
Interval & operator-=(const Interval &other)
Decrement the current Value with the given Interval value.
OCI_EXPORT boolean OCI_API OCI_DateToText(OCI_Date *date, const otext *fmt, int size, otext *str)
Convert a Date value from the given date handle to a string.
OCI_EXPORT short OCI_API OCI_ElemGetShort(OCI_Elem *elem)
Return the short value of the given collection element.
static void SetValue(const ostring &name, AnyPointer value)
Set a thread key value.
OCI_EXPORT const otext *OCI_API OCI_EventGetDatabase(OCI_Event *event)
Return the name of the database that generated the event.
OCI_EXPORT boolean OCI_API OCI_RegisterObject(OCI_Statement *stmt, const otext *name, OCI_TypeInfo *typinf)
Register an object output bind placeholder.
OCI_EXPORT boolean OCI_API OCI_ObjectSetBigInt(OCI_Object *obj, const otext *attr, big_int value)
Set an object attribute of type big int.
OCI_EXPORT OCI_Lob *OCI_API OCI_LobCreate(OCI_Connection *con, unsigned int type)
Create a local temporary Lob instance.
static MutexHandle Create()
Create a Mutex handle.
OCI_EXPORT const otext *OCI_API OCI_GetDatabase(OCI_Connection *con)
Return the name of the connected database/service name.
Enum< HAEventTypeValues > HAEventType
Type of HA events.
OCI_EXPORT boolean OCI_API OCI_IntervalAdd(OCI_Interval *itv, OCI_Interval *itv2)
Adds an interval handle value to another.
OCI_EXPORT boolean OCI_API OCI_BindTimestamp(OCI_Statement *stmt, const otext *name, OCI_Timestamp *data)
Bind a timestamp variable.
OCI_EXPORT boolean OCI_API OCI_SetTrace(OCI_Connection *con, unsigned int trace, const otext *value)
Set tracing information to the session of the given connection.
OCI_EXPORT boolean OCI_API OCI_ObjectSetDate(OCI_Object *obj, const otext *attr, OCI_Date *value)
Set an object attribute of type Date.
ostring GetTrace(SessionTrace trace) const
Get the current trace for the trace type from the given connection.
void SetElementNull(unsigned int index)
Nullify the element at the given index.
OCI_EXPORT boolean OCI_API OCI_FetchNext(OCI_Resultset *rs)
Fetch the next row of the resultset.
OCI_EXPORT float OCI_API OCI_GetFloat(OCI_Resultset *rs, unsigned int index)
Return the current float value of the column at the given index in the resultset. ...
big_uint GetLength() const
Returns the number of characters or bytes contained in the lob.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfFiles(OCI_Statement *stmt, const otext *name, OCI_File **data, unsigned int type, unsigned int nbelem)
Bind an array of File handles.
OCI_EXPORT boolean OCI_API OCI_MsgSetRaw(OCI_Msg *msg, const void *raw, unsigned int size)
Set the RAW payload of the given message.
OCI_EXPORT boolean OCI_API OCI_MsgSetConsumers(OCI_Msg *msg, OCI_Agent **consumers, unsigned int count)
Set the recipient list of a message to enqueue.
Date & operator--()
Decrement the date by 1 day.
OCI_EXPORT boolean OCI_API OCI_QueueTableMigrate(OCI_Connection *con, const otext *queue_table, const otext *compatible)
Migrate a queue table from one version to another.
OCI_EXPORT boolean OCI_API OCI_ObjectSetTimestamp(OCI_Object *obj, const otext *attr, OCI_Timestamp *value)
Set an object attribute of type Timestamp.
unsigned int GetColumnCount() const
Return the number of columns contained in the type.
OCI_EXPORT boolean OCI_API OCI_RegisterLob(OCI_Statement *stmt, const otext *name, unsigned int type)
Register a lob output bind placeholder.
OCI_EXPORT boolean OCI_API OCI_ThreadFree(OCI_Thread *thread)
Destroy a thread object.
void Set(unsigned int index, const TDataType &value)
Set the collection element value at the given position.
STL compliant bi-directional iterator class.
OCI_EXPORT boolean OCI_API OCI_TimestampIntervalAdd(OCI_Timestamp *tmsp, OCI_Interval *itv)
Add an interval value to a timestamp value of a timestamp handle.
OCI_EXPORT OCI_Date *OCI_API OCI_ObjectGetDate(OCI_Object *obj, const otext *attr)
Return the date value of the given object attribute.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfStrings(OCI_Statement *stmt, const otext *name, otext *data, unsigned int len, unsigned int nbelem)
Bind an array of strings.
unsigned int GetServerRevisionVersion() const
Return the revision version number of the connected database server.
OCI_EXPORT boolean OCI_API OCI_ObjectGetSelfRef(OCI_Object *obj, OCI_Ref *ref)
Retrieve an Oracle Ref handle from an object and assign it to the given OCILIB OCI_Ref handle...
OCI_EXPORT boolean OCI_API OCI_PoolFree(OCI_Pool *pool)
Destroy a pool object.
OCI_EXPORT OCI_Coll *OCI_API OCI_CollCreate(OCI_TypeInfo *typinf)
Create a local collection instance.
Oracle internal timestamp representation.
Interval operator+(const Interval &other)
Return a new Interval holding the sum of the current Interval value and the given Interval value...
OCI_EXPORT unsigned int OCI_API OCI_GetFetchSize(OCI_Statement *stmt)
Return the number of rows fetched per internal server fetch call.
void SetMonth(int value)
Set the timestamp month value.
OCI_EXPORT boolean OCI_API OCI_ColumnGetNullable(OCI_Column *col)
Return the nullable attribute of the column.
OCI_EXPORT const otext *OCI_API OCI_FileGetName(OCI_File *file)
Return the name of the given file.
OCI_EXPORT unsigned int OCI_API OCI_GetStatementType(OCI_Statement *stmt)
Return the type of a SQL statement.
OCI_EXPORT boolean OCI_API OCI_QueueCreate(OCI_Connection *con, const otext *queue_name, const otext *queue_table, unsigned int queue_type, unsigned int max_retries, unsigned int retry_delay, unsigned int retention_time, boolean dependency_tracking, const otext *comment)
Create a queue.
OCI_EXPORT unsigned int OCI_API OCI_GetRaw(OCI_Resultset *rs, unsigned int index, void *buffer, unsigned int len)
Copy the current raw value of the column at the given index into the specified buffer.
OCI_EXPORT boolean OCI_API OCI_FileSeek(OCI_File *file, big_uint offset, unsigned int mode)
Perform a seek operation on the OCI_File content buffer.
OCI_EXPORT boolean OCI_API OCI_SetAutoCommit(OCI_Connection *con, boolean enable)
Enable / disable auto commit mode.
OCI_EXPORT boolean OCI_API OCI_LobIsTemporary(OCI_Lob *lob)
Check if the given lob is a temporary lob.
OCI_EXPORT 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_EXPORT const otext *OCI_API OCI_GetDefaultFormatNumeric(OCI_Connection *con)
Return the current numeric format for implicit string / numeric conversions.
ostring ToString() const
return a string representation of the current object
OCI_EXPORT boolean OCI_API OCI_DirPathSetNoLog(OCI_DirPath *dp, boolean value)
Set the logging mode for the loading operation.
OCI_EXPORT boolean OCI_API OCI_IsConnected(OCI_Connection *con)
Returns TRUE is the given connection is still connected otherwise FALSE.
static void SetHAHandler(HAHandlerProc handler)
Set the High availability (HA) user handler.
TDataType Get(unsigned int index) const
Return the collection element value at the given position.
OCI_EXPORT boolean OCI_API OCI_QueueTableCreate(OCI_Connection *con, const otext *queue_table, const otext *queue_payload_type, const otext *storage_clause, const otext *sort_list, boolean multiple_consumers, unsigned int message_grouping, const otext *comment, unsigned int primary_instance, unsigned int secondary_instance, const otext *compatible)
Create a queue table for messages of the given type.
OCI_EXPORT OCI_Bind *OCI_API OCI_GetBind2(OCI_Statement *stmt, const otext *name)
Return a bind handle from its name.
OCI_EXPORT boolean OCI_API OCI_Prepare(OCI_Statement *stmt, const otext *sql)
Prepare a SQL statement or PL/SQL block.
OCI_EXPORT boolean OCI_API OCI_DequeueSetAgentList(OCI_Dequeue *dequeue, OCI_Agent **consumers, unsigned int count)
Set the Agent list to listen to message for.
bool operator!=(const Lob &other) const
Indicates if the current lob value is not equal the given lob value.
OCI_EXPORT boolean OCI_API OCI_PoolSetTimeout(OCI_Pool *pool, unsigned int value)
Set the connections/sessions idle timeout.
void SetDate(int year, int month, int day)
Set the date part.
OCI_EXPORT OCI_File *OCI_API OCI_GetFile(OCI_Resultset *rs, unsigned int index)
Return the current File value of the column at the given index in the resultset.
ostring GetTimeZone() const
Return the name of the current time zone.
OCI_EXPORT boolean OCI_API OCI_DateSetDateTime(OCI_Date *date, int year, int month, int day, int hour, int min, int sec)
Set the date and time portions if the given date handle.
Connection GetConnection(const ostring &sessionTag=OTEXT(""))
Get a connection from the pool.
OCI_EXPORT boolean OCI_API OCI_ObjectSetInt(OCI_Object *obj, const otext *attr, int value)
Set an object attribute of type int.
OCI_EXPORT big_uint OCI_API OCI_LobGetLength(OCI_Lob *lob)
Return the actual length of a lob.
Connection GetConnection() const
Return the connection associated with a statement.
OCI_EXPORT unsigned int OCI_API OCI_GetServerMajorVersion(OCI_Connection *con)
Return the major version number of the connected database server.
OCI_EXPORT 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.
OCI_EXPORT OCI_Lob *OCI_API OCI_ElemGetLob(OCI_Elem *elem)
Return the Lob value of the given collection element.
OCI_EXPORT boolean OCI_API OCI_LobEnableBuffering(OCI_Lob *lob, boolean value)
Enable / disable buffering mode on the given lob handle.
ostring GetConnectionString() const
Return the name of the connected database/service name.
OCI_EXPORT unsigned int OCI_API OCI_GetStatementCacheSize(OCI_Connection *con)
Return the maximum number of statements to keep in the statement cache.
OCI_EXPORT boolean OCI_API OCI_SetTransaction(OCI_Connection *con, OCI_Transaction *trans)
Set a transaction to a connection.
OCI_EXPORT boolean OCI_API OCI_CollTrim(OCI_Coll *coll, unsigned int nb_elem)
Trims the given number of elements from the end of the collection.
void Open(const ostring &db, const ostring &user, const ostring &pwd, Environment::SessionFlags sessionFlags=Environment::SessionDefault)
Create a physical connection to an Oracle database server.
OCI_EXPORT boolean OCI_API OCI_RefFree(OCI_Ref *ref)
Free a local Ref.
OCI_EXPORT OCI_Transaction *OCI_API OCI_GetTransaction(OCI_Connection *con)
Return the current transaction of the connection.
AnyPointer GetUserData()
Return the pointer to user data previously associated with the connection.
Enum< CharsetModeValues > CharsetMode
Environment charset mode.
OCI_EXPORT boolean OCI_API OCI_DateNextDay(OCI_Date *date, const otext *day)
Gets the date of next day of the week, after a given date.
OCI_EXPORT boolean OCI_API OCI_Rollback(OCI_Connection *con)
Cancel current pending changes.
OCI_EXPORT OCI_TypeInfo *OCI_API OCI_ObjectGetTypeInfo(OCI_Object *obj)
Return the type info object associated to the object.
OCI_EXPORT unsigned int OCI_API OCI_LongGetSize(OCI_Long *lg)
Return the buffer size of a long object in bytes (OCI_BLONG) or character (OCI_CLONG) ...
void Execute()
Execute a prepared SQL statement or PL/SQL block.
OCI_EXPORT boolean OCI_API OCI_FileOpen(OCI_File *file)
Open a file for reading.
OCI_EXPORT boolean OCI_API OCI_FetchSeek(OCI_Resultset *rs, unsigned int mode, int offset)
Custom Fetch of the resultset.
OCI_EXPORT boolean OCI_API OCI_IntervalGetYearMonth(OCI_Interval *itv, int *year, int *month)
Return the year / month portion of an interval handle.
OCI_EXPORT boolean OCI_API OCI_IntervalSetDaySecond(OCI_Interval *itv, int day, int hour, int min, int sec, int fsec)
Set the day / time portion if the given interval handle.
OCI_EXPORT void OCI_API OCI_EnableWarnings(boolean value)
Enable or disable Oracle warning notifications.
int GetHours() const
Return the interval hours value.
Pool()
Default constructor.
Template Flags template class providing some type safety to some extends for manipulating flags set v...
Enum< TypeInfoTypeValues > TypeInfoType
Type of object information.
OCI_EXPORT boolean OCI_API OCI_ElemSetColl(OCI_Elem *elem, OCI_Coll *value)
Assign a Collection handle to a collection element.
int GetSeconds() const
Return the interval seconds value.
OCI_EXPORT unsigned int OCI_API OCI_DequeueGetVisibility(OCI_Dequeue *dequeue)
Get the dequeuing/locking behavior.
OCI_EXPORT boolean OCI_API OCI_ElemSetDate(OCI_Elem *elem, OCI_Date *value)
Assign a Date handle to a collection element.
OCI_EXPORT boolean OCI_API OCI_ObjectSetUnsignedShort(OCI_Object *obj, const otext *attr, unsigned short value)
Set an object attribute of type unsigned short.
OCI_EXPORT unsigned int OCI_API OCI_GetDataLength(OCI_Resultset *rs, unsigned int index)
Return the current row data length of the column at the given index in the resultset.
void SetDay(int value)
Set the interval day value.
unsigned int GetVersion() const
Return the Oracle version supported by the connection.
OCI_EXPORT boolean OCI_API OCI_RegisterString(OCI_Statement *stmt, const otext *name, unsigned int len)
Register a string output bind placeholder.
OCI_EXPORT boolean OCI_API OCI_RegisterShort(OCI_Statement *stmt, const otext *name)
Register a short output bind placeholder.
void Commit()
Commit current pending changes.
OCI_EXPORT OCI_Object *OCI_API OCI_ElemGetObject(OCI_Elem *elem)
Return the object value of the given collection element.
Enum< ImportModeValues > ImportMode
OCI libraries import mode.
OCI_EXPORT unsigned int OCI_API OCI_GetSQLCommand(OCI_Statement *stmt)
Return the Oracle SQL code the command held by the statement handle.
OCI_EXPORT unsigned int OCI_API OCI_DirPathGetRowCount(OCI_DirPath *dp)
Return the number of rows successfully loaded into the database so far.
void Break()
Perform an immediate abort of any currently Oracle OCI call on the given connection.
OCI_EXPORT boolean OCI_API OCI_TimestampAssign(OCI_Timestamp *tmsp, OCI_Timestamp *tmsp_src)
Assign the value of a timestamp handle to another one.
static void StartDatabase(const ostring &db, const ostring &user, const ostring &pwd, Environment::StartFlags startFlags, Environment::StartMode startMode, Environment::SessionFlags sessionFlags=SessionSysDba, const ostring &spfile=OTEXT(""))
Start a database instance.
OCI_EXPORT boolean OCI_API OCI_DirPathSetConvertMode(OCI_DirPath *dp, unsigned int mode)
Set the direct path conversion mode.
OCI_EXPORT int OCI_API OCI_ColumnGetFractionalPrecision(OCI_Column *col)
Return the fractional precision of the column for timestamp and interval columns. ...
void SetYear(int value)
Set the timestamp year value.
OCI_EXPORT unsigned int OCI_API OCI_GetPrefetchMemory(OCI_Statement *stmt)
Return the amount of memory used to retrieve rows pre-fetched by OCI Client.
OCI_EXPORT boolean OCI_API OCI_SetPrefetchSize(OCI_Statement *stmt, unsigned int size)
Set the number of rows pre-fetched by OCI Client.
OCI_EXPORT boolean OCI_API OCI_DequeueGetRelativeMsgID(OCI_Dequeue *dequeue, void *id, unsigned int *len)
Get the message identifier of the message to be dequeued.
OCI_EXPORT boolean OCI_API OCI_DirPathSetParallel(OCI_DirPath *dp, boolean value)
Set the parallel loading mode.
OCI_EXPORT boolean OCI_API OCI_DequeueSetCorrelation(OCI_Dequeue *dequeue, const otext *pattern)
set the correlation identifier of the message to be dequeued
OCILIB encapsulation of A/Q message.
int GetDay() const
Return the timestamp day value.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfRefs(OCI_Statement *stmt, const otext *name, OCI_Ref **data, OCI_TypeInfo *typinf, unsigned int nbelem)
Bind an array of Ref handles.
OCI_EXPORT boolean OCI_API OCI_QueueAlter(OCI_Connection *con, const otext *queue_name, unsigned int max_retries, unsigned int retry_delay, unsigned int retention_time, const otext *comment)
Alter the given queue.
std::vector< unsigned char > Raw
C++ counterpart of SQL RAW data type.
OCI_EXPORT OCI_Dequeue *OCI_API OCI_DequeueCreate(OCI_TypeInfo *typinf, const otext *name)
Create a Dequeue object for the given queue.
bool operator>(const Timestamp &other) const
Indicates if the current Timestamp value is superior to the given Timestamp value.
OCI_EXPORT OCI_Error *OCI_API OCI_GetBatchError(OCI_Statement *stmt)
Returns the first or next error that occurred within a DML array statement execution.
Transaction(const Connection &connection, unsigned int timeout, TransactionFlags flags, OCI_XID *pxid=NULL)
Create a new global transaction or a serializable/read-only local transaction.
unsigned int GetMaxSize() const
Return the maximum number of connections/sessions that can be opened to the database.
OCI_EXPORT OCI_Resultset *OCI_API OCI_GetNextResultset(OCI_Statement *stmt)
Retrieve the next available resultset.
OCI_EXPORT unsigned int OCI_API OCI_TransactionGetTimeout(OCI_Transaction *trans)
Return global transaction Timeout.
OCI_EXPORT boolean OCI_API OCI_ElemSetInt(OCI_Elem *elem, int value)
Set a int value to a collection element.
OCI_EXPORT boolean OCI_API OCI_LongFree(OCI_Long *lg)
Free a local temporary long.
Connection GetConnection() const
Return the file parent connection.
OCI_EXPORT double OCI_API OCI_ElemGetDouble(OCI_Elem *elem)
Return the Double value of the given collection element.
OCI_EXPORT boolean OCI_API OCI_RegisterRef(OCI_Statement *stmt, const otext *name, OCI_TypeInfo *typinf)
Register a Ref output bind placeholder.
OCI_EXPORT boolean OCI_API OCI_TimestampToText(OCI_Timestamp *tmsp, const otext *fmt, int size, otext *str, int precision)
Convert a timestamp value from the given timestamp handle to a string.
OCI_EXPORT short OCI_API OCI_GetShort(OCI_Resultset *rs, unsigned int index)
Return the current short value of the column at the given index in the resultset. ...
Iterator begin()
Returns an iterator pointing to the first element in the collection.
void Set(const ostring &name, const TDataType &value)
Set the given object attribute value.
Provides type information on Oracle Database objects.
OCI_EXPORT boolean OCI_API OCI_SetPrefetchMemory(OCI_Statement *stmt, unsigned int size)
Set the amount of memory pre-fetched by OCI Client.
unsigned int GetIncrement() const
Return the increment for connections/sessions to be opened to the database when the pool is not full...
unsigned int GetServerMajorVersion() const
Return the major version number of the connected database server.
void SysDate()
Assign the current system date time to the current date object.
int GetMonth() const
Return the timestamp month value.
OCI_EXPORT const otext *OCI_API OCI_EventGetRowid(OCI_Event *event)
Return the rowid of the altered database object row.
OCI_EXPORT unsigned int OCI_API OCI_DirPathGetErrorRow(OCI_DirPath *dp)
Return the index of a row which caused an error during data conversion.
void Rollback()
Cancel current pending changes.
OCI_EXPORT const otext *OCI_API OCI_ElemGetString(OCI_Elem *elem)
Return the String value of the given collection element.
OCI_EXPORT const otext *OCI_API OCI_GetServiceName(OCI_Connection *con)
Return the Oracle server service name of the connected database/service name.
OCI_EXPORT OCI_Object *OCI_API OCI_MsgGetObject(OCI_Msg *msg)
Get the object payload of the given message.
OCI_EXPORT boolean OCI_API OCI_BindShort(OCI_Statement *stmt, const otext *name, short *data)
Bind an short variable.
OCI_EXPORT boolean OCI_API OCI_ElemSetDouble(OCI_Elem *elem, double value)
Set a double value to a collection element.
OCI_EXPORT const otext *OCI_API OCI_DequeueGetConsumer(OCI_Dequeue *dequeue)
Get the current consumer name associated with the dequeuing process.
TypeInfoType GetType() const
Return the type of the given TypeInfo object.
OCI_EXPORT boolean OCI_API OCI_ElemSetObject(OCI_Elem *elem, OCI_Object *value)
Assign an Object handle to a collection element.
Lob Clone() const
Clone the current instance to a new one performing deep copy.
OCI_EXPORT unsigned int OCI_API OCI_GetUnsignedInt(OCI_Resultset *rs, unsigned int index)
Return the current unsigned integer value of the column at the given index in the resultset...
OCI_EXPORT boolean OCI_API OCI_RefIsNull(OCI_Ref *ref)
Check if the Ref points to an object or not.
Lob(const Connection &connection)
Parametrized constructor.
OCI_EXPORT unsigned int OCI_API OCI_GetOCIRuntimeVersion(void)
Return the version of OCI used at runtime.
OCI_EXPORT boolean OCI_API OCI_BindFloat(OCI_Statement *stmt, const otext *name, float *data)
Bind a float variable.
OCI_EXPORT boolean OCI_API OCI_IsNull2(OCI_Resultset *rs, const otext *name)
Check if the current row value is null for the column of the given name in the resultset.
OCI_EXPORT boolean OCI_API OCI_TimestampGetDate(OCI_Timestamp *tmsp, int *year, int *month, int *day)
Extract the date part from a timestamp handle.
Date & operator-=(int value)
Decrement the date by the given number of days.
OCI_EXPORT boolean OCI_API OCI_DequeueSetMode(OCI_Dequeue *dequeue, unsigned int mode)
Set the dequeuing/locking behavior.
ostring GetServerVersion() const
Return the connected database server string version.
unsigned int GetOpenedConnectionsCount() const
Return the current number of opened connections/sessions.
void GetDaySecond(int &day, int &hour, int &min, int &sec, int &fsec) const
Extract the date / second parts from the interval value.
bool IsTemporary() const
Check if the given lob is a temporary lob.
OCI_EXPORT big_uint OCI_API OCI_LobGetMaxSize(OCI_Lob *lob)
Return the maximum size that the lob can contain.
OCI_EXPORT int OCI_API OCI_ElemGetInt(OCI_Elem *elem)
Return the int value of the given collection element.
OCI_EXPORT boolean OCI_API OCI_FileClose(OCI_File *file)
Close a file.
OCI_EXPORT boolean OCI_API OCI_DirPathPrepare(OCI_DirPath *dp)
Prepares the OCI direct path load interface before any rows can be converted or loaded.
big_uint GetOffset() const
Returns the current R/W offset within the file.
OCI_EXPORT void *OCI_API OCI_LongGetBuffer(OCI_Long *lg)
Return the internal buffer of an OCI_Long object read from a fetch sequence.
bool Exists() const
Check if the given file exists on server.
unsigned int GetStatementCacheSize() const
Return the maximum number of statements to keep in the pool's statement cache.
OCI_EXPORT boolean OCI_API OCI_SetFetchSize(OCI_Statement *stmt, unsigned int size)
Set the number of rows fetched per internal server fetch call.
bool operator==(const File &other) const
Indicates if the current file value is equal the given file value.
OCI_EXPORT 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_EXPORT unsigned int OCI_API OCI_EnqueueGetSequenceDeviation(OCI_Enqueue *enqueue)
Return the sequence deviation of messages to enqueue to the queue.
void EnableServerOutput(unsigned int bufsize, unsigned int arrsize, unsigned int lnsize)
Enable the server output.
OCI_EXPORT OCI_Msg *OCI_API OCI_DequeueGet(OCI_Dequeue *dequeue)
Dequeue messages from the given queue.
OCI_EXPORT OCI_Agent *OCI_API OCI_AgentCreate(OCI_Connection *con, const otext *name, const otext *address)
Create an AQ agent object.
unsigned int GetSize() const
Returns the total number of elements in the collection.
bool operator<=(const Interval &other) const
Indicates if the current Interval value is inferior or equal to the given Interval value...
OCI_EXPORT unsigned int OCI_API OCI_GetBindMode(OCI_Statement *stmt)
Return the binding mode of a SQL statement.
ostring ToString(const ostring &format=OCI_STRING_FORMAT_DATE) const
Convert the date value to a string.
OCI_EXPORT big_int OCI_API OCI_ObjectGetBigInt(OCI_Object *obj, const otext *attr)
Return the big integer value of the given object attribute.
OCI_EXPORT boolean OCI_API OCI_TimestampSysTimestamp(OCI_Timestamp *tmsp)
Stores the system current date and time as a timestamp value with time zone into the timestamp handle...
bool Seek(SeekMode seekMode, big_uint offset)
Move the current position within the file for read/write operations.
Date NextDay(const ostring &day) const
Return the date of next day of the week, after the current date object.
OCI_EXPORT unsigned int OCI_API OCI_CollGetType(OCI_Coll *coll)
Return the collection type.
Date & operator+=(int value)
Increment the date by the given number of days.
OCI_EXPORT boolean OCI_API OCI_CollToText(OCI_Coll *coll, unsigned int *size, otext *str)
Convert a collection handle value to a string.
big_uint GetMaxSize() const
Returns the lob maximum possible size.
OCI_EXPORT boolean OCI_API OCI_SetSessionTag(OCI_Connection *con, const otext *tag)
Associate a tag to the given connection/session.
OCI_EXPORT boolean OCI_API OCI_BindIsNullAtPos(OCI_Bind *bnd, unsigned int position)
Check if the current entry value at the given index of the binded array is marked as NULL...
Enum< FailoverRequestValues > FailoverRequest
Failover requests.
OCI_EXPORT boolean OCI_API OCI_MsgSetExpiration(OCI_Msg *msg, int value)
set the duration that the message is available for dequeuing
OCI_EXPORT unsigned int OCI_API OCI_TimestampGetType(OCI_Timestamp *tmsp)
Return the type of the given Timestamp object.
OCI_EXPORT boolean OCI_API OCI_IntervalFromText(OCI_Interval *itv, const otext *str)
Convert a string to an interval and store it in the given interval handle.
void GetYearMonth(int &year, int &month) const
Extract the year / month parts from the interval value.
void SetTime(int hour, int min, int sec, int fsec)
Set the time part.
Lob< ostring, LobNationalCharacter > NClob
Class handling NCLOB oracle type.
OCI_EXPORT OCI_Timestamp *OCI_API OCI_TimestampCreate(OCI_Connection *con, unsigned int type)
Create a local Timestamp instance.
OCI_EXPORT boolean OCI_API OCI_ObjectSetInterval(OCI_Object *obj, const otext *attr, OCI_Interval *value)
Set an object attribute of type Interval.
bool operator<=(const Timestamp &other) const
Indicates if the current Timestamp value is inferior or equal to the given Timestamp value...
static void Acquire(MutexHandle handle)
Acquire a mutex lock.
OCI_EXPORT boolean OCI_API OCI_SetStatementCacheSize(OCI_Connection *con, unsigned int value)
Set the maximum number of statements to keep in the statement cache.
void SetReferenceNull()
Nullify the given Ref handle.
OCI_EXPORT OCI_Thread *OCI_API OCI_ThreadCreate(void)
Create a Thread object.
int GetMinutes() const
Return the timestamp minutes value.
void SetAttributeNull(const ostring &name)
Set the given object attribute to null.
OCI_EXPORT boolean OCI_API OCI_ObjectSetFloat(OCI_Object *obj, const otext *attr, float value)
Set an object attribute of type float.
OCI_EXPORT OCI_Coll *OCI_API OCI_ObjectGetColl(OCI_Object *obj, const otext *attr)
Return the collection value of the given object attribute.
OCI_EXPORT boolean OCI_API OCI_SetLongMode(OCI_Statement *stmt, unsigned int mode)
Set the long datatype handling mode of a SQL statement.
OCI_EXPORT boolean OCI_API OCI_AgentFree(OCI_Agent *agent)
Free an AQ agent object.
OCI_EXPORT OCI_Long *OCI_API OCI_GetLong2(OCI_Resultset *rs, const otext *name)
Return the current Long value of the column from its name in the resultset.
OCI_EXPORT int OCI_API OCI_IntervalCheck(OCI_Interval *itv)
Check if the given interval is valid.
OCI_EXPORT OCI_Connection *OCI_API OCI_StatementGetConnection(OCI_Statement *stmt)
Return the connection handle associated with a statement handle.
OCI_EXPORT boolean OCI_API OCI_QueueTableDrop(OCI_Connection *con, const otext *queue_table, boolean force)
Drop the given queue table.
OCI_EXPORT OCI_Timestamp *OCI_API OCI_GetTimestamp(OCI_Resultset *rs, unsigned int index)
Return the current timestamp value of the column at the given index in the resultset.
OCI_EXPORT boolean OCI_API OCI_BindLong(OCI_Statement *stmt, const otext *name, OCI_Long *data, unsigned int size)
Bind a Long variable.
OCI_EXPORT unsigned int OCI_API OCI_GetBindCount(OCI_Statement *stmt)
Return the number of binds currently associated to a statement.
OCI_EXPORT OCI_Agent *OCI_API OCI_DequeueListen(OCI_Dequeue *dequeue, int timeout)
Listen for messages that match any recipient of the associated Agent list.
unsigned int GetMax() const
Returns the maximum number of elements for the collection.
OCI_EXPORT boolean OCI_API OCI_MsgSetPriority(OCI_Msg *msg, int value)
Set the priority of the message.
OCI_EXPORT int OCI_API OCI_MsgGetEnqueueDelay(OCI_Msg *msg)
Return the number of seconds that a message is delayed for dequeuing.
Object identifying the SQL data type LOB (CLOB, NCLOB and BLOB)
OCI_EXPORT OCI_TypeInfo *OCI_API OCI_ColumnGetTypeInfo(OCI_Column *col)
Return the type information object associated to the column.
OCI_EXPORT unsigned int OCI_API OCI_PoolGetTimeout(OCI_Pool *pool)
Get the idle timeout for connections/sessions in the pool.
OCI_EXPORT boolean OCI_API OCI_RegisterTimestamp(OCI_Statement *stmt, const otext *name, unsigned int type)
Register a timestamp output bind placeholder.
OCI_EXPORT OCI_File *OCI_API OCI_ObjectGetFile(OCI_Object *obj, const otext *attr)
Return the file value of the given object attribute.
TLobObjectType Read(unsigned int length)
Read a portion of a lob.
Oracle External Large objects:
TypeInfo(const Connection &connection, const ostring &name, TypeInfoType type)
Parametrized constructor.
OCI_EXPORT OCI_Interval *OCI_API OCI_ObjectGetInterval(OCI_Object *obj, const otext *attr)
Return the interval value of the given object attribute.
OCI_EXPORT boolean OCI_API OCI_IntervalFree(OCI_Interval *itv)
Free an OCI_Interval handle.
OCI_EXPORT boolean OCI_API OCI_DirPathSave(OCI_DirPath *dp)
Execute a data savepoint (server side)
OCI_EXPORT boolean OCI_API OCI_MsgSetEnqueueDelay(OCI_Msg *msg, int value)
set the number of seconds to delay the enqueued message
Oracle Internal Large objects:
OCI_EXPORT boolean OCI_API OCI_DateGetDate(OCI_Date *date, int *year, int *month, int *day)
Extract the date part from a date handle.
unsigned int GetRow() const
Return the row index which caused an error during statement execution.
OCI_EXPORT unsigned int OCI_API OCI_ColumnGetSize(OCI_Column *col)
Return the size of the column.
unsigned int GetCount() const
Returns the current number of elements in the collection.
static Environment::CharsetMode GetCharset()
Return the OCILIB charset type.
OCI_EXPORT boolean OCI_API OCI_TransactionStart(OCI_Transaction *trans)
Start global transaction.
Lob< ostring, LobCharacter > Clob
Class handling CLOB oracle type.
OCI_EXPORT unsigned int OCI_API OCI_GetColumnIndex(OCI_Resultset *rs, const otext *name)
Return the index of the column in the result from its name.
int GetDay() const
Return the date day value.
OCI_EXPORT boolean OCI_API OCI_BindColl(OCI_Statement *stmt, const otext *name, OCI_Coll *data)
Bind a Collection variable.
void SetSessionTag(const ostring &tag)
Associate a tag to the given connection/session.
OCI_EXPORT unsigned int OCI_API OCI_LongWrite(OCI_Long *lg, void *buffer, unsigned int len)
Write a buffer into a Long.
OCI_EXPORT boolean OCI_API OCI_QueueDrop(OCI_Connection *con, const otext *queue_name)
Drop the given queue.
OCI_EXPORT int OCI_API OCI_ColumnGetPrecision(OCI_Column *col)
Return the precision of the column for numeric columns.
OCI_EXPORT const otext *OCI_API OCI_GetServerName(OCI_Connection *con)
Return the Oracle server machine name of the connected database/service name.
OCI_EXPORT boolean OCI_API OCI_DequeueUnsubscribe(OCI_Dequeue *dequeue)
Unsubscribe for asynchronous messages notifications.
int GetMinutes() const
Return the interval minutes value.
OCI_EXPORT boolean OCI_API OCI_TransactionStop(OCI_Transaction *trans)
Stop current global transaction.
OCI_EXPORT unsigned int OCI_API OCI_DirPathGetCurrentRows(OCI_DirPath *dp)
Return the current number of rows used in the OCILIB internal arrays of rows.
OCI_EXPORT boolean OCI_API OCI_MsgSetCorrelation(OCI_Msg *msg, const otext *correlation)
set the correlation identifier of the message
OCI_EXPORT unsigned int OCI_API OCI_ErrorGetRow(OCI_Error *err)
Return the row index which caused an error during statement execution.
OCI_EXPORT boolean OCI_API OCI_ElemFree(OCI_Elem *elem)
Free a local collection element.
OCI_EXPORT const otext *OCI_API OCI_AgentGetName(OCI_Agent *agent)
Get the given AQ agent name.
OCI_EXPORT 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_EXPORT boolean OCI_API OCI_LobSeek(OCI_Lob *lob, big_uint offset, unsigned int mode)
Perform a seek operation on the OCI_lob content buffer.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfObjects(OCI_Statement *stmt, const otext *name, OCI_Object **data, OCI_TypeInfo *typinf, unsigned int nbelem)
Bind an array of object handles.
void SetYear(int value)
Set the date year value.
int GetYear() const
Return the timestamp year value.
OCI_EXPORT boolean OCI_API OCI_DirPathFlushRow(OCI_DirPath *dp)
Flushes a partially loaded row from server.
OCI_EXPORT boolean OCI_API OCI_ElemSetTimestamp(OCI_Elem *elem, OCI_Timestamp *value)
Assign a Timestamp handle to a collection element.
OCI_EXPORT boolean OCI_API OCI_Initialize(POCI_ERROR err_handler, const otext *lib_path, unsigned int mode)
Initialize the library.
OCI_EXPORT const otext *OCI_API OCI_GetSql(OCI_Statement *stmt)
Return the last SQL or PL/SQL statement prepared or executed by the statement.
OCI_EXPORT OCI_Coll *OCI_API OCI_GetColl2(OCI_Resultset *rs, const otext *name)
Return the current Collection value of the column from its name in the resultset. ...
OCI_EXPORT boolean OCI_API OCI_ObjectSetString(OCI_Object *obj, const otext *attr, const otext *value)
Set an object attribute of type string.
Date & operator++()
Increment the date by 1 day.
OCI_EXPORT big_uint OCI_API OCI_ElemGetUnsignedBigInt(OCI_Elem *elem)
Return the unsigned big int value of the given collection element.
OCI_EXPORT unsigned int OCI_API OCI_PoolGetMin(OCI_Pool *pool)
Return the minimum number of connections/sessions that can be opened to the database.
Flags< TransactionFlagsValues > TransactionFlags
Transaction flags.
void GetDate(int &year, int &month, int &day) const
Extract the date parts.
OCI_EXPORT int OCI_API OCI_MsgGetAttemptCount(OCI_Msg *msg)
Return the number of attempts that have been made to dequeue the message.
big_uint Erase(big_uint offset, big_uint length)
Erase a portion of the lob at a given position.
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_EXPORT boolean OCI_API OCI_ElemSetShort(OCI_Elem *elem, short value)
Set a short value to a collection element.
Collection of output columns from a select statement.
OCI_EXPORT unsigned int OCI_API OCI_BindGetDataCount(OCI_Bind *bnd)
Return the number of elements of the bind handle.
OCI_EXPORT OCI_Mutex *OCI_API OCI_MutexCreate(void)
Create a Mutex object.
bool operator<=(const Date &other) const
Indicates if the current date value is inferior or equal to the given date value. ...
OCI_EXPORT OCI_Long *OCI_API OCI_LongCreate(OCI_Statement *stmt, unsigned int type)
Create a local temporary Long instance.
OCI_EXPORT boolean OCI_API OCI_IntervalAssign(OCI_Interval *itv, OCI_Interval *itv_src)
Assign the value of a interval handle to another one.
OCI_EXPORT int OCI_API OCI_IntervalCompare(OCI_Interval *itv, OCI_Interval *itv2)
Compares two interval handles.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfBigInts(OCI_Statement *stmt, const otext *name, big_int *data, unsigned int nbelem)
Bind an array of big integers.
OCI_EXPORT OCI_Timestamp *OCI_API OCI_ElemGetTimestamp(OCI_Elem *elem)
Return the Timestamp value of the given collection element.
void SetSeconds(int value)
Set the interval seconds value.
OCI_EXPORT const otext *OCI_API OCI_GetDefaultFormatDate(OCI_Connection *con)
Return the current date format for implicit string / date conversions.
OCI_EXPORT unsigned int OCI_API OCI_GetDefaultLobPrefetchSize(OCI_Connection *con)
Return the default LOB prefetch buffer size for the connection.
bool GetServerOutput(ostring &line) const
Retrieve one line of the server buffer.
OCI_EXPORT boolean OCI_API OCI_LobFree(OCI_Lob *lob)
Free a local temporary lob.
OCI_EXPORT unsigned int OCI_API OCI_ColumnGetType(OCI_Column *col)
Return the type of the given column.
Oracle SQL Column and Type member representation.
int GetMilliSeconds() const
Return the timestamp seconds value.
void AddMonths(int months)
Add or subtract months.
OCI_EXPORT OCI_Object *OCI_API OCI_GetObject(OCI_Resultset *rs, unsigned int index)
Return the current Object value of the column at the given index in the resultset.
OCI_EXPORT boolean OCI_API OCI_TimestampGetTimeZoneOffset(OCI_Timestamp *tmsp, int *hour, int *min)
Return the time zone (hour, minute) portion of a timestamp handle.
TypeInfo GetTypeInfo() const
Return the type information object associated to the collection.
OCI_EXPORT boolean OCI_API OCI_EnqueuePut(OCI_Enqueue *enqueue, OCI_Msg *msg)
Enqueue a message on the queue associated to the Enqueue object.
OCI_EXPORT boolean OCI_API OCI_TransactionResume(OCI_Transaction *trans)
Resume a stopped global transaction.
OCI_EXPORT unsigned int OCI_API OCI_GetSqlErrorPos(OCI_Statement *stmt)
Return the error position (in terms of characters) in the SQL statement where the error occurred in c...
OCI_EXPORT boolean OCI_API OCI_QueueStop(OCI_Connection *con, const otext *queue_name, boolean enqueue, boolean dequeue, boolean wait)
Stop enqueuing or dequeuing or both on the given queue.
OCI_EXPORT boolean OCI_API OCI_LobAppendLob(OCI_Lob *lob, OCI_Lob *lob_src)
Append a source LOB at the end of a destination LOB.
void Close()
Close the file on the server.
OCI_EXPORT boolean OCI_API OCI_MsgSetExceptionQueue(OCI_Msg *msg, const otext *queue)
Set the name of the queue to which the message is moved to if it cannot be processed successfully...
OCI_EXPORT boolean OCI_API OCI_RegisterInterval(OCI_Statement *stmt, const otext *name, unsigned int type)
Register an interval output bind placeholder.
void SetMonth(int value)
Set the interval month value.
OCI_EXPORT boolean OCI_API OCI_Parse(OCI_Statement *stmt, const otext *sql)
Parse a SQL statement or PL/SQL block.
bool operator==(const Interval &other) const
Indicates if the current Interval value is equal to the given Interval value.
Object identifying the SQL data type TIMESTAMP.
OCI_EXPORT boolean OCI_API OCI_IntervalSetYearMonth(OCI_Interval *itv, int year, int month)
Set the year / month portion if the given Interval handle.
OCI_EXPORT OCI_Statement *OCI_API OCI_ErrorGetStatement(OCI_Error *err)
Retrieve statement handle within the error occurred.
OCI_EXPORT boolean OCI_API OCI_SetFetchMode(OCI_Statement *stmt, unsigned int mode)
Set the fetch mode of a SQL statement.
ostring ToString(int leadingPrecision=10, int fractionPrecision=10) const
Convert the interval value to a string.
OCI_EXPORT boolean OCI_API OCI_BindArrayOfColls(OCI_Statement *stmt, const otext *name, OCI_Coll **data, OCI_TypeInfo *typinf, unsigned int nbelem)
Bind an array of Collection handles.
TransactionFlags GetFlags() const
Return the transaction mode.
OCI_EXPORT boolean OCI_API OCI_DirPathSetDateFormat(OCI_DirPath *dp, const otext *format)
Set the default date format string for input conversion.
OCI_EXPORT boolean OCI_API OCI_DequeueSetRelativeMsgID(OCI_Dequeue *dequeue, const void *id, unsigned int len)
Set the message identifier of the message to be dequeued.
OCI_EXPORT boolean OCI_API OCI_RegisterRaw(OCI_Statement *stmt, const otext *name, unsigned int len)
Register an raw output bind placeholder.
OCI_EXPORT boolean OCI_API OCI_DirPathFinish(OCI_DirPath *dp)
Terminate a direct path operation and commit changes into the database.
OCI_EXPORT boolean OCI_API OCI_EnqueueFree(OCI_Enqueue *enqueue)
Free a Enqueue object.
void SetYearMonth(int year, int month)
Set the Year / Month parts.
OCI_EXPORT boolean OCI_API OCI_RefAssign(OCI_Ref *ref, OCI_Ref *ref_src)
Assign a Ref to another one.
OCI_EXPORT const otext *OCI_API OCI_GetTrace(OCI_Connection *con, unsigned int trace)
Get the current trace for the trace type from the given connection.
OCI_EXPORT OCI_Msg *OCI_API OCI_MsgCreate(OCI_TypeInfo *typinf)
Create a message object based on the given payload type.
Object identifying the SQL data type OBJECT.
OCI_EXPORT boolean OCI_API OCI_AgentSetAddress(OCI_Agent *agent, const otext *address)
Set the given AQ agent address.
static ThreadId GetThreadId(ThreadHandle handle)
Return the system Thread ID of the given thread handle.
OCI_EXPORT boolean OCI_API OCI_LobFlush(OCI_Lob *lob)
Flush Lob content to the server.
OCI_EXPORT OCI_Lob *OCI_API OCI_GetLob(OCI_Resultset *rs, unsigned int index)
Return the current lob value of the column at the given index in the resultset.
unsigned int GetTimeout() const
Get the idle timeout for connections/sessions in the pool.
OCI_EXPORT boolean OCI_API OCI_BindUnsignedShort(OCI_Statement *stmt, const otext *name, unsigned short *data)
Bind an unsigned short variable.
OCI_EXPORT OCI_Subscription *OCI_API OCI_SubscriptionRegister(OCI_Connection *con, const otext *name, unsigned int type, POCI_NOTIFY handler, unsigned int port, unsigned int timeout)
Register a notification against the given database.
OCI_EXPORT OCI_Ref *OCI_API OCI_ElemGetRef(OCI_Elem *elem)
Return the Ref value of the given collection element.
OCI_EXPORT boolean OCI_API OCI_RegisterFloat(OCI_Statement *stmt, const otext *name)
Register a float output bind placeholder.
static void Check()
Internal usage. Checks if the last OCILIB method call has raised an error. If so, it raises a C++ exc...
bool operator<(const Interval &other) const
Indicates if the current Interval value is inferior to the given Interval value.
OCI_EXPORT boolean OCI_API OCI_ElemSetFloat(OCI_Elem *elem, float value)
Set a float value to a collection element.
Subscription to database or objects changes.
int GetSeconds() const
Return the date seconds value.
OCI_EXPORT unsigned int OCI_API OCI_ObjectGetRawSize(OCI_Object *obj, const otext *attr)
Return the raw attribute value size of the given object attribute into the given buffer.
OCI_EXPORT boolean OCI_API OCI_BindRef(OCI_Statement *stmt, const otext *name, OCI_Ref *data)
Bind a Ref variable.
int GetMonth() const
Return the date month value.
OCI_EXPORT boolean OCI_API OCI_FileIsEqual(OCI_File *file, OCI_File *file2)
Compare two file handle for equality.
OCI_EXPORT boolean OCI_API OCI_Cleanup(void)
Clean up all resources allocated by the library.
Reference GetReference() const
Creates a reference on the current object.
FailoverResult(* TAFHandlerProc)(Connection &con, FailoverRequest failoverRequest, FailoverEvent failoverEvent)
User callback for TAF event notifications.
unsigned int GetStatementCacheSize() const
Return the maximum number of statements to keep in the statement cache.
OCI_EXPORT unsigned int OCI_API OCI_BindGetType(OCI_Bind *bnd)
Return the OCILIB type of the given bind.
static ThreadHandle Create()
Create a Thread.
void Copy(Lob &dest, big_uint offset, big_uint offsetDest, big_uint length) const
Copy the given portion of the lob content to another one.
Connection()
Default constructor.
bool operator>=(const Date &other) const
Indicates if the current date value is superior or equal to the given date value. ...
OCI_EXPORT OCI_Pool *OCI_API OCI_PoolCreate(const otext *db, const otext *user, const otext *pwd, unsigned int type, unsigned int mode, unsigned int min_con, unsigned int max_con, unsigned int incr_con)
Create an Oracle pool of connections or sessions.
bool IsReferenceNull() const
Check if the reference points to an object or not.
Interval operator-(const Interval &other)
Return a new Interval holding the difference of the current Interval value and the given Interval val...
Object identifying the SQL data type DATE.
OCI_EXPORT boolean OCI_API OCI_TimestampConvert(OCI_Timestamp *tmsp, OCI_Timestamp *tmsp_src)
Convert one timestamp value from one type to another.