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
283 LobBinary = OCI_BLOB,
285 LobCharacter = OCI_CLOB,
287 LobNationalCharacter = OCI_NCLOB
307 LongBinary = OCI_BLONG,
309 LongCharacter = OCI_CLONG
444 unsigned int GetRow()
const;
454 const char*
what() const noexcept override;
472 void SetWhat(const otext* value) noexcept;
473 void CopyWhat(const
char* value) noexcept;
526 SourceInstance = OCI_HES_INSTANCE,
528 SourceDatabase = OCI_HES_DATABASE,
530 SourceNode = OCI_HES_NODE,
532 SourceService = OCI_HES_SERVICE,
534 SourceServiceMember = OCI_HES_SERVICE_MEMBER,
536 SourceASMInstance = OCI_HES_ASM_INSTANCE,
538 SourcePreConnect = OCI_HES_PRECONNECT
558 EventDown = OCI_HET_DOWN,
580 Default = OCI_ENV_DEFAULT,
582 Threaded = OCI_ENV_THREADED,
584 Events = OCI_ENV_EVENTS
604 ImportLinkage = OCI_IMPORT_MODE_LINKAGE,
606 ImportRuntime = OCI_IMPORT_MODE_RUNTIME
626 CharsetAnsi = OCI_CHAR_ANSI,
628 CharsetWide = OCI_CHAR_WIDE
648 SessionDefault = OCI_SESSION_DEFAULT,
650 SessionXa = OCI_SESSION_XA,
652 SessionSysDba = OCI_SESSION_SYSDBA,
654 SessionSysOper = OCI_SESSION_SYSOPER,
656 SessionSysAsm = OCI_SESSION_SYSASM,
658 SessionSysBkp = OCI_SESSION_SYSBKP,
660 SessionSysDgD = OCI_SESSION_SYSDGD,
662 SessionSysKmt = OCI_SESSION_SYSKMT,
664 SessionSysRac = OCI_SESSION_SYSRAC,
666 SessionPreAuth = OCI_SESSION_PRELIM_AUTH
686 StartOnly = OCI_DB_SPM_START,
688 StartMount = OCI_DB_SPM_MOUNT,
690 StartOpen = OCI_DB_SPM_OPEN,
692 StartFull = OCI_DB_SPM_FULL
712 StartDefault = OCI_DB_SPF_DEFAULT,
714 StartForce = OCI_DB_SPF_FORCE,
716 StartRestrict = OCI_DB_SPF_RESTRICT
736 ShutdownOnly = OCI_DB_SDM_SHUTDOWN,
738 ShutdownClose = OCI_DB_SDM_CLOSE,
740 ShutdownDismount = OCI_DB_SDM_DISMOUNT,
742 ShutdownFull = OCI_DB_SDM_FULL
763 ShutdowntDefault = OCI_DB_SDF_DEFAULT,
766 ShutdowTrans = OCI_DB_SDF_TRANS,
770 ShutdownTransLocal = OCI_DB_SDF_TRANS_LOCAL,
773 ShutdownImmediate = OCI_DB_SDF_IMMEDIATE,
779 ShutdownAbort = OCI_DB_SDF_ABORT
799 OracleClientBytes = OCI_MEM_ORACLE,
801 OcilibBytes = OCI_MEM_OCILIB,
803 AllBytes = OCI_MEM_ALL
859 static void Cleanup();
894 static unsigned int GetCharMaxSize();
910 static bool Initialized();
929 static unsigned int GetCompileMajorVersion();
936 static unsigned int GetCompileMinorVersion();
943 static unsigned int GetCompileRevisionVersion();
961 static unsigned int GetRuntimeMajorVersion();
968 static unsigned int GetRuntimeMinorVersion();
975 static unsigned int GetRuntimeRevisionVersion();
987 static void EnableWarnings(
bool value);
1064 const ostring& spfile = OTEXT(
""));
1124 static void SetHAHandler(HAHandlerProc handler);
1134 static unsigned int TAFHandler(
OCI_Connection* pConnection,
unsigned int type,
unsigned int event);
1135 static void NotifyHandler(
OCI_Event* pEvent);
1136 static void NotifyHandlerAQ(
OCI_Dequeue* pDequeue);
1142 static void SetUserCallback(
AnyPointer ptr, T callback);
1149 void SelfInitialize(EnvironmentFlags mode,
const ostring& libpath);
1154 EnvironmentHandle _handle;
1155 EnvironmentFlags _mode;
1156 unsigned int _charMaxSize;
1363 ConnectionPool = OCI_POOL_CONNECTION,
1365 SessionPool = OCI_POOL_SESSION
1402 unsigned int minSize,
unsigned int maxSize,
unsigned int increment = 1,
1424 unsigned int minSize,
unsigned int maxSize,
unsigned int increment = 1,
1475 unsigned int GetTimeout()
const;
1490 void SetTimeout(
unsigned int value);
1501 bool GetNoWait()
const;
1515 void SetNoWait(
bool value);
1522 unsigned int GetBusyConnectionsCount()
const;
1529 unsigned int GetOpenedConnectionsCount()
const;
1536 unsigned int GetMinSize()
const;
1543 unsigned int GetMaxSize()
const;
1550 unsigned int GetIncrement()
const;
1560 unsigned int GetStatementCacheSize()
const;
1569 void SetStatementCacheSize(
unsigned int value);
1599 template<
class,
int>
1616 TimeoutSend = OCI_NTO_SEND,
1621 TimeoutReceive = OCI_NTO_RECEIVE,
1626 TimeoutCall = OCI_NTO_CALL
1646 FailoverRequestSession = OCI_FOT_SESSION,
1648 FailoverRequestSelect = OCI_FOT_SELECT
1668 FailoverEventEnd = OCI_FOE_END,
1670 FailoverEventAbort = OCI_FOE_ABORT,
1672 FailoverEventReauthentificate = OCI_FOE_REAUTH,
1674 FailoverEventBegin = OCI_FOE_BEGIN,
1676 FailoverEventError = OCI_FOE_ERROR
1696 FailoverOk = OCI_FOC_OK,
1698 FailoverRetry = OCI_FOC_RETRY
1718 TraceIdentity = OCI_TRC_IDENTITY,
1720 TraceModule = OCI_TRC_MODULE,
1722 TraceAction = OCI_TRC_ACTION,
1724 TraceDetail = OCI_TRC_DETAIL
1849 void SetAutoCommit(
bool enabled);
1856 bool GetAutoCommit()
const;
1866 bool IsServerAlive()
const;
1876 bool PingServer()
const;
1886 ostring GetConnectionString()
const;
1916 ostring GetServerVersion()
const;
1933 unsigned int GetServerMajorVersion()
const;
1940 unsigned int GetServerMinorVersion()
const;
1947 unsigned int GetServerRevisionVersion()
const;
1956 void ChangePassword(
const ostring& newPwd);
1963 ostring GetSessionTag()
const;
1979 void SetSessionTag(
const ostring& tag);
2001 void SetTransaction(
const Transaction& transaction);
2067 void EnableServerOutput(
unsigned int bufsize,
unsigned int arrsize,
unsigned int lnsize);
2077 void DisableServerOutput();
2087 bool GetServerOutput(
ostring& line)
const;
2094 void GetServerOutput(std::vector<ostring>& lines)
const;
2209 unsigned int GetStatementCacheSize()
const;
2221 void SetStatementCacheSize(
unsigned int value);
2239 unsigned int GetDefaultLobPrefetchSize()
const;
2265 void SetDefaultLobPrefetchSize(
unsigned int value);
2281 unsigned int GetMaxCursors()
const;
2291 bool IsTAFCapable()
const;
2306 void SetTAFHandler(TAFHandlerProc handler);
2366 void SetTimeout(
TimeoutType timeout,
unsigned int value);
2393 Unknown = OCI_UNKNOWN,
2397 Tight = OCI_TRS_TIGHT,
2399 Loose = OCI_TRS_LOOSE,
2405 Serializable = OCI_TRS_SERIALIZABLE
2482 unsigned int GetTimeout()
const;
2517 Number(
bool create =
false);
2533 Number(
const otext* str,
const otext* format = OTEXT(
""));
2565 void FromString(
const ostring& str,
const ostring& format = OTEXT(
""))
const;
2587 ostring ToString()
const override;
2598 Number operator ++ (
int);
2599 Number operator -- (
int);
2601 bool operator == (
const Number& other)
const;
2602 bool operator != (
const Number& other)
const;
2603 bool operator > (
const Number& other)
const;
2604 bool operator < (
const Number& other)
const;
2605 bool operator >= (
const Number& other)
const;
2606 bool operator <= (
const Number& other)
const;
2608 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2609 Number& operator = (
const T& lhs);
2611 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2614 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2615 Number operator - (
const T& value);
2617 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2618 Number operator + (
const T& value);
2620 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2621 Number operator * (
const T& value);
2623 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2624 Number operator / (
const T& value);
2626 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2627 Number& operator += (
const T& value);
2629 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2630 Number& operator -= (
const T& value);
2632 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2633 Number& operator *= (
const T& value);
2635 template<class T, typename core::SupportedNumeric<T>::Type::type* =
nullptr>
2636 Number& operator /= (
const T& value);
2641 static AnyPointer GetNativeValue(
const T& value);
2647 int Compare(
const Number& other)
const;
2650 inline T GetValue()
const;
2653 Number& SetValue(
const T& value);
2656 void Add(
const T& value);
2659 void Sub(
const T& value);
2662 void Multiply(
const T& value);
2665 void Divide(
const T& value);
2694 static Date SysDate();
2703 Date(
bool create =
false);
2719 Date(
const otext* str,
const otext* format = OTEXT(
""));
2743 bool IsValid()
const;
2750 int GetYear()
const;
2757 void SetYear(
int value);
2764 int GetMonth()
const;
2771 void SetMonth(
int value);
2785 void SetDay(
int value);
2792 int GetHours()
const;
2799 void SetHours(
int value);
2806 int GetMinutes()
const;
2813 void SetMinutes(
int value);
2820 int GetSeconds()
const;
2827 void SetSeconds(
int value);
2836 int DaysBetween(
const Date& other)
const;
2847 void SetDate(
int year,
int month,
int day);
2858 void SetTime(
int hour,
int min,
int sec);
2872 void SetDateTime(
int year,
int month,
int day,
int hour,
int min,
int sec);
2883 void GetDate(
int& year,
int& month,
int& day)
const;
2894 void GetTime(
int& hour,
int& min,
int& sec)
const;
2908 void GetDateTime(
int& year,
int& month,
int& day,
int& hour,
int& min,
int& sec)
const;
2917 void AddDays(
int days);
2926 void AddMonths(
int months);
2942 Date LastDay()
const;
2968 void FromString(
const ostring& str,
const ostring& format = OTEXT(
""));
2990 ostring ToString()
const override;
3004 Date& operator ++ ();
3011 Date operator ++ (
int);
3018 Date& operator -- ();
3025 Date operator -- (
int);
3032 Date operator + (
int value)
const;
3039 Date operator - (
int value)
const;
3046 Date& operator += (
int value);
3053 Date& operator -= (
int value);
3060 bool operator == (
const Date& other)
const;
3067 bool operator != (
const Date& other)
const;
3074 bool operator > (
const Date& other)
const;
3081 bool operator < (
const Date& other)
const;
3088 bool operator >= (
const Date& other)
const;
3095 bool operator <= (
const Date& other)
const;
3099 int Compare(
const Date& other)
const;
3133 YearMonth = OCI_INTERVAL_YM,
3135 DaySecond = OCI_INTERVAL_DS
3188 bool IsValid()
const;
3198 int GetYear()
const;
3208 void SetYear(
int value);
3218 int GetMonth()
const;
3228 void SetMonth(
int value);
3248 void SetDay(
int value);
3258 int GetHours()
const;
3268 void SetHours(
int value);
3278 int GetMinutes()
const;
3288 void SetMinutes(
int value);
3298 int GetSeconds()
const;
3308 void SetSeconds(
int value);
3315 int GetMilliSeconds()
const;
3322 void SetMilliSeconds(
int value);
3338 void GetDaySecond(
int& day,
int& hour,
int& min,
int& sec,
int& fsec)
const;
3354 void SetDaySecond(
int day,
int hour,
int min,
int sec,
int fsec);
3367 void GetYearMonth(
int& year,
int& month)
const;
3380 void SetYearMonth(
int year,
int month);
3389 void UpdateTimeZone(
const ostring& timeZone);
3401 void FromString(
const ostring& data);
3411 ostring ToString(
int leadingPrecision,
int fractionPrecision)
const;
3418 ostring ToString()
const override;
3460 bool operator == (
const Interval& other)
const;
3467 bool operator != (
const Interval& other)
const;
3474 bool operator > (
const Interval& other)
const;
3481 bool operator < (
const Interval& other)
const;
3488 bool operator >= (
const Interval& other)
const;
3495 bool operator <= (
const Interval& other)
const;
3499 int Compare(
const Interval& other)
const;
3533 NoTimeZone = OCI_TIMESTAMP,
3535 WithTimeZone = OCI_TIMESTAMP_TZ,
3537 WithLocalTimeZone = OCI_TIMESTAMP_LTZ
3609 bool IsValid()
const;
3616 int GetYear()
const;
3623 void SetYear(
int value);
3630 int GetMonth()
const;
3637 void SetMonth(
int value);
3651 void SetDay(
int value);
3658 int GetHours()
const;
3665 void SetHours(
int value);
3672 int GetMinutes()
const;
3679 void SetMinutes(
int value);
3686 int GetSeconds()
const;
3693 void SetSeconds(
int value);
3700 int GetMilliSeconds()
const;
3707 void SetMilliSeconds(
int value);
3718 void GetDate(
int& year,
int& month,
int& day)
const;
3730 void GetTime(
int& hour,
int& min,
int& sec,
int& fsec)
const;
3741 void SetDate(
int year,
int month,
int day);
3753 void SetTime(
int hour,
int min,
int sec,
int fsec);
3768 void GetDateTime(
int& year,
int& month,
int& day,
int& hour,
int& min,
int& sec,
int& fsec)
const;
3784 void SetDateTime(
int year,
int month,
int day,
int hour,
int min,
int sec,
int fsec,
const ostring& timeZone = OTEXT(
""));
3805 void SetTimeZone(
const ostring& timeZone);
3815 void GetTimeZoneOffset(
int& hour,
int& min)
const;
3842 void FromString(
const ostring& data,
const ostring& format = OCI_STRING_FORMAT_DATE);
3862 ostring ToString()
const override;
3967 bool operator == (
const Timestamp& other)
const;
3974 bool operator != (
const Timestamp& other)
const;
3981 bool operator > (
const Timestamp& other)
const;
3988 bool operator < (
const Timestamp& other)
const;
3995 bool operator >= (
const Timestamp& other)
const;
4002 bool operator <= (
const Timestamp& other)
const;
4006 int Compare(
const Timestamp& other)
const;
4018 template<
class T,
int U>
4071 unsigned int Write(
const T& content);
4083 unsigned int Append(
const T& content);
4092 void Append(
const Lob& other);
4108 bool Seek(
SeekMode seekMode, big_uint offset);
4122 big_uint GetOffset()
const;
4129 big_uint GetLength()
const;
4136 big_uint GetMaxSize()
const;
4149 big_uint GetChunkSize()
const;
4165 void Truncate(big_uint length);
4182 big_uint Erase(big_uint offset, big_uint length);
4197 void Copy(
Lob& dest, big_uint offset, big_uint offsetDest, big_uint length)
const;
4204 bool IsTemporary()
const;
4211 bool IsRemote()
const;
4262 void EnableBuffering(
bool value);
4276 Lob& operator += (
const Lob& other);
4283 bool operator == (
const Lob& other)
const;
4290 bool operator != (
const Lob& other)
const;
4294 bool Equals(
const Lob& other)
const;
4397 Raw Read(
unsigned int size);
4413 bool Seek(
SeekMode seekMode, big_uint offset);
4423 bool Exists()
const;
4430 big_uint GetOffset()
const;
4437 big_uint GetLength()
const;
4493 bool IsOpened()
const;
4507 bool operator == (
const File& other)
const;
4514 bool operator != (
const File& other)
const;
4518 bool Equals(
const File& other)
const;
4547 Table = OCI_TIF_TABLE,
4549 View = OCI_TIF_VIEW,
4607 unsigned int GetColumnCount()
const;
4623 Column GetColumn(
unsigned int index)
const;
4637 boolean IsFinalType()
const;
4687 Persistent = OCI_OBJ_PERSISTENT,
4689 Transient = OCI_OBJ_TRANSIENT,
4691 Value = OCI_OBJ_VALUE
4726 bool IsAttributeNull(
const ostring& name)
const;
4735 void SetAttributeNull(
const ostring& name);
4771 T Get(
const ostring& name)
const;
4819 void Set(
const ostring& name,
const T& value);
4833 ostring ToString()
const override;
4889 Object GetObject()
const;
4896 bool IsReferenceNull()
const;
4906 void SetReferenceNull();
4920 ostring ToString()
const override;
4943 typedef T ValueType;
4951 bool IsNull()
const;
4975 typedef typename T::ValueType value_type;
4978 typedef std::random_access_iterator_tag iterator_category;
4979 typedef ptrdiff_t difference_type;
4980 typedef ptrdiff_t distance_type;
4981 typedef value_type* pointer;
4982 typedef value_type& reference;
5049 Varray = OCI_COLL_VARRAY,
5051 NestedTable = OCI_COLL_NESTED_TABLE,
5053 IndexedTable = OCI_COLL_INDEXED_TABLE
5093 unsigned int GetMax()
const;
5100 unsigned int GetSize()
const;
5112 unsigned int GetCount()
const;
5121 void Truncate(
unsigned int size);
5141 bool IsElementNull(
unsigned int index)
const;
5153 void SetElementNull(
unsigned int index);
5172 bool Delete(
unsigned int index)
const;
5181 T Get(
unsigned int index)
const;
5191 void Set(
unsigned int index,
const T& value);
5201 void Append(
const T& value);
5222 ostring ToString()
const override;
5284 static void SetElem(
OCI_Elem* elem,
const T& value);
5296 template<
class T,
int U>
5331 unsigned int Write(
const T& content);
5338 unsigned int GetLength()
const;
5399 InOut = OCI_BDM_IN_OUT
5466 unsigned int GetSubType()
const;
5477 unsigned int GetDataCount()
const;
5506 void SetDataNull(
bool value,
unsigned int index = 1);
5522 bool IsDataNull(
unsigned int index = 1)
const;
5562 template<
class,
int>
5565 friend class BindObject;
5577 TypeSelect = OCI_CST_SELECT,
5579 TypeUpdate = OCI_CST_UPDATE,
5581 TypeDelete = OCI_CST_DELETE,
5583 TypeInsert = OCI_CST_INSERT,
5585 TypeCreate = OCI_CST_CREATE,
5587 TypeDrop = OCI_CST_DROP,
5589 TypeAlter = OCI_CST_ALTER,
5591 TypeBegin = OCI_CST_BEGIN,
5593 TypeDeclare = OCI_CST_DECLARE,
5595 TypeCall = OCI_CST_CALL,
5597 TypeMerge = OCI_CST_MERGE
5617 FetchForward = OCI_SFM_DEFAULT,
5619 FetchScrollable = OCI_SFM_SCROLLABLE
5639 BindByPosition = OCI_BIND_BY_POS,
5641 BindByName = OCI_BIND_BY_NAME
5661 LongExplicit = OCI_LONG_EXPLICIT,
5663 LongImplicit = OCI_LONG_IMPLICIT
5727 void Describe(
const ostring& sql);
5752 void Parse(
const ostring& sql);
5764 void Prepare(
const ostring& sql);
5771 void ExecutePrepared();
5780 void Execute(
const ostring& sql);
5800 unsigned int ExecutePrepared(T callback);
5822 template<
class T,
class U>
5823 unsigned int ExecutePrepared(T callback, U adapter);
5844 unsigned int Execute(
const ostring& sql, T callback);
5867 template<
class T,
class U>
5868 unsigned int Execute(
const ostring& sql, T callback, U adapter);
5884 unsigned int GetAffectedRows()
const;
5898 ostring GetSqlIdentifier()
const;
5960 void SetBindArraySize(
unsigned int size);
5967 unsigned int GetBindArraySize()
const;
5984 void AllowRebinding(
bool value);
5994 bool IsRebindingAllowed()
const;
6012 unsigned int GetBindIndex(
const ostring& name)
const;
6019 unsigned int GetBindCount()
const;
6035 BindInfo GetBind(
unsigned int index)
const;
6092 template<
class T,
class U>
6194 template<
class T,
class U>
6237 template<
class T,
class U>
6258 template<
class T,
class U>
6277 unsigned int GetSqlErrorPos()
const;
6327 void SetFetchSize(
unsigned int value);
6337 unsigned int GetFetchSize()
const;
6349 void SetPrefetchSize(
unsigned int value);
6359 unsigned int GetPrefetchSize()
const;
6379 void SetPrefetchMemory(
unsigned int value);
6389 unsigned int GetPrefetchMemory()
const;
6398 void SetLongMaxSize(
unsigned int value);
6408 unsigned int GetLongMaxSize()
const;
6441 unsigned int GetSQLCommand()
const;
6462 void GetBatchErrors(std::vector<Exception>& exceptions);
6467 static void OnFreeSmartHandle(SmartHandle* smartHandle);
6473 void ReleaseResultsets()
const;
6477 void SetInData()
const;
6478 void SetOutData()
const;
6479 void ClearBinds()
const;
6481 template<
typename M,
class T>
6484 template<
typename M,
class T>
6487 template<
typename M,
class T>
6490 template<
typename M,
class T,
class U>
6493 template<
typename T>
6494 unsigned int Fetch(T callback);
6496 template<
typename T,
typename U>
6497 unsigned int Fetch(T callback, U adapter);
6520 SeekAbsolute = OCI_SFD_ABSOLUTE,
6522 SeekRelative = OCI_SFD_RELATIVE
6547 T Get(
unsigned int index)
const;
6563 void Get(
unsigned int index, T& value)
const;
6578 T Get(
const ostring& name)
const;
6591 void Get(
const ostring& name, T& value)
const;
6607 template<
class T,
class U>
6608 bool Get(T& value, U adapter)
const;
6625 template<
typename T>
6650 template<
typename T,
typename U>
6651 unsigned int ForEach(T callback, U adapter);
6729 bool Seek(
SeekMode mode,
int offset);
6736 unsigned int GetCount()
const;
6748 unsigned int GetCurrentRow()
const;
6763 unsigned int GetColumnIndex(
const ostring& name)
const;
6770 unsigned int GetColumnCount()
const;
6782 Column GetColumn(
unsigned int index)
const;
6806 bool IsColumnNull(
unsigned int index)
const;
6815 bool IsColumnNull(
const ostring& name)
const;
6829 bool operator ++ (
int);
6836 bool operator -- (
int);
6844 bool operator += (
int offset);
6852 bool operator -= (
int offset);
6881 NoFlags = OCI_CPF_NONE,
6884 IsIdentity = OCI_CPF_IS_IDENTITY,
6888 IsGeneratedAlways = OCI_CPF_IS_GEN_ALWAYS,
6891 IsGeneratedByDefaultOnNull = OCI_CPF_IS_GEN_BY_DEFAULT_ON_NULL,
6893 IsLogicalPartitioning = OCI_CPF_IS_LPART,
6895 IsGeneratedByContainers = OCI_CPF_IS_CONID
6933 ostring GetFullSQLType()
const;
6959 unsigned int GetSubType()
const;
6984 unsigned int GetSize()
const;
6991 int GetScale()
const;
6998 int GetPrecision()
const;
7005 int GetFractionalPrecision()
const;
7012 int GetLeadingPrecision()
const;
7031 bool IsNullable()
const;
7042 bool IsCharSemanticUsed()
const;
7083 typedef void (*NotifyHandlerProc) (
Event& evt);
7093 ObjectChanges = OCI_CNT_OBJECTS,
7095 RowChanges = OCI_CNT_ROWS,
7097 DatabaseChanges = OCI_CNT_DATABASES,
7099 AllChanges = OCI_CNT_ALL
7133 void Register(
const Connection& connection,
const ostring& name,
ChangeTypes changeTypes, NotifyHandlerProc handler,
unsigned int port = 0,
unsigned int timeout = 0);
7156 void Watch(
const ostring& sql);
7170 unsigned int GetTimeout()
const;
7177 unsigned int GetPort()
const;
7219 DatabaseStart = OCI_ENT_STARTUP,
7221 DatabaseShutdown = OCI_ENT_SHUTDOWN,
7223 DatabaseShutdownAny = OCI_ENT_SHUTDOWN_ANY,
7225 DatabaseDrop = OCI_ENT_DROP_DATABASE,
7227 Unregister = OCI_ENT_DEREGISTER,
7229 ObjectChanged = OCI_ENT_OBJECT_CHANGED
7249 ObjectInserted = OCI_ONT_INSERT,
7251 ObjectUpdated = OCI_ONT_UPDATE,
7253 ObjectDeleted = OCI_ONT_DELETE,
7255 ObjectAltered = OCI_ONT_ALTER,
7257 ObjectDropped = OCI_ONT_DROP,
7259 ObjectGeneric = OCI_ONT_GENERIC
7293 ostring GetDatabaseName()
const;
7303 ostring GetObjectName()
const;
7382 void SetName(
const ostring& value);
7407 void SetAddress(
const ostring& value);
7435 Ready = OCI_AMS_READY,
7437 Waiting = OCI_AMS_WAITING,
7439 Processed = OCI_AMS_PROCESSED,
7441 Expired = OCI_AMS_EXPIRED
7520 Date GetEnqueueTime()
const;
7527 int GetAttemptCount()
const;
7556 int GetExpiration()
const;
7577 void SetExpiration(
int value);
7587 int GetEnqueueDelay()
const;
7611 void SetEnqueueDelay(
int value);
7621 int GetPriority()
const;
7635 void SetPriority(
int value);
7646 Raw GetOriginalID()
const;
7659 void SetOriginalID(
const Raw& value);
7669 ostring GetCorrelation()
const;
7681 void SetCorrelation(
const ostring& value);
7696 ostring GetExceptionQueue()
const;
7724 void SetExceptionQueue(
const ostring& value);
7734 Agent GetSender()
const;
7743 void SetSender(
const Agent& agent);
7756 void SetConsumers(std::vector<Agent>& agents);
7782 Before = OCI_ASD_BEFORE,
7804 Immediate = OCI_AMV_IMMEDIATE,
7806 OnCommit = OCI_AMV_ON_COMMIT
7848 void Put(
const Message& message);
7912 Raw GetRelativeMsgID()
const;
7927 void SetRelativeMsgID(
const Raw& value);
7950 typedef void (*NotifyAQHandlerProc) (
Dequeue& dequeue);
7960 Browse = OCI_ADM_BROWSE,
7962 Locked = OCI_ADM_LOCKED,
7964 Remove = OCI_ADM_REMOVE,
7966 Confirm = OCI_ADM_REMOVE_NODATA
7986 Immediate = OCI_AMV_IMMEDIATE,
7988 OnCommit = OCI_AMV_ON_COMMIT
8008 FirstMessage = OCI_ADN_FIRST_MSG,
8010 NextMessage = OCI_ADN_NEXT_MSG,
8013 NextTransaction = OCI_ADN_NEXT_TRANSACTION
8065 Agent Listen(
int timeout);
8088 void SetConsumer(
const ostring& value);
8098 ostring GetCorrelation()
const;
8111 void SetCorrelation(
const ostring& value);
8121 Raw GetRelativeMsgID()
const;
8130 void SetRelativeMsgID(
const Raw& value);
8219 int GetWaitTime()
const;
8238 void SetWaitTime(
int value);
8247 void SetAgents(std::vector<Agent>& agents);
8265 void Subscribe(
unsigned int port,
unsigned int timeout, NotifyAQHandlerProc handler);
8299 NormalQueue = OCI_AQT_NORMAL,
8301 ExceptionQueue = OCI_AQT_EXCEPTION,
8303 NonPersistentQueue = OCI_AQT_NON_PERSISTENT
8340 unsigned int maxRetries = 0,
unsigned int retryDelay = 0,
unsigned int retentionTime = 0,
8341 bool dependencyTracking =
false,
const ostring& comment = OTEXT(
""));
8364 unsigned int maxRetries = 0,
unsigned int retryDelay = 0,
8365 unsigned int retentionTime = 0,
const ostring& comment = OTEXT(
""));
8401 static void Start(
const Connection& connection,
const ostring& queue,
bool enableEnqueue =
true,
bool enableDequeue =
true);
8421 static void Stop(
const Connection& connection,
const ostring& queue,
bool stopEnqueue =
true,
bool stopDequeue =
true,
bool wait =
true);
8442 None = OCI_AGM_NONE,
8445 Transactionnal = OCI_AGM_TRANSACTIONNAL
8466 Buffered = OCI_APM_BUFFERED,
8468 Persistent = OCI_APM_PERSISTENT,
8516 static void Create(
const Connection& connection,
const ostring& table,
const ostring& payloadType,
bool multipleConsumers,
8517 const ostring& storageClause = OTEXT(
""),
const ostring& sortList = OTEXT(
""),
8519 unsigned int primaryInstance = 0,
unsigned int secondaryInstance = 0,
8520 const ostring& compatible = OTEXT(
""));
8540 static void Alter(
const Connection& connection,
const ostring& table,
const ostring& comment,
unsigned int primaryInstance = 0,
unsigned int secondaryInstance = 0);
8562 static void Drop(
const Connection& connection,
const ostring& table,
bool force =
true);
8628 Default = OCI_DCM_DEFAULT,
8630 Force = OCI_DCM_FORCE
8650 ResultComplete = OCI_DPR_COMPLETE,
8652 ResultError = OCI_DPR_ERROR,
8654 ResultFull = OCI_DPR_FULL,
8656 ResultPartial = OCI_DPR_PARTIAL,
8658 ResultEmpty = OCI_DPR_EMPTY
8709 void SetColumn(
unsigned int colIndex,
const ostring& name,
unsigned int maxSize,
const ostring& format = OTEXT(
""));
8742 void SetEntry(
unsigned int rowIndex,
unsigned int colIndex,
const T& value,
bool complete =
true);
8848 void SetCurrentRows(
unsigned int value);
8858 unsigned int GetCurrentRows()
const;
8868 unsigned int GetMaxRows()
const;
8878 unsigned int GetRowCount()
const;
8892 unsigned int GetAffectedRows()
const;
8907 void SetDateFormat(
const ostring& format);
8935 void SetParallel(
bool value);
8951 void SetNoLog(
bool value);
8966 void SetCacheSize(
unsigned int value);
8978 void SetBufferSize(
unsigned int value);
9023 unsigned int GetErrorColumn();
9058 unsigned int GetErrorRow();
9062 #define OCILIB_DEFINE_FLAG_OPERATORS(T) \
9063 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.
Template Enumeration template class providing some type safety to some extends for manipulating enume...
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.
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_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_XID OCI_XID
Global transaction identifier.
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.