45 #ifndef OCILIBCPP_H_INCLUDED
46 #define OCILIBCPP_H_INCLUDED
165 typedef std::basic_string<otext, std::char_traits<otext>, std::allocator<otext> >
ostring;
183 typedef std::vector<unsigned char>
Raw;
225 #include "ocilib_core.hpp"
386 LobBinary = OCI_BLOB,
388 LobCharacter = OCI_CLOB,
390 LobNationalCharacter = OCI_NCLOB
411 LongBinary = OCI_BLONG,
413 LongCharacter = OCI_CLONG
519 unsigned int GetRow()
const;
529 virtual const char *
what()
const throw();
556 template<
class THandleType>
569 SourceInstance = OCI_HES_INSTANCE,
571 SourceDatabase = OCI_HES_DATABASE,
573 SourceNode = OCI_HES_NODE,
575 SourceService = OCI_HES_SERVICE,
577 SourceServiceMember = OCI_HES_SERVICE_MEMBER,
579 SourceASMInstance = OCI_HES_ASM_INSTANCE,
581 SourcePreConnect = OCI_HES_PRECONNECT
601 EventDown = OCI_HET_DOWN,
623 Default = OCI_ENV_DEFAULT,
625 Threaded = OCI_ENV_THREADED,
627 Events = OCI_ENV_EVENTS
647 ImportLinkage = OCI_IMPORT_MODE_LINKAGE,
649 ImportRuntime = OCI_IMPORT_MODE_RUNTIME
669 CharsetAnsi = OCI_CHAR_ANSI,
671 CharsetWide = OCI_CHAR_WIDE
691 SessionDefault = OCI_SESSION_DEFAULT,
693 SessionXa = OCI_SESSION_XA,
695 SessionSysDba = OCI_SESSION_SYSDBA,
697 SessionSysOper = OCI_SESSION_SYSOPER
717 StartOnly = OCI_DB_SPM_START,
719 StartMount = OCI_DB_SPM_MOUNT,
721 StartOpen = OCI_DB_SPM_OPEN,
723 StartFull = OCI_DB_SPM_FULL
743 StartDefault = OCI_DB_SPF_DEFAULT,
745 StartForce = OCI_DB_SPF_FORCE,
747 StartRestrict = OCI_DB_SPF_RESTRICT
767 ShutdownOnly = OCI_DB_SDM_SHUTDOWN,
769 ShutdownClose = OCI_DB_SDM_CLOSE,
771 ShutdownDismount = OCI_DB_SDM_DISMOUNT,
773 ShutdownFull = OCI_DB_SDM_FULL
794 ShutdowntDefault = OCI_DB_SDF_DEFAULT,
797 ShutdowTrans = OCI_DB_SDF_TRANS,
801 ShutdownTransLocal = OCI_DB_SDF_TRANS_LOCAL,
804 ShutdownImmediate = OCI_DB_SDF_IMMEDIATE,
810 ShutdownAbort = OCI_DB_SDF_ABORT
829 typedef void(*HAHandlerProc) (
Connection &con, HAEventSource eventSource, HAEventType eventType,
Timestamp &time);
864 static void Cleanup();
900 static unsigned int GetCompileVersion();
911 static unsigned int GetRuntimeVersion();
923 static void EnableWarnings(
bool value);
955 const ostring& spfile = OTEXT(
""));
1015 static void SetHAHandler(HAHandlerProc handler);
1020 static unsigned int TAFHandler(
OCI_Connection *pConnection,
unsigned int type,
unsigned int event);
1021 static void NotifyHandler(
OCI_Event *pEvent);
1022 static void NotifyHandlerAQ(
OCI_Dequeue *pDequeue);
1024 typedef ConcurrentPool<AnyPointer, Handle *> HandlePool;
1025 typedef ConcurrentPool<AnyPointer, CallbackPointer> CallbackPool;
1027 class EnvironmentHandle :
public HandleHolder<AnyPointer>
1034 CallbackPool Callbacks;
1037 EnvironmentHandle();
1039 void Initialize(
AnyPointer pEnv,
unsigned int envMode);
1043 static EnvironmentHandle& GetEnvironmentHandle();
1096 static void Run(
ThreadHandle handle, ThreadProc func,
void *args);
1205 static void Create(
const ostring& name, ThreadKeyFreeProc freeProc = 0);
1249 ConnectionPool = OCI_POOL_CONNECTION,
1251 SessionPool = OCI_POOL_SESSION
1288 unsigned int minSize,
unsigned int maxSize,
unsigned int increment = 1,
1310 unsigned int minSize,
unsigned int maxSize,
unsigned int increment = 1,
1361 unsigned int GetTimeout()
const;
1376 void SetTimeout(
unsigned int value);
1387 bool GetNoWait()
const;
1401 void SetNoWait(
bool value);
1408 unsigned int GetBusyConnectionsCount()
const;
1415 unsigned int GetOpenedConnectionsCount()
const;
1422 unsigned int GetMinSize()
const;
1429 unsigned int GetMaxSize()
const;
1436 unsigned int GetIncrement()
const;
1446 unsigned int GetStatementCacheSize()
const;
1455 void SetStatementCacheSize(
unsigned int value);
1467 friend class Environment;
1468 friend class Exception;
1479 template<
class TLobObjectType,
int TLobOracleType>
1481 template <
class TDataType>
1493 FailoverRequestSession = OCI_FOT_SESSION,
1495 FailoverRequestSelect = OCI_FOT_SELECT
1515 FailoverEventEnd = OCI_FOE_END,
1517 FailoverEventAbort = OCI_FOE_ABORT,
1519 FailoverEventReauthentificate = OCI_FOE_REAUTH,
1521 FailoverEventBegin = OCI_FOE_BEGIN,
1523 FailoverEventError = OCI_FOE_ERROR
1543 FailoverOk = OCI_FOC_OK,
1545 FailoverRetry = OCI_FOC_RETRY
1565 TraceIdentity = OCI_TRC_IDENTITY,
1567 TraceModule = OCI_TRC_MODULE,
1569 TraceAction = OCI_TRC_ACTION,
1571 TraceDetail = OCI_TRC_DETAIL
1696 void SetAutoCommit(
bool enabled);
1703 bool GetAutoCommit()
const;
1713 bool IsServerAlive()
const;
1723 bool PingServer()
const;
1733 ostring GetConnectionString()
const;
1763 ostring GetServerVersion()
const;
1783 unsigned int GetVersion()
const;
1790 unsigned int GetServerMajorVersion()
const;
1797 unsigned int GetServerMinorVersion()
const;
1804 unsigned int GetServerRevisionVersion()
const;
1813 void ChangePassword(
const ostring& newPwd);
1820 ostring GetSessionTag()
const;
1836 void SetSessionTag(
const ostring& tag);
1858 void SetTransaction(
const Transaction &transaction);
1875 void SetDefaultDateFormat(
const ostring& format);
1885 ostring GetDefaultDateFormat()
const;
1907 void SetDefaultNumericFormat(
const ostring& format);
1917 ostring GetDefaultNumericFormat()
const;
1938 void EnableServerOutput(
unsigned int bufsize,
unsigned int arrsize,
unsigned int lnsize);
1948 void DisableServerOutput();
1958 bool GetServerOutput(
ostring &line)
const;
1965 void GetServerOutput(std::vector<ostring> &lines)
const;
2081 unsigned int GetStatementCacheSize()
const;
2093 void SetStatementCacheSize(
unsigned int value);
2111 unsigned int GetDefaultLobPrefetchSize()
const;
2137 void SetDefaultLobPrefetchSize(
unsigned int value);
2147 bool IsTAFCapable()
const;
2162 void SetTAFHandler(TAFHandlerProc handler);
2208 Unknown = OCI_UNKNOWN,
2212 Tight = OCI_TRS_TIGHT,
2214 Loose = OCI_TRS_LOOSE,
2220 Serializable = OCI_TRS_SERIALIZABLE
2297 unsigned int GetTimeout()
const;
2315 friend class BindArray;
2317 template <
class TDataType>
2335 bool IsValid()
const;
2342 int GetYear()
const;
2349 void SetYear(
int value);
2356 int GetMonth()
const;
2363 void SetMonth(
int value);
2377 void SetDay(
int value);
2384 int GetHours()
const;
2391 void SetHours(
int value);
2398 int GetMinutes()
const;
2405 void SetMinutes(
int value);
2412 int GetSeconds()
const;
2419 void SetSeconds(
int value);
2428 int DaysBetween(
const Date& other)
const;
2439 void SetDate(
int year,
int month,
int day);
2450 void SetTime(
int hour,
int min,
int sec);
2464 void SetDateTime(
int year,
int month,
int day,
int hour,
int min,
int sec);
2475 void GetDate(
int &year,
int &month,
int &day)
const;
2486 void GetTime(
int &hour,
int &min,
int &sec)
const;
2500 void GetDateTime(
int &year,
int &month,
int &day,
int &hour,
int &min,
int &sec)
const;
2509 void AddDays(
int days);
2518 void AddMonths(
int months);
2541 Date LastDay()
const;
2564 void FromString(
const ostring& str,
const ostring& format = OCI_STRING_FORMAT_DATE);
2576 ostring ToString(
const ostring& format = OCI_STRING_FORMAT_DATE)
const;
2600 Date& operator ++ ();
2607 Date operator ++ (
int);
2614 Date& operator -- ();
2621 Date operator -- (
int);
2628 Date operator + (
int value);
2635 Date operator - (
int value);
2642 Date& operator += (
int value);
2649 Date& operator -= (
int value);
2656 bool operator == (
const Date& other)
const;
2663 bool operator != (
const Date& other)
const;
2670 bool operator > (
const Date& other)
const;
2677 bool operator < (
const Date& other)
const;
2684 bool operator >= (
const Date& other)
const;
2691 bool operator <= (
const Date& other)
const;
2695 int Compare(
const Date& other)
const;
2709 friend class Environment;
2712 friend class BindArray;
2714 template <
class TDataType>
2727 YearMonth = OCI_INTERVAL_YM,
2729 DaySecond = OCI_INTERVAL_DS
2762 bool IsValid()
const;
2772 int GetYear()
const;
2782 void SetYear(
int value);
2792 int GetMonth()
const;
2802 void SetMonth(
int value);
2822 void SetDay(
int value);
2832 int GetHours()
const;
2842 void SetHours(
int value);
2852 int GetMinutes()
const;
2862 void SetMinutes(
int value);
2872 int GetSeconds()
const;
2882 void SetSeconds(
int value);
2889 int GetMilliSeconds()
const;
2896 void SetMilliSeconds(
int value);
2912 void GetDaySecond(
int &day,
int &hour,
int &min,
int &sec,
int &fsec)
const;
2928 void SetDaySecond(
int day,
int hour,
int min,
int sec,
int fsec);
2941 void GetYearMonth(
int &year,
int &month)
const;
2954 void SetYearMonth(
int year,
int month);
2963 void UpdateTimeZone(
const ostring& timeZone);
2975 void FromString(
const ostring& data);
2985 ostring ToString(
int leadingPrecision = 10,
int fractionPrecision = 10)
const;
3037 bool operator == (
const Interval& other)
const;
3044 bool operator != (
const Interval& other)
const;
3051 bool operator > (
const Interval& other)
const;
3058 bool operator < (
const Interval& other)
const;
3065 bool operator >= (
const Interval& other)
const;
3072 bool operator <= (
const Interval& other)
const;
3076 int Compare(
const Interval& other)
const;
3091 friend class Environment;
3094 friend class BindArray;
3097 template <
class TDataType>
3110 NoTimeZone = OCI_TIMESTAMP,
3112 WithTimeZone = OCI_TIMESTAMP_TZ,
3114 WithLocalTimeZone = OCI_TIMESTAMP_LTZ
3149 bool IsValid()
const;
3156 int GetYear()
const;
3163 void SetYear(
int value);
3170 int GetMonth()
const;
3177 void SetMonth(
int value);
3191 void SetDay(
int value);
3198 int GetHours()
const;
3205 void SetHours(
int value);
3212 int GetMinutes()
const;
3219 void SetMinutes(
int value);
3226 int GetSeconds()
const;
3233 void SetSeconds(
int value);
3240 int GetMilliSeconds()
const;
3247 void SetMilliSeconds(
int value);
3258 void GetDate(
int &year,
int &month,
int &day)
const;
3270 void GetTime(
int &hour,
int &min,
int &sec,
int &fsec)
const;
3281 void SetDate(
int year,
int month,
int day);
3293 void SetTime(
int hour,
int min,
int sec,
int fsec);
3308 void GetDateTime(
int &year,
int &month,
int &day,
int &hour,
int &min,
int &sec,
int &fsec)
const;
3324 void SetDateTime(
int year,
int month,
int day,
int hour,
int min,
int sec,
int fsec,
const ostring& timeZone = OTEXT(
""));
3345 void SetTimeZone(
const ostring& timeZone);
3355 void GetTimeZoneOffset(
int &hour,
int &min)
const;
3365 void SysTimestamp();
3378 void FromString(
const ostring& data,
const ostring& format = OCI_STRING_FORMAT_DATE);
3391 ostring ToString(
const ostring& format = OCI_STRING_FORMAT_DATE,
int precision = 0)
const;
3506 bool operator == (
const Timestamp& other)
const;
3513 bool operator != (
const Timestamp& other)
const;
3520 bool operator > (
const Timestamp& other)
const;
3527 bool operator < (
const Timestamp& other)
const;
3534 bool operator >= (
const Timestamp& other)
const;
3541 bool operator <= (
const Timestamp& other)
const;
3545 int Compare(
const Timestamp& other)
const;
3557 template<
class TLobObjectType,
int TLobOracleType>
3562 friend class BindArray;
3564 template <
class TDataType>
3591 TLobObjectType Read(
unsigned int length);
3603 unsigned int Write(
const TLobObjectType &content);
3615 unsigned int Append(
const TLobObjectType& content);
3627 void Append(
const Lob& other);
3643 bool Seek(
SeekMode seekMode, big_uint offset);
3657 big_uint GetOffset()
const;
3664 big_uint GetLength()
const;
3671 big_uint GetMaxSize()
const;
3684 big_uint GetChunkSize()
const;
3700 void Truncate(big_uint length);
3717 big_uint Erase(big_uint offset, big_uint length);
3732 void Copy(
Lob &dest, big_uint offset, big_uint offsetDest, big_uint length)
const;
3739 bool IsTemporary()
const;
3790 void EnableBuffering(
bool value);
3804 operator TLobObjectType()
const;
3811 Lob& operator += (
const Lob& other);
3818 bool operator == (
const Lob& other)
const;
3825 bool operator != (
const Lob& other)
const;
3829 bool Equals(
const Lob &other)
const;
3880 friend class BindArray;
3882 template <
class TDataType>
3925 Raw Read(
unsigned int size);
3941 bool Seek(
SeekMode seekMode, big_uint offset);
3951 bool Exists()
const;
3958 big_uint GetOffset()
const;
3965 big_uint GetLength()
const;
4021 bool IsOpened()
const;
4035 bool operator == (
const File& other)
const;
4042 bool operator != (
const File& other)
const;
4046 bool Equals(
const File &other)
const;
4062 template <
class TDataType>
4075 Table = OCI_TIF_TABLE,
4077 View = OCI_TIF_VIEW,
4129 unsigned int GetColumnCount()
const;
4145 Column GetColumn(
unsigned int index)
const;
4163 friend class BindArray;
4165 template <
class TDataType>
4179 Persistent = OCI_OBJ_PERSISTENT,
4181 Transient = OCI_OBJ_TRANSIENT,
4183 Value = OCI_OBJ_VALUE
4211 bool IsAttributeNull(
const ostring& name)
const;
4220 void SetAttributeNull(
const ostring& name);
4255 template<
class TDataType>
4256 TDataType Get(
const ostring& name)
const;
4271 template<
class TDataType>
4272 void Set(
const ostring& name,
const TDataType &value);
4314 friend class BindArray;
4316 template <
class TDataType>
4345 Object GetObject()
const;
4352 bool IsReferenceNull()
const;
4362 void SetReferenceNull();
4400 template <
class TDataType>
4405 friend class BindArray;
4407 template <
class TOtherDataType>
4408 friend class CollectionIterator;
4410 template <
class TOtherDataType>
4422 Varray = OCI_COLL_VARRAY,
4424 NestedTable = OCI_COLL_NESTED_TABLE
4457 unsigned int GetMax()
const;
4464 unsigned int GetSize()
const;
4476 unsigned int GetCount()
const;
4485 void Truncate(
unsigned int size);
4505 bool IsElementNull(
unsigned int index)
const;
4517 void SetElementNull(
unsigned int index);
4536 bool Delete(
unsigned int index)
const;
4545 TDataType Get(
unsigned int index)
const;
4555 void Set(
unsigned int index,
const TDataType &value);
4565 void Append(
const TDataType &data);
4612 Element(Collection &coll, unsigned int pos);
4613 operator TDataType() const;
4614 Element& operator = (TDataType value);
4615 bool IsNull() const;
4628 class
Iterator :
public std::iterator<std::bidirectional_iterator_tag, TDataType>
4636 bool operator== (
const Iterator& other);
4637 bool operator!= (
const Iterator& other);
4678 Element operator [] (
int index);
4682 TDataType GetElem(
OCI_Elem *elem, Handle *parent)
const;
4684 void SetElem(
OCI_Elem *elem,
const TDataType &value);
4696 template<
class TLongObjectType,
int TLongOracleType>
4701 friend class BindArray;
4724 unsigned int Write(
const TLongObjectType& content);
4731 unsigned int GetLength()
const;
4738 TLongObjectType GetContent()
const;
4770 InOut = OCI_BDM_IN_OUT
4815 unsigned int GetSubType()
const;
4826 unsigned int GetDataCount()
const;
4855 void SetDataNull(
bool value,
unsigned int index = 1);
4871 bool IsDataNull(
unsigned int index = 1)
const;
4909 friend class Exception;
4911 template<
class TLongObjectType,
int TLongOracleType>
4914 friend class BindObject;
4926 TypeSelect = OCI_CST_SELECT,
4928 TypeUpdate = OCI_CST_UPDATE,
4930 TypeDelete = OCI_CST_DELETE,
4932 TypeInsert = OCI_CST_INSERT,
4934 TypeCreate = OCI_CST_CREATE,
4936 TypeDrop = OCI_CST_DROP,
4938 TypeAlter = OCI_CST_ALTER,
4940 TypeBegin = OCI_CST_BEGIN,
4942 TypeDeclare = OCI_CST_DECLARE,
4944 TypeCall = OCI_CST_CALL,
4964 FetchForward = OCI_SFM_DEFAULT,
4966 FetchScrollable = OCI_SFM_SCROLLABLE
4986 BindByPosition = OCI_BIND_BY_POS,
4988 BindByName = OCI_BIND_BY_NAME
5008 LongExplicit = OCI_LONG_EXPLICIT,
5010 LongImplicit = OCI_LONG_IMPLICIT
5073 void Describe(
const ostring& sql);
5098 void Parse(
const ostring& sql);
5110 void Prepare(
const ostring& sql);
5126 void Execute(
const ostring& sql);
5142 unsigned int GetAffectedRows()
const;
5211 void SetBindArraySize(
unsigned int size);
5218 unsigned int GetBindArraySize()
const;
5235 void AllowRebinding(
bool value);
5245 bool IsRebindingAllowed()
const;
5263 unsigned int GetBindIndex(
const ostring& name)
const;
5270 unsigned int GetBindCount()
const;
5286 BindInfo GetBind(
unsigned int index)
const;
5319 template <
class TDataType>
5343 template <
class TDataType,
class TExtraInfo>
5365 template <
class TDataType>
5387 template <
class TDataType>
5412 template <
class TDataType,
class TExtraInfo>
5435 template <
class TDataType>
5436 void Register(
const ostring& name);
5455 template <
class TDataType,
class TExtraInfo>
5456 void Register(
const ostring& name, TExtraInfo& extraInfo);
5476 template <
class TDataType,
class TExtraInfo>
5477 void Register(
const ostring& name, TExtraInfo extraInfo);
5495 unsigned int GetSqlErrorPos()
const;
5545 void SetFetchSize(
unsigned int value);
5555 unsigned int GetFetchSize()
const;
5567 void SetPrefetchSize(
unsigned int value);
5577 unsigned int GetPrefetchSize()
const;
5597 void SetPrefetchMemory(
unsigned int value);
5607 unsigned int GetPrefetchMemory()
const;
5616 void SetLongMaxSize(
unsigned int value);
5626 unsigned int GetLongMaxSize()
const;
5659 unsigned int GetSQLCommand()
const;
5680 void GetBatchErrors(std::vector<Exception> &exceptions);
5686 BindsHolder *GetBindsHolder(
bool allocate);
5688 void ReleaseResultsets();
5696 template <
typename TBindMethod,
class TDataType>
5699 template <
typename TBindMethod,
class TObjectType,
class TDataType>
5702 template <
typename TBindMethod,
class TObjectType,
class TDataType>
5703 void Bind (TBindMethod &method,
const ostring& name, std::vector<TObjectType> &values, BindValue<TDataType> datatype,
BindInfo::BindDirection mode);
5705 template <
typename TBindMethod,
class TObjectType,
class TDataType,
class TElemType>
5706 void Bind (TBindMethod &method,
const ostring& name, std::vector<TObjectType> &values, BindValue<TDataType> datatype,
BindInfo::BindDirection mode, TElemType type);
5729 SeekAbsolute = OCI_SFD_ABSOLUTE,
5731 SeekRelative = OCI_SFD_RELATIVE
5759 template<
class TDataType>
5760 TDataType Get(
unsigned int index)
const;
5778 template<
class TDataType>
5779 TDataType Get(
const ostring& name)
const;
5857 bool Seek(
SeekMode mode,
int offset);
5864 unsigned int GetCount()
const;
5876 unsigned int GetCurrentRow()
const;
5891 unsigned int GetColumnIndex(
const ostring& name)
const;
5898 unsigned int GetColumnCount()
const;
5910 Column GetColumn(
unsigned int index)
const;
5934 bool IsColumnNull(
unsigned int index)
const;
5943 bool IsColumnNull(
const ostring& name)
const;
5957 bool operator ++ (
int);
5964 bool operator -- (
int);
5972 bool operator += (
int offset);
5980 bool operator -= (
int offset);
6009 NoFlags = OCI_CPF_NONE,
6012 IsIdentity = OCI_CPF_IS_IDENTITY,
6016 IsGeneratedAlways = OCI_CPF_IS_GEN_ALWAYS,
6019 IsGeneratedByDefaultOnNull = OCI_CPF_IS_GEN_BY_DEFAULT_ON_NULL
6052 ostring GetFullSQLType()
const;
6078 unsigned int GetSubType()
const;
6096 unsigned int GetSize()
const;
6103 int GetScale()
const;
6110 int GetPrecision()
const;
6117 int GetFractionalPrecision()
const;
6124 int GetLeadingPrecision()
const;
6143 bool IsNullable()
const;
6154 bool IsCharSemanticUsed()
const;
6195 typedef void (*NotifyHandlerProc) (
Event &evt);
6206 ObjectChanges = OCI_CNT_OBJECTS,
6208 RowChanges = OCI_CNT_ROWS,
6210 DatabaseChanges = OCI_CNT_DATABASES,
6212 AllChanges = OCI_CNT_ALL
6246 void Register(
const Connection &connection,
const ostring& name,
ChangeTypes changeTypes, NotifyHandlerProc handler,
unsigned int port = 0,
unsigned int timeout = 0);
6270 void Watch(
const ostring& sql);
6284 unsigned int GetTimeout()
const;
6291 unsigned int GetPort()
const;
6321 friend class Environment;
6333 DatabaseStart = OCI_ENT_STARTUP,
6335 DatabaseShutdown = OCI_ENT_SHUTDOWN,
6337 DatabaseShutdownAny = OCI_ENT_SHUTDOWN_ANY,
6339 DatabaseDrop = OCI_ENT_DROP_DATABASE,
6341 Unregister = OCI_ENT_DEREGISTER,
6343 ObjectChanged = OCI_ENT_OBJECT_CHANGED
6363 ObjectInserted = OCI_ONT_INSERT,
6365 ObjectUpdated = OCI_ONT_UPDATE,
6367 ObjectDeleted = OCI_ONT_DELETE,
6369 ObjectAltered = OCI_ONT_ALTER,
6371 ObjectDropped = OCI_ONT_DROP,
6373 ObjectGeneric = OCI_ONT_GENERIC
6407 ostring GetDatabaseName()
const;
6417 ostring GetObjectName()
const;
6497 void SetName(
const ostring& value);
6522 void SetAddress(
const ostring& value);
6550 Ready = OCI_AMS_READY,
6552 Waiting = OCI_AMS_WAITING,
6554 Processed = OCI_AMS_PROCESSED,
6556 Expired = OCI_AMS_EXPIRED
6614 template <
class TPayloadType>
6615 TPayloadType GetPayload();
6624 template <
class TPayloadType>
6625 void SetPayload(
const TPayloadType &value);
6635 Date GetEnqueueTime()
const;
6642 int GetAttemptCount()
const;
6671 int GetExpiration()
const;
6692 void SetExpiration(
int value);
6702 int GetEnqueueDelay()
const;
6726 void SetEnqueueDelay(
int value);
6736 int GetPriority()
const;
6750 void SetPriority(
int value);
6761 Raw GetOriginalID()
const;
6774 void SetOriginalID(
const Raw &value);
6784 ostring GetCorrelation()
const;
6796 void SetCorrelation(
const ostring& value);
6811 ostring GetExceptionQueue()
const;
6839 void SetExceptionQueue(
const ostring& value);
6849 Agent GetSender()
const;
6858 void SetSender(
const Agent &agent);
6871 void SetConsumers(std::vector<Agent> &agents);
6897 Before = OCI_ASD_BEFORE,
6919 Immediate = OCI_AMV_IMMEDIATE,
6921 OnCommit = OCI_AMV_ON_COMMIT
6963 void Put(
const Message &message);
7027 Raw GetRelativeMsgID()
const;
7042 void SetRelativeMsgID(
const Raw &value);
7054 friend class Environment;
7065 typedef void (*NotifyAQHandlerProc) (
Dequeue &dequeue);
7075 Browse = OCI_ADM_BROWSE,
7077 Locked = OCI_ADM_LOCKED,
7079 Remove = OCI_ADM_REMOVE,
7081 Confirm = OCI_ADM_REMOVE_NODATA
7101 Immediate = OCI_AMV_IMMEDIATE,
7103 OnCommit = OCI_AMV_ON_COMMIT
7123 FirstMessage = OCI_ADN_FIRST_MSG,
7125 NextMessage = OCI_ADN_NEXT_MSG,
7128 NextTransaction = OCI_ADN_NEXT_TRANSACTION,
7180 Agent Listen(
int timeout);
7203 void SetConsumer(
const ostring& value);
7213 ostring GetCorrelation()
const;
7226 void SetCorrelation(
const ostring& value);
7236 Raw GetRelativeMsgID()
const;
7245 void SetRelativeMsgID(
const Raw &value);
7334 int GetWaitTime()
const;
7353 void SetWaitTime(
int value);
7362 void SetAgents(std::vector<Agent> &agents);
7380 void Subscribe(
unsigned int port,
unsigned int timeout, NotifyAQHandlerProc handler);
7414 NormalQueue = OCI_AQT_NORMAL,
7416 ExceptionQueue = OCI_AQT_EXCEPTION,
7418 NonPersistentQueue = OCI_AQT_NON_PERSISTENT
7455 unsigned int maxRetries = 0,
unsigned int retryDelay = 0,
unsigned int retentionTime = 0,
7456 bool dependencyTracking =
false,
const ostring& comment = OTEXT(
""));
7479 unsigned int maxRetries= 0,
unsigned int retryDelay= 0,
7480 unsigned int retentionTime= 0,
const ostring& comment = OTEXT(
""));
7516 static void Start(
const Connection &connection,
const ostring& queue,
bool enableEnqueue =
true,
bool enableDequeue =
true);
7536 static void Stop(
const Connection &connection,
const ostring& queue,
bool stopEnqueue =
true,
bool stopDequeue =
true,
bool wait =
true);
7557 None = OCI_AGM_NONE,
7560 Transactionnal = OCI_AGM_TRANSACTIONNAL
7581 Buffered = OCI_APM_BUFFERED,
7583 Persistent = OCI_APM_PERSISTENT,
7631 static void Create(
const Connection &connection,
const ostring& table,
const ostring& payloadType,
bool multipleConsumers,
7632 const ostring& storageClause = OTEXT(
""),
const ostring& sortList = OTEXT(
""),
7634 unsigned int primaryInstance = 0,
unsigned int secondaryInstance = 0,
7635 const ostring& compatible = OTEXT(
""));
7655 static void Alter(
const Connection &connection,
const ostring& table,
const ostring& comment,
unsigned int primaryInstance = 0,
unsigned int secondaryInstance = 0);
7677 static void Drop(
const Connection &connection,
const ostring& table,
bool force =
true);
7743 Default = OCI_DCM_DEFAULT,
7745 Force = OCI_DCM_FORCE
7765 ResultComplete = OCI_DPR_COMPLETE,
7767 ResultError = OCI_DPR_ERROR,
7769 ResultFull = OCI_DPR_FULL ,
7771 ResultPartial = OCI_DPR_PARTIAL,
7773 ResultEmpty = OCI_DPR_EMPTY
7824 void SetColumn(
unsigned int colIndex,
const ostring& name,
unsigned int maxSize,
const ostring& format = OTEXT(
""));
7856 template <
class TDataType>
7857 void SetEntry(
unsigned int rowIndex,
unsigned int colIndex,
const TDataType& value,
bool complete =
true);
7963 void SetCurrentRows(
unsigned int value);
7973 unsigned int GetCurrentRows()
const;
7983 unsigned int GetMaxRows()
const;
7993 unsigned int GetRowCount()
const;
8007 unsigned int GetAffectedRows()
const;
8022 void SetDateFormat(
const ostring& format);
8050 void SetParallel(
bool value);
8066 void SetNoLog(
bool value);
8081 void SetCacheSize(
unsigned int value);
8093 void SetBufferSize(
unsigned int value);
8138 unsigned int GetErrorColumn();
8173 unsigned int GetErrorRow();
8178 #include "ocilib_impl.hpp"
Oracle Named types representation.
CharsetModeValues
Charset mode enumerated values.
Oracle Collection item representation.
Encapsulate a Resultset column or object member properties.
Lob< Raw, LobBinary > Blob
Class handling BLOB oracle type.
DequeueVisibilityValues
Message visibility enumerated values.
Flags< SessionFlagsValues > SessionFlags
Sessions flags.
Static class allowing to set/get thread local storage (TLS) values for a given unique key...
Exception class handling all OCILIB errors.
int GetOracleErrorCode() const
Return the Oracle error code.
Provides SQL bind informations.
TypeInfoTypeValues
Type of object information enumerated values.
EventTypeValues
Event type enumerated values.
LobTypeValues
Lob types enumerated values.
Enum< BindModeValues > BindMode
Bind Modes.
friend void Check()
Internal usage. Checks if the last OCILIB method call has raised an error. If so, it raises a C++ exc...
HAEventSourceValues
HA Event sources enumerated values.
int GetInternalErrorCode() const
Return the OCILIB error code.
Enum< DequeueModeValues > DequeueMode
Dequeue mode.
Enum< PoolTypeValues > PoolType
Type of Pool.
Enum< CharsetFormValues > CharsetForm
Type of charsetForm.
FetchModeValues
Fetch Modes enumerated values.
HAEventTypeValues
HA Event types enumerated values.
Class allowing the administration of Oracle Queues.
SessionTraceValues
Session trace enumerated values.
Enum< GroupingModeValues > GroupingMode
Grouping Mode.
OCILIB encapsulation of OCI mutexes.
StatementTypeValues
Statement Type enumerated values.
Enum< LobTypeValues > LobType
Type of Lob.
Statement GetStatement() const
Return the statement within the error occurred.
Enum< DataTypeValues > DataType
Column data type.
OCI_Mutex * MutexHandle
Alias for an OCI_Mutex pointer.
Global transaction identifier.
Object used for executing SQL or PL/SQL statement and returning the produced results.
Encapsulates an Oracle or OCILIB exception.
A connection or session with a specific database.
Flags< PropertyFlagsValues > PropertyFlags
Column properties flags.
static class allowing to manipulate threads
PoolTypeValues
Pool type enumerated values.
Internal bind representation.
Object identifying the SQL data type LONG.
Oracle Transaction object.
FailoverResultValues
Failover callback results enumerated values.
Enum< ObjectTypeValues > ObjectType
Object Type.
LongTypeValues
Long types enumerated values.
TimestampTypeValues
Interval types enumerated values.
StartFlagsValues
Oracle instance start flags enumerated values.
Flags< ShutdownFlagsValues > ShutdownFlags
Oracle instance shutdown flags.
AQ identified agent for messages delivery.
Static class allowing managing mutexes.
Enum< DequeueVisibilityValues > DequeueVisibility
Message visibility after begin dequeued.
Oracle Direct path loading encapsulation.
Enum< EnqueueVisibilityValues > EnqueueVisibility
Message visibility after begin queued.
Class used for handling transient collection value. it is used internally by:
Enum< NavigationModeValues > NavigationMode
Navigation Mode.
Enum< EventTypeValues > EventType
Event type.
EnqueueModeValues
Message enqueuing mode enumerated values.
void(* POCI_THREAD)(OCI_Thread *thread, void *arg)
Thread procedure prototype.
Template Enum template class providing some type safety to some extends for manipulating enum variabl...
Flags< ChangeTypesValues > ChangeTypes
Subscription changes flags.
Enum< ExceptionTypeValues > ExceptionType
Type of Exception.
ConversionModeValues
Conversion mode enumerated values.
Flags< EnvironmentFlagsValues > EnvironmentFlags
Environment Flags.
ostring GetMessage() const
Retrieve the error message.
ShutdownModeValues
Oracle instance shutdown modes enumerated values.
OCILIB encapsulation of Oracle DCN notification.
OCILIB encapsulation of A/Q dequeuing operations.
Oracle SQL or PL/SQL statement.
const void * ThreadId
Thread Unique ID.
Object identifying the SQL data type REF.
Enum< IntervalTypeValues > IntervalType
Interval types.
SeekModeValues
Seek Modes enumerated values.
OCILIB encapsulation of OCI Threads.
Enum< StatementTypeValues > StatementType
Statement Type.
PurgeModeValues
Purge mode enumerated values.
Oracle physical connection.
Static class in charge of library initialization / cleanup.
FailoverRequestValues
Failover request enumerated values.
Enum< ObjectEventValues > ObjectEvent
Object events.
FailoverEventValues
Failover events enumerated values.
ChangeTypesValues
Subscription changes flags values.
Enum< SeekModeValues > SeekMode
Seek Modes.
Connection GetConnection() const
Return the connection within the error occurred.
void * AnyPointer
Alias for the generic void pointer.
Oracle internal interval representation.
ExceptionType GetType() const
Return the Exception type.
Oracle REF type representation.
Enum< ShutdownModeValues > ShutdownMode
Oracle instance shutdown modes.
Object identifying the SQL data type BFILE.
Object identifying the SQL data types VARRAY and NESTED TABLE.
Enum< MessageStateValues > MessageState
Message state.
ResultValues
Direct Operation operation Result enumerated values.
Flags< StartFlagsValues > StartFlags
Oracle instance start flags.
Object identifying the SQL data type INTERVAL.
CollectionTypeValues
Collection type enumerated values.
Enum< EnqueueModeValues > EnqueueMode
Message enqueuing mode.
GroupingModeValues
Grouping mode enumerated values.
Class allowing the administration of Oracle Queue tables.
virtual const char * what() const
Override the std::exception::what() method.
Oracle internal date representation.
Enum< LongModeValues > LongMode
LONG datatype mapping modes.
OCILIB encapsulation of Oracle DCN event.
Enum< TimestampTypeValues > TimestampType
Type of Exception.
Enqueue object for queuing messages into an Oracle Queue.
Oracle Collections (VARRAYs and Nested Tables) representation.
SessionFlagsValues
Session flags enumerated values.
TransactionFlagsValues
Transaction flags enumerated values.
Enum< FailoverEventValues > FailoverEvent
Failover events.
OpenModeValues
Open Modes enumerated values.
Enum< FetchModeValues > FetchMode
Fetch Modes.
Type info metadata handle.
Enum< CollectionTypeValues > CollectionType
Collection type.
A connection or session Pool.
BindModeValues
Bind Modes enumerated values.
Enum< PurgeModeValues > PurgeMode
Purge mode.
OCILIB encapsulation of A/Q Agent.
Enum< HAEventSourceValues > HAEventSource
Source of HA events.
BindDirectionValues
Bind direction enumerated values.
Enum< FailoverResultValues > FailoverResult
Failover callback results.
Iterator iterator
common iterator declaration
Enum< LongTypeValues > LongType
Type of Long.
Enum< HAEventTypeValues > HAEventType
Type of HA events.
ObjectEventValues
Object events enumerated values.
LongModeValues
LONG datatype mapping modes enumerated values.
ObjectTypeValues
Object Type enumerated values.
Enum< ConversionModeValues > ConversionMode
Conversion Mode.
STL compliant bi-directional iterator class.
Oracle internal timestamp representation.
Enum< NumericTypeValues > NumericType
Numeric data type.
void * CallbackPointer
Alias used for storing user callback method pointers.
Enum< CharsetModeValues > CharsetMode
Environment charset mode.
Template class providing OCILIB handles auto memory, life cycle and scope management.
NumericTypeValues
Numeric type enumerated values.
Template Flags template class providing some type safety to some extends for manipulating flags set v...
Enum< TypeInfoTypeValues > TypeInfoType
Type of object information.
OCI_Thread * ThreadHandle
Alias for an OCI_Thread pointer.
Enum< ImportModeValues > ImportMode
OCI libraries import mode.
CharsetFormValues
Charset form enumerated values.
void(* POCI_THREADKEYDEST)(void *data)
Thread key destructor prototype.
OCILIB encapsulation of A/Q message.
std::vector< unsigned char > Raw
C++ counterpart of SQL RAW data type.
Provides type information on Oracle Database objects.
EnqueueVisibilityValues
Message visibility enumerated values.
NavigationModeValues
Navigation Mode enumerated values.
IntervalTypeValues
Interval types enumerated values.
ShutdownFlagsValues
Oracle instance shutdown flags enumerated values.
DequeueModeValues
Dequeue mode enumerated values.
DataTypeValues
Data type enumerated values.
ImportModeValues
OCI libraries import mode enumerated values.
Enum< FailoverRequestValues > FailoverRequest
Failover requests.
Lob< ostring, LobNationalCharacter > NClob
Class handling NCLOB oracle type.
MessageStateValues
Message state enumerated values.
Enum< SeekModeValues > SeekMode
Seek Modes.
Object identifying the SQL data type LOB (CLOB, NCLOB and BLOB)
Oracle External Large objects:
SeekModeValues
Seek Modes enumerated values.
Enum< ResultValues > Result
Direct Operation operation Result.
QueueTypeValues
Queue Type enumerated values.
Oracle Internal Large objects:
unsigned int GetRow() const
Return the row index which caused an error during statement execution.
ExceptionTypeValues
Exception type enumerated values.
Lob< ostring, LobCharacter > Clob
Class handling CLOB oracle type.
Enum< BindDirectionValues > BindDirection
Bind direction.
PropertyFlagsValues
Column properties flags values.
Enum< SessionTraceValues > SessionTrace
Session traces.
Flags< TransactionFlagsValues > TransactionFlags
Transaction flags.
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 ) ...
Collection of output columns from a select statement.
StartModeValues
Oracle instance start modes enumerated values.
Oracle SQL Column and Type member representation.
Enum< StartModeValues > StartMode
Oracle instance start modes.
Object identifying the SQL data type TIMESTAMP.
Enum< QueueTypeValues > QueueType
Queue Type.
Dequeue object for dequeuing messages into an Oracle Queue.
Object identifying the SQL data type OBJECT.
EnvironmentFlagsValues
Environment Flags enumerated values.
Subscription to database or objects changes.
Object identifying the SQL data type DATE.
Enum< OpenModeValues > OpenMode
Open Modes.