27#include "ocilibcpp/core.hpp"
28#include "ocilibcpp/support.hpp"
55 Oracle10gR1 = OCI_10_1,
56 Oracle10gR2 = OCI_10_2,
57 Oracle11gR1 = OCI_11_1,
58 Oracle11gR2 = OCI_11_2,
59 Oracle12cR1 = OCI_12_1,
60 Oracle12cR2 = OCI_12_2,
61 Oracle18cR1 = OCI_18_1,
62 Oracle18cR2 = OCI_18_2,
63 Oracle18cR3 = OCI_18_3,
64 Oracle18cR4 = OCI_18_4,
65 Oracle18cR5 = OCI_18_5,
66 Oracle19cR3 = OCI_19_3,
67 Oracle19cR5 = OCI_19_5,
68 Oracle21cR3 = OCI_21_3
285 LobBinary = OCI_BLOB,
287 LobCharacter = OCI_CLOB,
289 LobNationalCharacter = OCI_NCLOB
309 LongBinary = OCI_BLONG,
311 LongCharacter = OCI_CLONG
446 unsigned int GetRow()
const;
456 const char*
what() const noexcept override;
474 void SetWhat(const otext* value) noexcept;
475 void CopyWhat(const
char* value) noexcept;
529 SourceInstance = OCI_HES_INSTANCE,
531 SourceDatabase = OCI_HES_DATABASE,
533 SourceNode = OCI_HES_NODE,
535 SourceService = OCI_HES_SERVICE,
537 SourceServiceMember = OCI_HES_SERVICE_MEMBER,
539 SourceASMInstance = OCI_HES_ASM_INSTANCE,
541 SourcePreConnect = OCI_HES_PRECONNECT
561 EventDown = OCI_HET_DOWN,
583 Default = OCI_ENV_DEFAULT,
585 Threaded = OCI_ENV_THREADED,
587 Events = OCI_ENV_EVENTS
607 ImportLinkage = OCI_IMPORT_MODE_LINKAGE,
609 ImportRuntime = OCI_IMPORT_MODE_RUNTIME
629 CharsetAnsi = OCI_CHAR_ANSI,
631 CharsetWide = OCI_CHAR_WIDE
651 SessionDefault = OCI_SESSION_DEFAULT,
653 SessionXa = OCI_SESSION_XA,
655 SessionSysDba = OCI_SESSION_SYSDBA,
657 SessionSysOper = OCI_SESSION_SYSOPER,
659 SessionSysAsm = OCI_SESSION_SYSASM,
661 SessionSysBkp = OCI_SESSION_SYSBKP,
663 SessionSysDgD = OCI_SESSION_SYSDGD,
665 SessionSysKmt = OCI_SESSION_SYSKMT,
667 SessionSysRac = OCI_SESSION_SYSRAC,
669 SessionPreAuth = OCI_SESSION_PRELIM_AUTH
689 StartOnly = OCI_DB_SPM_START,
691 StartMount = OCI_DB_SPM_MOUNT,
693 StartOpen = OCI_DB_SPM_OPEN,
695 StartFull = OCI_DB_SPM_FULL
715 StartDefault = OCI_DB_SPF_DEFAULT,
717 StartForce = OCI_DB_SPF_FORCE,
719 StartRestrict = OCI_DB_SPF_RESTRICT
739 ShutdownOnly = OCI_DB_SDM_SHUTDOWN,
741 ShutdownClose = OCI_DB_SDM_CLOSE,
743 ShutdownDismount = OCI_DB_SDM_DISMOUNT,
745 ShutdownFull = OCI_DB_SDM_FULL
766 ShutdowntDefault = OCI_DB_SDF_DEFAULT,
769 ShutdowTrans = OCI_DB_SDF_TRANS,
773 ShutdownTransLocal = OCI_DB_SDF_TRANS_LOCAL,
776 ShutdownImmediate = OCI_DB_SDF_IMMEDIATE,
782 ShutdownAbort = OCI_DB_SDF_ABORT
802 OracleClientBytes = OCI_MEM_ORACLE,
804 OcilibBytes = OCI_MEM_OCILIB,
806 AllBytes = OCI_MEM_ALL
862 static void Cleanup();
897 static unsigned int GetCharMaxSize();
913 static bool Initialized();
932 static unsigned int GetCompileMajorVersion();
939 static unsigned int GetCompileMinorVersion();
946 static unsigned int GetCompileRevisionVersion();
964 static unsigned int GetRuntimeMajorVersion();
971 static unsigned int GetRuntimeMinorVersion();
978 static unsigned int GetRuntimeRevisionVersion();
990 static void EnableWarnings(
bool value);
1067 const ostring& spfile = OTEXT(
""));
1127 static void SetHAHandler(HAHandlerProc handler);
1137 static unsigned int TAFHandler(
OCI_Connection* pConnection,
unsigned int type,
unsigned int event);
1138 static void NotifyHandler(
OCI_Event* pEvent);
1139 static void NotifyHandlerAQ(
OCI_Dequeue* pDequeue);
1145 static void SetUserCallback(
AnyPointer ptr, T callback);
1158 EnvironmentHandle _handle;
1159 EnvironmentFlags _mode;
1160 unsigned int _charMaxSize;
1367 ConnectionPool = OCI_POOL_CONNECTION,
1369 SessionPool = OCI_POOL_SESSION
1406 unsigned int minSize,
unsigned int maxSize,
unsigned int increment = 1,
1428 unsigned int minSize,
unsigned int maxSize,
unsigned int increment = 1,
1479 unsigned int GetTimeout()
const;
1494 void SetTimeout(
unsigned int value);
1505 bool GetNoWait()
const;
1522 void SetNoWait(
bool value);
1529 unsigned int GetBusyConnectionsCount()
const;
1536 unsigned int GetOpenedConnectionsCount()
const;
1543 unsigned int GetMinSize()
const;
1550 unsigned int GetMaxSize()
const;
1557 unsigned int GetIncrement()
const;
1567 unsigned int GetStatementCacheSize()
const;
1576 void SetStatementCacheSize(
unsigned int value);
1606 template<
class,
int>
1623 TimeoutSend = OCI_NTO_SEND,
1628 TimeoutReceive = OCI_NTO_RECEIVE,
1633 TimeoutCall = OCI_NTO_CALL
1653 FailoverRequestSession = OCI_FOT_SESSION,
1655 FailoverRequestSelect = OCI_FOT_SELECT
1675 FailoverEventEnd = OCI_FOE_END,
1677 FailoverEventAbort = OCI_FOE_ABORT,
1679 FailoverEventReauthentificate = OCI_FOE_REAUTH,
1681 FailoverEventBegin = OCI_FOE_BEGIN,
1683 FailoverEventError = OCI_FOE_ERROR
1703 FailoverOk = OCI_FOC_OK,
1705 FailoverRetry = OCI_FOC_RETRY
1725 TraceIdentity = OCI_TRC_IDENTITY,
1727 TraceModule = OCI_TRC_MODULE,
1729 TraceAction = OCI_TRC_ACTION,
1731 TraceDetail = OCI_TRC_DETAIL
1856 void SetAutoCommit(
bool enabled);
1863 bool GetAutoCommit()
const;
1873 bool IsServerAlive()
const;
1883 bool PingServer()
const;
1893 ostring GetConnectionString()
const;
1923 ostring GetServerVersion()
const;
1940 unsigned int GetServerMajorVersion()
const;
1947 unsigned int GetServerMinorVersion()
const;
1954 unsigned int GetServerRevisionVersion()
const;
1963 void ChangePassword(
const ostring& newPwd);
1970 ostring GetSessionTag()
const;
1986 void SetSessionTag(
const ostring& tag);
2008 void SetTransaction(
const Transaction& transaction);
2074 void EnableServerOutput(
unsigned int bufsize,
unsigned int arrsize,
unsigned int lnsize);
2084 void DisableServerOutput();
2094 bool GetServerOutput(
ostring& line)
const;
2101 void GetServerOutput(std::vector<ostring>& lines)
const;
2216 unsigned int GetStatementCacheSize()
const;
2228 void SetStatementCacheSize(
unsigned int value);
2246 unsigned int GetDefaultLobPrefetchSize()
const;
2272 void SetDefaultLobPrefetchSize(
unsigned int value);
2288 unsigned int GetMaxCursors()
const;
2298 bool IsTAFCapable()
const;
2313 void SetTAFHandler(TAFHandlerProc handler);
2373 void SetTimeout(
TimeoutType timeout,
unsigned int value);
2400 Unknown = OCI_UNKNOWN,
2404 Tight = OCI_TRS_TIGHT,
2406 Loose = OCI_TRS_LOOSE,
2412 Serializable = OCI_TRS_SERIALIZABLE
2489 unsigned int GetTimeout()
const;
2524 Number(
bool create =
false);
2533 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2571 Number(
const otext* str,
const otext* format = OTEXT(
""));
2603 void FromString(
const ostring& str,
const ostring& format = OTEXT(
""))
const;
2625 ostring ToString()
const override;
2636 Number operator ++ (
int);
2637 Number operator -- (
int);
2639 bool operator == (
const Number& other)
const;
2640 bool operator != (
const Number& other)
const;
2641 bool operator > (
const Number& other)
const;
2642 bool operator < (
const Number& other)
const;
2643 bool operator >= (
const Number& other)
const;
2644 bool operator <= (
const Number& other)
const;
2646 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2647 Number& operator = (
const T& lhs);
2649 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2652 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2653 Number operator - (
const T& value);
2655 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2656 Number operator + (
const T& value);
2658 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2659 Number operator * (
const T& value);
2661 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2662 Number operator / (
const T& value);
2664 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2665 Number& operator += (
const T& value);
2667 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2668 Number& operator -= (
const T& value);
2670 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2671 Number& operator *= (
const T& value);
2673 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2674 Number& operator /= (
const T& value);
2679 static AnyPointer GetNativeValue(
const T& value);
2685 int Compare(
const Number& other)
const;
2688 inline T GetValue()
const;
2691 Number& SetValue(
const T& value);
2694 void Add(
const T& value);
2697 void Sub(
const T& value);
2700 void Multiply(
const T& value);
2703 void Divide(
const T& value);
2732 static Date SysDate();
2741 Date(
bool create =
false);
2761 Date& operator= (
const Date& other)
noexcept;
2777 Date(
const otext* str,
const otext* format = OTEXT(
""));
2801 bool IsValid()
const;
2808 int GetYear()
const;
2815 void SetYear(
int value);
2822 int GetMonth()
const;
2829 void SetMonth(
int value);
2843 void SetDay(
int value);
2850 int GetHours()
const;
2857 void SetHours(
int value);
2864 int GetMinutes()
const;
2871 void SetMinutes(
int value);
2878 int GetSeconds()
const;
2885 void SetSeconds(
int value);
2894 int DaysBetween(
const Date& other)
const;
2905 void SetDate(
int year,
int month,
int day);
2916 void SetTime(
int hour,
int min,
int sec);
2930 void SetDateTime(
int year,
int month,
int day,
int hour,
int min,
int sec);
2941 void GetDate(
int& year,
int& month,
int& day)
const;
2952 void GetTime(
int& hour,
int& min,
int& sec)
const;
2966 void GetDateTime(
int& year,
int& month,
int& day,
int& hour,
int& min,
int& sec)
const;
2975 void AddDays(
int days);
2984 void AddMonths(
int months);
3000 Date LastDay()
const;
3026 void FromString(
const ostring& str,
const ostring& format = OTEXT(
""));
3048 ostring ToString()
const override;
3062 Date& operator ++ ();
3069 Date operator ++ (
int);
3076 Date& operator -- ();
3083 Date operator -- (
int);
3090 Date operator + (
int value)
const;
3097 Date operator - (
int value)
const;
3104 Date& operator += (
int value);
3111 Date& operator -= (
int value);
3118 bool operator == (
const Date& other)
const;
3125 bool operator != (
const Date& other)
const;
3132 bool operator > (
const Date& other)
const;
3139 bool operator < (
const Date& other)
const;
3146 bool operator >= (
const Date& other)
const;
3153 bool operator <= (
const Date& other)
const;
3157 int Compare(
const Date& other)
const;
3191 YearMonth = OCI_INTERVAL_YM,
3193 DaySecond = OCI_INTERVAL_DS
3266 bool IsValid()
const;
3276 int GetYear()
const;
3286 void SetYear(
int value);
3296 int GetMonth()
const;
3306 void SetMonth(
int value);
3326 void SetDay(
int value);
3336 int GetHours()
const;
3346 void SetHours(
int value);
3356 int GetMinutes()
const;
3366 void SetMinutes(
int value);
3376 int GetSeconds()
const;
3386 void SetSeconds(
int value);
3393 int GetMilliSeconds()
const;
3400 void SetMilliSeconds(
int value);
3407 int GetNanoSeconds()
const;
3414 void SetNanoSeconds(
int value);
3430 void GetDaySecond(
int& day,
int& hour,
int& min,
int& sec,
int& nsec)
const;
3446 void SetDaySecond(
int day,
int hour,
int min,
int sec,
int nsec);
3459 void GetYearMonth(
int& year,
int& month)
const;
3472 void SetYearMonth(
int year,
int month);
3481 void UpdateTimeZone(
const ostring& timeZone);
3493 void FromString(
const ostring& data);
3503 ostring ToString(
int leadingPrecision,
int fractionPrecision)
const;
3510 ostring ToString()
const override;
3552 bool operator == (
const Interval& other)
const;
3559 bool operator != (
const Interval& other)
const;
3566 bool operator > (
const Interval& other)
const;
3573 bool operator < (
const Interval& other)
const;
3580 bool operator >= (
const Interval& other)
const;
3587 bool operator <= (
const Interval& other)
const;
3591 int Compare(
const Interval& other)
const;
3627 NoTimeZone = OCI_TIMESTAMP,
3629 WithTimeZone = OCI_TIMESTAMP_TZ,
3631 WithLocalTimeZone = OCI_TIMESTAMP_LTZ
3723 bool IsValid()
const;
3730 int GetYear()
const;
3737 void SetYear(
int value);
3744 int GetMonth()
const;
3751 void SetMonth(
int value);
3765 void SetDay(
int value);
3772 int GetHours()
const;
3779 void SetHours(
int value);
3786 int GetMinutes()
const;
3793 void SetMinutes(
int value);
3800 int GetSeconds()
const;
3807 void SetSeconds(
int value);
3814 int GetMilliSeconds()
const;
3821 void SetMilliSeconds(
int value);
3832 void GetDate(
int& year,
int& month,
int& day)
const;
3844 void GetTime(
int& hour,
int& min,
int& sec,
int& fsec)
const;
3855 void SetDate(
int year,
int month,
int day);
3867 void SetTime(
int hour,
int min,
int sec,
int fsec);
3882 void GetDateTime(
int& year,
int& month,
int& day,
int& hour,
int& min,
int& sec,
int& fsec)
const;
3898 void SetDateTime(
int year,
int month,
int day,
int hour,
int min,
int sec,
int fsec,
const ostring& timeZone = OTEXT(
""));
3919 void SetTimeZone(
const ostring& timeZone);
3929 void GetTimeZoneOffset(
int& hour,
int& min)
const;
3956 void FromString(
const ostring& data,
const ostring& format = OCI_STRING_FORMAT_DATE);
3976 ostring ToString()
const override;
4081 bool operator == (
const Timestamp& other)
const;
4088 bool operator != (
const Timestamp& other)
const;
4095 bool operator > (
const Timestamp& other)
const;
4102 bool operator < (
const Timestamp& other)
const;
4109 bool operator >= (
const Timestamp& other)
const;
4116 bool operator <= (
const Timestamp& other)
const;
4120 int Compare(
const Timestamp& other)
const;
4134 template<
class T,
int U>
4187 unsigned int Write(
const T& content);
4199 unsigned int Append(
const T& content);
4208 void Append(
const Lob& other);
4224 bool Seek(
SeekMode seekMode, big_uint offset);
4238 big_uint GetOffset()
const;
4245 big_uint GetLength()
const;
4252 big_uint GetMaxSize()
const;
4265 big_uint GetChunkSize()
const;
4281 void Truncate(big_uint length);
4298 big_uint Erase(big_uint offset, big_uint length);
4313 void Copy(
Lob& dest, big_uint offset, big_uint offsetDest, big_uint length)
const;
4320 bool IsTemporary()
const;
4327 bool IsRemote()
const;
4378 void EnableBuffering(
bool value);
4392 Lob& operator += (
const Lob& other);
4399 bool operator == (
const Lob& other)
const;
4406 bool operator != (
const Lob& other)
const;
4410 bool Equals(
const Lob& other)
const;
4513 Raw Read(
unsigned int size);
4529 bool Seek(
SeekMode seekMode, big_uint offset);
4539 bool Exists()
const;
4546 big_uint GetOffset()
const;
4553 big_uint GetLength()
const;
4609 bool IsOpened()
const;
4623 bool operator == (
const File& other)
const;
4630 bool operator != (
const File& other)
const;
4634 bool Equals(
const File& other)
const;
4663 Table = OCI_TIF_TABLE,
4665 View = OCI_TIF_VIEW,
4723 unsigned int GetColumnCount()
const;
4739 Column GetColumn(
unsigned int index)
const;
4753 boolean IsFinalType()
const;
4803 Persistent = OCI_OBJ_PERSISTENT,
4805 Transient = OCI_OBJ_TRANSIENT,
4807 Value = OCI_OBJ_VALUE
4842 bool IsAttributeNull(
const ostring& name)
const;
4851 void SetAttributeNull(
const ostring& name);
4887 T Get(
const ostring& name)
const;
4935 void Set(
const ostring& name,
const T& value);
4949 ostring ToString()
const override;
5005 Object GetObject()
const;
5012 bool IsReferenceNull()
const;
5022 void SetReferenceNull();
5036 ostring ToString()
const override;
5061 ostring ToString()
const override;
5084 typedef T ValueType;
5092 bool IsNull()
const;
5116 typedef typename T::ValueType value_type;
5119 typedef std::random_access_iterator_tag iterator_category;
5120 typedef ptrdiff_t difference_type;
5121 typedef ptrdiff_t distance_type;
5122 typedef value_type* pointer;
5123 typedef value_type& reference;
5190 Varray = OCI_COLL_VARRAY,
5192 NestedTable = OCI_COLL_NESTED_TABLE,
5194 IndexedTable = OCI_COLL_INDEXED_TABLE
5234 unsigned int GetMax()
const;
5241 unsigned int GetSize()
const;
5253 unsigned int GetCount()
const;
5262 void Truncate(
unsigned int size);
5282 bool IsElementNull(
unsigned int index)
const;
5294 void SetElementNull(
unsigned int index);
5313 bool Delete(
unsigned int index)
const;
5322 T Get(
unsigned int index)
const;
5332 void Set(
unsigned int index,
const T& value);
5342 void Append(
const T& value);
5363 ostring ToString()
const override;
5425 static void SetElem(
OCI_Elem* elem,
const T& value);
5437 template<
class T,
int U>
5472 unsigned int Write(
const T& content);
5479 unsigned int GetLength()
const;
5540 InOut = OCI_BDM_IN_OUT
5607 unsigned int GetSubType()
const;
5618 unsigned int GetDataCount()
const;
5647 void SetDataNull(
bool value,
unsigned int index = 1);
5663 bool IsDataNull(
unsigned int index = 1)
const;
5703 template<
class,
int>
5706 friend class BindObject;
5718 TypeSelect = OCI_CST_SELECT,
5720 TypeUpdate = OCI_CST_UPDATE,
5722 TypeDelete = OCI_CST_DELETE,
5724 TypeInsert = OCI_CST_INSERT,
5726 TypeCreate = OCI_CST_CREATE,
5728 TypeDrop = OCI_CST_DROP,
5730 TypeAlter = OCI_CST_ALTER,
5732 TypeBegin = OCI_CST_BEGIN,
5734 TypeDeclare = OCI_CST_DECLARE,
5736 TypeCall = OCI_CST_CALL,
5738 TypeMerge = OCI_CST_MERGE
5758 FetchForward = OCI_SFM_DEFAULT,
5760 FetchScrollable = OCI_SFM_SCROLLABLE
5780 BindByPosition = OCI_BIND_BY_POS,
5782 BindByName = OCI_BIND_BY_NAME
5802 LongExplicit = OCI_LONG_EXPLICIT,
5804 LongImplicit = OCI_LONG_IMPLICIT
5868 void Describe(
const ostring& sql);
5893 void Parse(
const ostring& sql);
5905 void Prepare(
const ostring& sql);
5912 void ExecutePrepared();
5921 void Execute(
const ostring& sql);
5941 unsigned int ExecutePrepared(T callback);
5963 template<
class T,
class U>
5964 unsigned int ExecutePrepared(T callback, U adapter);
5985 unsigned int Execute(
const ostring& sql, T callback);
6008 template<
class T,
class U>
6009 unsigned int Execute(
const ostring& sql, T callback, U adapter);
6025 unsigned int GetAffectedRows()
const;
6039 ostring GetSqlIdentifier()
const;
6101 void SetBindArraySize(
unsigned int size);
6108 unsigned int GetBindArraySize()
const;
6125 void AllowRebinding(
bool value);
6135 bool IsRebindingAllowed()
const;
6153 unsigned int GetBindIndex(
const ostring& name)
const;
6160 unsigned int GetBindCount()
const;
6176 BindInfo GetBind(
unsigned int index)
const;
6233 template<
class T,
class U>
6335 template<
class T,
class U>
6378 template<
class T,
class U>
6399 template<
class T,
class U>
6418 unsigned int GetSqlErrorPos()
const;
6468 void SetFetchSize(
unsigned int value);
6478 unsigned int GetFetchSize()
const;
6490 void SetPrefetchSize(
unsigned int value);
6500 unsigned int GetPrefetchSize()
const;
6520 void SetPrefetchMemory(
unsigned int value);
6530 unsigned int GetPrefetchMemory()
const;
6539 void SetPieceSize(
unsigned int value);
6549 unsigned int GetPieceSize()
const;
6582 unsigned int GetSQLCommand()
const;
6603 void GetBatchErrors(std::vector<Exception>& exceptions);
6608 static void OnFreeSmartHandle(SmartHandle* smartHandle);
6614 void ReleaseResultsets()
const;
6618 void SetInData()
const;
6619 void SetOutData()
const;
6620 void ClearBinds()
const;
6622 template<
typename M,
class T>
6625 template<
typename M,
class T>
6628 template<
typename M,
class T>
6631 template<
typename M,
class T,
class U>
6634 template<
typename T>
6635 unsigned int Fetch(T callback);
6637 template<
typename T,
typename U>
6638 unsigned int Fetch(T callback, U adapter);
6661 SeekAbsolute = OCI_SFD_ABSOLUTE,
6663 SeekRelative = OCI_SFD_RELATIVE
6688 T Get(
unsigned int index)
const;
6704 void Get(
unsigned int index, T& value)
const;
6719 T Get(
const ostring& name)
const;
6732 void Get(
const ostring& name, T& value)
const;
6748 template<
class T,
class U>
6749 bool Get(T& value, U adapter)
const;
6766 template<
typename T>
6791 template<
typename T,
typename U>
6792 unsigned int ForEach(T callback, U adapter);
6870 bool Seek(
SeekMode mode,
int offset);
6877 unsigned int GetCount()
const;
6889 unsigned int GetCurrentRow()
const;
6904 unsigned int GetColumnIndex(
const ostring& name)
const;
6911 unsigned int GetColumnCount()
const;
6923 Column GetColumn(
unsigned int index)
const;
6947 bool IsColumnNull(
unsigned int index)
const;
6956 bool IsColumnNull(
const ostring& name)
const;
6970 bool operator ++ (
int);
6977 bool operator -- (
int);
6985 bool operator += (
int offset);
6993 bool operator -= (
int offset);
7022 NoFlags = OCI_CPF_NONE,
7025 IsIdentity = OCI_CPF_IS_IDENTITY,
7029 IsGeneratedAlways = OCI_CPF_IS_GEN_ALWAYS,
7032 IsGeneratedByDefaultOnNull = OCI_CPF_IS_GEN_BY_DEFAULT_ON_NULL,
7034 IsLogicalPartitioning = OCI_CPF_IS_LPART,
7036 IsGeneratedByContainers = OCI_CPF_IS_CONID
7074 ostring GetFullSQLType()
const;
7100 unsigned int GetSubType()
const;
7125 unsigned int GetSize()
const;
7132 int GetScale()
const;
7139 int GetPrecision()
const;
7146 int GetFractionalPrecision()
const;
7153 int GetLeadingPrecision()
const;
7172 bool IsNullable()
const;
7183 bool IsCharSemanticUsed()
const;
7224 typedef void (*NotifyHandlerProc) (
Event& evt);
7234 ObjectChanges = OCI_CNT_OBJECTS,
7236 RowChanges = OCI_CNT_ROWS,
7238 DatabaseChanges = OCI_CNT_DATABASES,
7240 AllChanges = OCI_CNT_ALL
7274 void Register(
const Connection& connection,
const ostring& name,
ChangeTypes changeTypes, NotifyHandlerProc handler,
unsigned int port = 0,
unsigned int timeout = 0);
7297 void Watch(
const ostring& sql);
7311 unsigned int GetTimeout()
const;
7318 unsigned int GetPort()
const;
7360 DatabaseStart = OCI_ENT_STARTUP,
7362 DatabaseShutdown = OCI_ENT_SHUTDOWN,
7364 DatabaseShutdownAny = OCI_ENT_SHUTDOWN_ANY,
7366 DatabaseDrop = OCI_ENT_DROP_DATABASE,
7368 Unregister = OCI_ENT_DEREGISTER,
7370 ObjectChanged = OCI_ENT_OBJECT_CHANGED
7390 ObjectInserted = OCI_ONT_INSERT,
7392 ObjectUpdated = OCI_ONT_UPDATE,
7394 ObjectDeleted = OCI_ONT_DELETE,
7396 ObjectAltered = OCI_ONT_ALTER,
7398 ObjectDropped = OCI_ONT_DROP,
7400 ObjectGeneric = OCI_ONT_GENERIC
7434 ostring GetDatabaseName()
const;
7444 ostring GetObjectName()
const;
7523 void SetName(
const ostring& value);
7548 void SetAddress(
const ostring& value);
7576 Ready = OCI_AMS_READY,
7578 Waiting = OCI_AMS_WAITING,
7580 Processed = OCI_AMS_PROCESSED,
7582 Expired = OCI_AMS_EXPIRED
7661 Date GetEnqueueTime()
const;
7668 int GetAttemptCount()
const;
7697 int GetExpiration()
const;
7718 void SetExpiration(
int value);
7728 int GetEnqueueDelay()
const;
7752 void SetEnqueueDelay(
int value);
7762 int GetPriority()
const;
7776 void SetPriority(
int value);
7787 Raw GetOriginalID()
const;
7800 void SetOriginalID(
const Raw& value);
7810 ostring GetCorrelation()
const;
7822 void SetCorrelation(
const ostring& value);
7837 ostring GetExceptionQueue()
const;
7865 void SetExceptionQueue(
const ostring& value);
7875 Agent GetSender()
const;
7884 void SetSender(
const Agent& agent);
7897 void SetConsumers(std::vector<Agent>& agents);
7923 Before = OCI_ASD_BEFORE,
7945 Immediate = OCI_AMV_IMMEDIATE,
7947 OnCommit = OCI_AMV_ON_COMMIT
7989 void Put(
const Message& message);
8053 Raw GetRelativeMsgID()
const;
8068 void SetRelativeMsgID(
const Raw& value);
8091 typedef void (*NotifyAQHandlerProc) (
Dequeue& dequeue);
8101 Browse = OCI_ADM_BROWSE,
8103 Locked = OCI_ADM_LOCKED,
8105 Remove = OCI_ADM_REMOVE,
8107 Confirm = OCI_ADM_REMOVE_NODATA
8127 Immediate = OCI_AMV_IMMEDIATE,
8129 OnCommit = OCI_AMV_ON_COMMIT
8149 FirstMessage = OCI_ADN_FIRST_MSG,
8151 NextMessage = OCI_ADN_NEXT_MSG,
8154 NextTransaction = OCI_ADN_NEXT_TRANSACTION
8206 Agent Listen(
int timeout);
8229 void SetConsumer(
const ostring& value);
8239 ostring GetCorrelation()
const;
8252 void SetCorrelation(
const ostring& value);
8262 Raw GetRelativeMsgID()
const;
8271 void SetRelativeMsgID(
const Raw& value);
8360 int GetWaitTime()
const;
8379 void SetWaitTime(
int value);
8388 void SetAgents(std::vector<Agent>& agents);
8406 void Subscribe(
unsigned int port,
unsigned int timeout, NotifyAQHandlerProc handler);
8440 NormalQueue = OCI_AQT_NORMAL,
8442 ExceptionQueue = OCI_AQT_EXCEPTION,
8444 NonPersistentQueue = OCI_AQT_NON_PERSISTENT
8481 unsigned int maxRetries = 0,
unsigned int retryDelay = 0,
unsigned int retentionTime = 0,
8482 bool dependencyTracking =
false,
const ostring& comment = OTEXT(
""));
8505 unsigned int maxRetries = 0,
unsigned int retryDelay = 0,
8506 unsigned int retentionTime = 0,
const ostring& comment = OTEXT(
""));
8542 static void Start(
const Connection& connection,
const ostring& queue,
bool enableEnqueue =
true,
bool enableDequeue =
true);
8562 static void Stop(
const Connection& connection,
const ostring& queue,
bool stopEnqueue =
true,
bool stopDequeue =
true,
bool wait =
true);
8583 None = OCI_AGM_NONE,
8586 Transactionnal = OCI_AGM_TRANSACTIONNAL
8607 Buffered = OCI_APM_BUFFERED,
8609 Persistent = OCI_APM_PERSISTENT,
8657 static void Create(
const Connection& connection,
const ostring& table,
const ostring& payloadType,
bool multipleConsumers,
8658 const ostring& storageClause = OTEXT(
""),
const ostring& sortList = OTEXT(
""),
8660 unsigned int primaryInstance = 0,
unsigned int secondaryInstance = 0,
8661 const ostring& compatible = OTEXT(
""));
8681 static void Alter(
const Connection& connection,
const ostring& table,
const ostring& comment,
unsigned int primaryInstance = 0,
unsigned int secondaryInstance = 0);
8703 static void Drop(
const Connection& connection,
const ostring& table,
bool force =
true);
8769 Default = OCI_DCM_DEFAULT,
8771 Force = OCI_DCM_FORCE
8791 ResultComplete = OCI_DPR_COMPLETE,
8793 ResultError = OCI_DPR_ERROR,
8795 ResultFull = OCI_DPR_FULL,
8797 ResultPartial = OCI_DPR_PARTIAL,
8799 ResultEmpty = OCI_DPR_EMPTY
8850 void SetColumn(
unsigned int colIndex,
const ostring& name,
unsigned int maxSize,
const ostring& format = OTEXT(
""));
8883 void SetEntry(
unsigned int rowIndex,
unsigned int colIndex,
const T& value,
bool complete =
true);
8989 void SetCurrentRows(
unsigned int value);
8999 unsigned int GetCurrentRows()
const;
9009 unsigned int GetMaxRows()
const;
9019 unsigned int GetRowCount()
const;
9033 unsigned int GetAffectedRows()
const;
9048 void SetDateFormat(
const ostring& format);
9076 void SetParallel(
bool value);
9092 void SetNoLog(
bool value);
9107 void SetCacheSize(
unsigned int value);
9119 void SetBufferSize(
unsigned int value);
9164 unsigned int GetErrorColumn();
9199 unsigned int GetErrorRow();
9203#define OCILIB_DEFINE_FLAG_OPERATORS(T) \
9204 inline core::Flags<T> operator | (T a, T b) { return core::Flags<T>(a) | core::Flags<T>(b); } \
AQ identified agent for messages delivery.
Provides SQL bind information.
VectorTypeValues
Vector type values.
BindDirectionValues
Bind direction enumerated values.
core::Enum< VectorTypeValues > VectorType
Vector type.
core::Enum< BindDirectionValues > BindDirection
Bind direction.
Class used for handling transient collection value. it is used internally by the Collection<T> class:
Object identifying the SQL data types VARRAY and NESTED TABLE.
CollectionIterator< const CollectionElement< T > > const_iterator
Common const iterator declaration.
core::Enum< CollectionTypeValues > CollectionType
Collection type.
CollectionTypeValues
Collection type enumerated values.
CollectionIterator< CollectionElement< T > > iterator
Common iterator declaration.
STL compliant Collection Random iterator class.
Encapsulate a Resultset column or object member properties.
PropertyFlagsValues
Column properties flags values.
core::Flags< PropertyFlagsValues > PropertyFlags
Column properties flags.
A connection or session with a specific database.
FailoverEventValues
Failover events enumerated values.
core::Enum< SessionTraceValues > SessionTrace
Session traces.
core::Enum< FailoverResultValues > FailoverResult
Failover callback results.
core::Enum< TimeoutTypeValues > TimeoutType
Timeout Types.
FailoverRequestValues
Failover request enumerated values.
core::Enum< FailoverRequestValues > FailoverRequest
Failover requests.
SessionTraceValues
Session trace enumerated values.
core::Enum< FailoverEventValues > FailoverEvent
Failover events.
FailoverResultValues
Failover callback results enumerated values.
TimeoutTypeValues
Timeout enumerated values.
Object identifying the SQL data type DATE.
Dequeue object for dequeuing messages into an Oracle Queue.
DequeueVisibilityValues
Message visibility enumerated values.
core::Enum< DequeueVisibilityValues > DequeueVisibility
Message visibility after begin dequeued.
NavigationModeValues
Navigation Mode enumerated values.
DequeueModeValues
Dequeue mode enumerated values.
core::Enum< DequeueModeValues > DequeueMode
Dequeue mode.
core::Enum< NavigationModeValues > NavigationMode
Navigation Mode.
Oracle Direct path loading encapsulation.
ResultValues
Direct Operation Result enumerated values.
core::Enum< ConversionModeValues > ConversionMode
Conversion Mode.
core::Enum< ResultValues > Result
Direct Operation Result.
ConversionModeValues
Conversion mode enumerated values.
Enqueue object for queuing messages into an Oracle Queue.
EnqueueModeValues
Message enqueuing mode enumerated values.
core::Enum< EnqueueModeValues > EnqueueMode
Message enqueuing mode.
EnqueueVisibilityValues
Message visibility enumerated values.
core::Enum< EnqueueVisibilityValues > EnqueueVisibility
Message visibility after begin queued.
Static class in charge of library initialization / cleanup.
core::Flags< ShutdownModeValues > ShutdownMode
Oracle instance shutdown modes.
CharsetModeValues
Charset mode enumerated values.
StartModeValues
Oracle instance start modes enumerated values.
ImportModeValues
OCI libraries import mode enumerated values.
HAEventTypeValues
HA Event types enumerated values.
StartFlagsValues
Oracle instance start flags enumerated values.
ShutdownFlagsValues
Oracle instance shutdown flags enumerated values.
core::Enum< CharsetModeValues > CharsetMode
Environment charset mode.
core::Enum< ImportModeValues > ImportMode
OCI libraries import mode.
core::Flags< ShutdownFlagsValues > ShutdownFlags
Oracle instance shutdown flags.
core::Flags< StartFlagsValues > StartFlags
Oracle instance start flags.
HAEventSourceValues
HA Event sources enumerated values.
EnvironmentFlagsValues
Environment Flags enumerated values.
core::Enum< HAEventTypeValues > HAEventType
Type of HA events.
AllocatedBytesValues
Allocated Bytes enumerated values.
core::Flags< AllocatedBytesValues > AllocatedBytesFlags
Allocated Bytes.
SessionFlagsValues
Session flags enumerated values.
core::Flags< StartModeValues > StartMode
Oracle instance start modes.
core::Enum< HAEventSourceValues > HAEventSource
Source of HA events.
core::Flags< SessionFlagsValues > SessionFlags
Sessions flags.
ShutdownModeValues
Oracle instance shutdown modes enumerated values.
core::Flags< EnvironmentFlagsValues > EnvironmentFlags
Environment Flags.
ObjectEventValues
Object events enumerated values.
core::Enum< ObjectEventValues > ObjectEvent
Object events.
core::Enum< EventTypeValues > EventType
Event type.
EventTypeValues
Event type enumerated values.
Exception class handling all OCILIB errors.
ExceptionTypeValues
Exception type enumerated values.
core::Enum< ExceptionTypeValues > ExceptionType
Type of Exception.
ostring GetMessage() const
Retrieve the error message.
const char * what() const noexcept override
Override the std::exception::what() method.
int GetOracleErrorCode() const
Return the Oracle error code.
unsigned int GetRow() const
Return the row index which caused an error during statement execution.
ExceptionType GetType() const
Return the Exception type.
Connection GetConnection() const
Return the connection within the error occurred.
int GetInternalErrorCode() const
Return the OCILIB error code.
Statement GetStatement() const
Return the statement within the error occurred.
Object identifying the SQL data type BFILE.
Object identifying the SQL data type INTERVAL.
IntervalTypeValues
Interval types enumerated values.
core::Enum< IntervalTypeValues > IntervalType
Interval types.
Object identifying the SQL data type LOB (CLOB, NCLOB and BLOB)
T Read(unsigned int length)
Read a portion of a lob.
Object identifying the SQL data type LONG.
T GetContent() const
Return the string read from a fetch sequence.
MessageStateValues
Message state enumerated values.
void SetPayload(const T &value)
Set the object payload of the message.
core::Enum< MessageStateValues > MessageState
Message state.
T GetPayload()
Get the object payload of the message.
Static class allowing managing mutexes.
Object identifying the SQL data type NUMBER.
Object identifying the SQL data type OBJECT.
core::Enum< ObjectTypeValues > ObjectType
Object Type.
void Get(const ostring &name, Collection< T > &value) const
Assign the given collection with the given object attribute value of type collection.
ObjectTypeValues
Object Type enumerated values.
void Get(const ostring &name, T &value) const
Assign the given value with the given object attribute value.
A connection or session Pool.
PoolTypeValues
Pool type enumerated values.
core::Enum< PoolTypeValues > PoolType
Type of Pool.
Class allowing the administration of Oracle Queues.
QueueTypeValues
Queue Type enumerated values.
core::Enum< QueueTypeValues > QueueType
Queue Type.
Class allowing the administration of Oracle Queue tables.
GroupingModeValues
Grouping mode enumerated values.
PurgeModeValues
Purge mode enumerated values.
core::Enum< GroupingModeValues > GroupingMode
Grouping Mode.
core::Enum< PurgeModeValues > PurgeMode
Purge mode.
Object identifying the SQL data type REF.
unsigned int ForEach(T callback)
Fetch all rows in the resultset and call the given callback for row.
SeekModeValues
Seek Modes enumerated values.
bool Get(T &value, U adapter) const
Return a given user type from the current fetched row. It allow translating row column values returne...
core::Enum< SeekModeValues > SeekMode
Seek Modes.
Object used for executing SQL or PL/SQL statement and returning the produced results.
LongModeValues
LONG data type mapping modes enumerated values.
StatementTypeValues
Statement Type enumerated values.
core::Enum< BindModeValues > BindMode
Bind Modes.
void Register(const ostring &name, U extraInfo)
Register a host variable with more information as an output for a column present in a SQL RETURNING I...
void Bind(const ostring &name, T &value, BindInfo::BindDirection mode)
Bind an host variable.
void Bind(const ostring &name, std::vector< T > &values, U extraInfo, BindInfo::BindDirection mode, BindInfo::VectorType type=BindInfo::AsArray)
Bind a vector of host variables with more information.
BindModeValues
Bind Modes enumerated values.
void Bind(const ostring &name, std::vector< T > &values, BindInfo::BindDirection mode, BindInfo::VectorType type=BindInfo::AsArray)
Bind a vector of host variables.
FetchModeValues
Fetch Modes enumerated values.
core::Enum< FetchModeValues > FetchMode
Fetch Modes.
void Register(const ostring &name)
Register a host variable as an output for a column present in a SQL RETURNING INTO clause.
core::Enum< LongModeValues > LongMode
LONG data type mapping modes.
core::Enum< StatementTypeValues > StatementType
Statement Type.
void Bind(const ostring &name, T &value, U extraInfo, BindInfo::BindDirection mode)
Bind an host variable with more information.
void Register(const ostring &name, U &extraInfo)
Register a host variable with Oracle type information as an output for a column present in a SQL RETU...
Subscription to database or objects changes.
core::Flags< ChangeTypesValues > ChangeTypes
Subscription changes flags.
ChangeTypesValues
Subscription changes flags values.
static class allowing to manipulate threads
POCI_THREAD ThreadProc
Thread callback.
Static class allowing to set/get thread local storage (TLS) values for a given unique key.
POCI_THREADKEYDEST ThreadKeyFreeProc
Thread Key callback for freeing resources.
Object identifying the SQL data type TIMESTAMP.
core::Enum< TimestampTypeValues > TimestampType
Type of timestamp.
TimestampTypeValues
Interval types enumerated values.
Oracle Transaction object.
core::Flags< TransactionFlagsValues > TransactionFlags
Transaction flags.
TransactionFlagsValues
Transaction flags enumerated values.
Provides type information on Oracle Database objects.
TypeInfoTypeValues
Type of object information enumerated values.
core::Enum< TypeInfoTypeValues > TypeInfoType
Type of object information.
Object identifying the SQL data type XMLTYPE.
Internal usage. Map supporting concurrent access from multiple threads.
Template Enumeration template class providing some type safety to some extends for manipulating enume...
Template Flags template class providing some type safety to some extends for manipulating flags set v...
Internal usage. Smart pointer class with reference counting for managing OCILIB object handles.
Internal usage. Interface for handling ownership and relationship of a C API handle.
Internal usage. Provide a store for C Handles to C++ Handles mapping.
Abstract class allowing derived classes to be compatible with any type supporting the operator << oci...
Internal usage. SynchronizationGuard object.
Internal usage. Class implementing bind translations between C++ vectors and C API arrays.
Internal usage. Class owning bind objects allowing to set/get C data prior/after a statement executio...
struct OCI_Ref OCI_Ref
Oracle REF type representation.
struct OCI_Elem OCI_Elem
Oracle Collection item representation.
struct OCI_XmlType OCI_XmlType
Oracle XMLTYPE type representation.
struct OCI_Dequeue OCI_Dequeue
OCILIB encapsulation of A/Q dequeuing operations.
struct OCI_Connection OCI_Connection
Oracle physical connection.
struct OCI_Object OCI_Object
Oracle Named types representation.
void(* POCI_THREAD)(OCI_Thread *thread, void *arg)
Thread procedure prototype.
struct OCI_Statement OCI_Statement
Oracle SQL or PL/SQL statement.
struct OCI_Timestamp OCI_Timestamp
Oracle internal timestamp representation.
struct OCI_Date OCI_Date
Oracle internal date representation.
struct OCI_Coll OCI_Coll
Oracle Collections (VARRAYs and Nested Tables) representation.
struct OCI_Bind OCI_Bind
Internal bind representation.
struct OCI_Error OCI_Error
Encapsulates an Oracle or OCILIB exception.
struct OCI_Lob OCI_Lob
Oracle Internal Large objects:
struct OCI_Long OCI_Long
Oracle Long data type.
struct OCI_Column OCI_Column
Oracle SQL Column and Type member representation.
struct OCI_Interval OCI_Interval
Oracle internal interval representation.
struct OCI_Transaction OCI_Transaction
Oracle Transaction.
struct OCI_Msg OCI_Msg
OCILIB encapsulation of A/Q message.
struct OCI_Number OCI_Number
Oracle NUMBER representation.
struct OCI_TypeInfo OCI_TypeInfo
Type info metadata handle.
struct OCI_File OCI_File
Oracle External Large objects:
void(* POCI_THREADKEYDEST)(void *data)
Thread key destructor prototype.
struct OCI_Event OCI_Event
OCILIB encapsulation of Oracle DCN event.
struct OCI_Resultset OCI_Resultset
Collection of output columns from a select statement.
struct OCI_Subscription OCI_Subscription
OCILIB encapsulation of Oracle DCN notification.
struct OCI_Agent OCI_Agent
OCILIB encapsulation of A/Q Agent.
static T Check(T result)
Internal usage. Checks if the last OCILIB function call has raised an error. If so,...
OracleVersionValues
Oracle Version enumerated values.
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 )
NumericTypeValues
Numeric type enumerated values.
core::Enum< OpenModeValues > OpenMode
Open Modes.
Long< Raw, LongBinary > Blong
Class handling LONG RAW oracle type.
core::Enum< NumericTypeValues > NumericType
Numeric data type.
Lob< ostring, LobNationalCharacter > NClob
Class handling NCLOB oracle type.
LongTypeValues
Long types enumerated values.
const void * ThreadId
Thread Unique ID.
CharsetFormValues
Charset form enumerated values.
OpenModeValues
Open Modes enumerated values.
CollationIDValues
Collation ID enumerated values.
@ CollationIDNlsSortVar1CI
@ CollationIDNlsSortVar1AI
@ CollationIDNlsSortVar1CS
SeekModeValues
Seek Modes enumerated values.
core::Enum< CollationIDValues > CollationID
Type of Collation ID.
Lob< ostring, LobCharacter > Clob
Class handling CLOB oracle type.
core::Enum< LobTypeValues > LobType
Type of Lob.
core::Enum< SeekModeValues > SeekMode
Seek Modes.
std::vector< unsigned char > Raw
C++ counterpart of SQL RAW data type.
core::Enum< LongTypeValues > LongType
Type of Long.
OCI_Mutex * MutexHandle
Alias for an OCI_Mutex pointer.
FormatTypeValues
Format type enumerated values.
void * AnyPointer
Alias for the generic void pointer.
DataTypeValues
Data type enumerated values.
LobTypeValues
Lob types enumerated values.
core::Enum< FormatTypeValues > FormatType
Format type.
Long< ostring, LongCharacter > Clong
Class handling LONG oracle type.
Lob< Raw, LobBinary > Blob
Class handling BLOB oracle type.
OCI_Thread * ThreadHandle
Alias for an OCI_Thread pointer.
core::Enum< CharsetFormValues > CharsetForm
Type of charsetForm.
core::Enum< DataTypeValues > DataType
Column data type.
core::Enum< OracleVersionValues > OracleVersion
Oracle Version.