OCILIB (C and C++ Driver for Oracle)  4.9.0
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
Loading...
Searching...
No Matches
types.hpp
1/*
2 * OCILIB - C Driver for Oracle (C Wrapper for Oracle OCI)
3 *
4 * Website: http://www.ocilib.net
5 *
6 * Copyright (c) 2007-2026 Vincent ROGIER <vince.rogier@ocilib.net>
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21#pragma once
22
23#include <cstddef>
24#include <iterator>
25#include <vector>
26
27#include "ocilibcpp/core.hpp"
28#include "ocilibcpp/support.hpp"
29
30 // ReSharper disable CppClangTidyCppcoreguidelinesMacroUsage
31 // ReSharper disable CppClangTidyModernizeUseNodiscard
32 // ReSharper disable CppClangTidyHicppSpecialMemberFunctions
33 // ReSharper disable CppClangTidyReadabilityRedundantDeclaration
34 // ReSharper disable CppFunctionIsNotImplemented
35 // ReSharper disable CppClangTidyCppcoreguidelinesSpecialMemberFunctions
36 // ReSharper disable CppClassCanBeFinal
37
38namespace ocilib
39{
40
50 {
51 Oracle80 = OCI_8_0,
52 Oracle8i = OCI_8_1,
53 Oracle9iR1 = OCI_9_0,
54 Oracle9iR2 = OCI_9_2,
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
69 };
70
79
86 {
88 TypeNumeric = OCI_CDT_NUMERIC,
90 TypeDate = OCI_CDT_DATETIME,
92 TypeString = OCI_CDT_TEXT,
94 TypeLong = OCI_CDT_LONG,
96 TypeStatement = OCI_CDT_CURSOR,
98 TypeLob = OCI_CDT_LOB,
100 TypeFile = OCI_CDT_FILE,
102 TypeTimestamp = OCI_CDT_TIMESTAMP,
104 TypeInterval = OCI_CDT_INTERVAL,
106 TypeRaw = OCI_CDT_RAW,
108 TypeObject = OCI_CDT_OBJECT,
110 TypeCollection = OCI_CDT_COLLECTION,
112 TypeReference = OCI_CDT_REF,
114 TypeBoolean = OCI_CDT_BOOLEAN,
116 TypeXmlType = OCI_CDT_XMLTYPE,
118 TypeVector = OCI_CDT_VECTOR
119 };
120
129
136 {
138 NumericShort = OCI_NUM_SHORT,
140 NumericInt = OCI_NUM_INT,
142 NumericBigInt = OCI_NUM_BIGINT,
144 NumericUnsignedShort = OCI_NUM_USHORT,
146 NumericUnsignedInt = OCI_NUM_UINT,
148 NumericUnsignedBigInt = OCI_NUM_BIGUINT,
150 NumericDouble = OCI_NUM_DOUBLE,
152 NumericFloat = OCI_NUM_FLOAT,
154 NumericNumber = OCI_NUM_NUMBER
155 };
156
165
172 {
174 CharsetFormDefault = OCI_CSF_DEFAULT,
176 CharsetFormNational = OCI_CSF_NATIONAL
177 };
178
187
194 {
196 CollationIDNone = OCI_CCI_NONE,
198 CollationIDNlsComp = OCI_CCI_NLS_COMP,
200 CollationIDNlsSort = OCI_CCI_NLS_SORT,
202 CollationIDNlsSortCI = OCI_CCI_NLS_SORT_CI,
204 CollationIDNlsSortAI = OCI_CCI_NLS_SORT_AI,
206 CollationIDNlsSortCS = OCI_CCI_NLS_SORT_CS,
208 CollationIDNlsSortVar1 = OCI_CCI_NLS_SORT_VAR1,
210 CollationIDNlsSortVar1CI = OCI_CCI_NLS_SORT_VAR1_CI,
212 CollationIDNlsSortVar1AI = OCI_CCI_NLS_SORT_VAR1_AI,
214 CollationIDNlsSortVar1CS = OCI_CCI_NLS_SORT_VAR1_CS,
216 CollationIDBinary = OCI_CCI_BINARY,
218 CollationIDBinaryCI = OCI_CCI_BINARY_CI,
220 CollationIDBinaryAI = OCI_CCI_BINARY_AI
221 };
222
231
232
239 {
241 SeekSet = OCI_SEEK_SET,
243 SeekEnd = OCI_SEEK_END,
245 SeekOffset = OCI_SEEK_CUR
246 };
247
256
263 {
265 ReadOnly = OCI_LOB_READONLY,
267 ReadWrite = OCI_LOB_READWRITE
268 };
269
278
285 {
287 LobBinary = OCI_BLOB,
289 LobCharacter = OCI_CLOB,
291 LobNationalCharacter = OCI_NCLOB
292 };
293
302
309 {
311 LongBinary = OCI_BLONG,
313 LongCharacter = OCI_CLONG
314 };
315
324
331 {
333 FormatDate = OCI_FMT_DATE,
335 FormatTimestamp = OCI_FMT_TIMESTAMP,
337 FormatNumeric = OCI_FMT_NUMERIC,
339 FormatBinaryDouble = OCI_FMT_BINARY_DOUBLE,
341 FormatBinaryFloat = OCI_FMT_BINARY_FLOAT
342 };
343
352
361 class Exception : public std::exception
362 {
363 template<class T>
364 friend T core::Check(T result);
365 friend class Statement;
366
367 public:
368
375 {
377 OracleError = OCI_ERR_ORACLE,
379 OcilibError = OCI_ERR_OCILIB,
381 OracleWarning = OCI_ERR_WARNING
382 };
383
392
398 ostring GetMessage() const;
399
406 ExceptionType GetType() const;
407
413 int GetOracleErrorCode() const;
414
420 int GetInternalErrorCode() const;
421
427 Statement GetStatement() const;
428
435
448 unsigned int GetRow() const;
449
458 const char* what() const noexcept override;
459
460 Exception(const Exception& other) noexcept;
461
462 Exception& operator = (const Exception& other) noexcept;
463
469 virtual ~Exception() noexcept;
470
471 private:
472
473 Exception() noexcept;
474 Exception(OCI_Error* err) noexcept;
475
476 void SetWhat(const otext* value) noexcept;
477 void CopyWhat(const char* value) noexcept;
478
479 char* _what;
480 OCI_Statement* _pStatement;
481 OCI_Connection* _pConnection;
482 unsigned int _row;
483 ExceptionType _type;
484 int _errLib;
485 int _errOracle;
486 };
487
494 {
495 friend class Mutex;
496 friend class Connection;
497 friend class Pool;
498 friend class TypeInfo;
499 friend class Subscription;
500 friend class Dequeue;
501 friend class Date;
502 friend class Timestamp;
503 friend class Number;
504 friend class Interval;
505 friend class Agent;
506 friend class Transaction;
507 friend class Exception;
508 friend class File;
509 friend class Log;
510 friend class Statement;
511 friend class Object;
512 friend class Reference;
513 friend class Message;
514 friend class Event;
515 friend class Column;
516 template<class, int>
517 friend class Lob;
518
519 friend class core::HandleStore;
520
521 public:
522
529 {
531 SourceInstance = OCI_HES_INSTANCE,
533 SourceDatabase = OCI_HES_DATABASE,
535 SourceNode = OCI_HES_NODE,
537 SourceService = OCI_HES_SERVICE,
539 SourceServiceMember = OCI_HES_SERVICE_MEMBER,
541 SourceASMInstance = OCI_HES_ASM_INSTANCE,
543 SourcePreConnect = OCI_HES_PRECONNECT
544 };
545
554
561 {
563 EventDown = OCI_HET_DOWN,
565 EventUp = OCI_HET_UP
566 };
567
576
583 {
585 Default = OCI_ENV_DEFAULT,
587 Threaded = OCI_ENV_THREADED,
589 Events = OCI_ENV_EVENTS
590 };
591
600
607 {
609 ImportLinkage = OCI_IMPORT_MODE_LINKAGE,
611 ImportRuntime = OCI_IMPORT_MODE_RUNTIME
612 };
613
622
629 {
631 CharsetAnsi = OCI_CHAR_ANSI,
633 CharsetWide = OCI_CHAR_WIDE
634 };
635
644
651 {
653 SessionDefault = OCI_SESSION_DEFAULT,
655 SessionXa = OCI_SESSION_XA,
657 SessionSysDba = OCI_SESSION_SYSDBA,
659 SessionSysOper = OCI_SESSION_SYSOPER,
661 SessionSysAsm = OCI_SESSION_SYSASM,
663 SessionSysBkp = OCI_SESSION_SYSBKP,
665 SessionSysDgD = OCI_SESSION_SYSDGD,
667 SessionSysKmt = OCI_SESSION_SYSKMT,
669 SessionSysRac = OCI_SESSION_SYSRAC,
671 SessionPreAuth = OCI_SESSION_PRELIM_AUTH
672 };
673
682
689 {
691 StartOnly = OCI_DB_SPM_START,
693 StartMount = OCI_DB_SPM_MOUNT,
695 StartOpen = OCI_DB_SPM_OPEN,
697 StartFull = OCI_DB_SPM_FULL
698 };
699
708
715 {
717 StartDefault = OCI_DB_SPF_DEFAULT,
719 StartForce = OCI_DB_SPF_FORCE,
721 StartRestrict = OCI_DB_SPF_RESTRICT
722 };
723
732
739 {
741 ShutdownOnly = OCI_DB_SDM_SHUTDOWN,
743 ShutdownClose = OCI_DB_SDM_CLOSE,
745 ShutdownDismount = OCI_DB_SDM_DISMOUNT,
747 ShutdownFull = OCI_DB_SDM_FULL
748 };
749
758
765 {
768 ShutdowntDefault = OCI_DB_SDF_DEFAULT,
771 ShutdowTrans = OCI_DB_SDF_TRANS,
775 ShutdownTransLocal = OCI_DB_SDF_TRANS_LOCAL,
778 ShutdownImmediate = OCI_DB_SDF_IMMEDIATE,
784 ShutdownAbort = OCI_DB_SDF_ABORT
785 };
786
795
802 {
804 OracleClientBytes = OCI_MEM_ORACLE,
806 OcilibBytes = OCI_MEM_OCILIB,
808 AllBytes = OCI_MEM_ALL
809 };
810
819
826 {
827 LocaleDayname1 = OCI_LSI_DAYNAME1,
828 LocaleDayname2 = OCI_LSI_DAYNAME2,
829 LocaleDayname3 = OCI_LSI_DAYNAME3,
830 LocaleDayname4 = OCI_LSI_DAYNAME4,
831 LocaleDayname5 = OCI_LSI_DAYNAME5,
832 LocaleDayname6 = OCI_LSI_DAYNAME6,
833 LocaleDayname7 = OCI_LSI_DAYNAME7,
834 LocaleAbdayname1 = OCI_LSI_ABDAYNAME1,
835 LocaleAbdayname2 = OCI_LSI_ABDAYNAME2,
836 LocaleAbdayname3 = OCI_LSI_ABDAYNAME3,
837 LocaleAbdayname4 = OCI_LSI_ABDAYNAME4,
838 LocaleAbdayname5 = OCI_LSI_ABDAYNAME5,
839 LocaleAbdayname6 = OCI_LSI_ABDAYNAME6,
840 LocaleAbdayname7 = OCI_LSI_ABDAYNAME7,
841 LocaleMonthname1 = OCI_LSI_MONTHNAME1,
842 LocaleMonthname2 = OCI_LSI_MONTHNAME2,
843 LocaleMonthname3 = OCI_LSI_MONTHNAME3,
844 LocaleMonthname4 = OCI_LSI_MONTHNAME4,
845 LocaleMonthname5 = OCI_LSI_MONTHNAME5,
846 LocaleMonthname6 = OCI_LSI_MONTHNAME6,
847 LocaleMonthname7 = OCI_LSI_MONTHNAME7,
848 LocaleMonthname8 = OCI_LSI_MONTHNAME8,
849 LocaleMonthname9 = OCI_LSI_MONTHNAME9,
850 LocaleMonthname10 = OCI_LSI_MONTHNAME10,
851 LocaleMonthname11 = OCI_LSI_MONTHNAME11,
852 LocaleMonthname12 = OCI_LSI_MONTHNAME12,
853 LocaleAbmonthname1 = OCI_LSI_ABMONTHNAME1,
854 LocaleAbmonthname2 = OCI_LSI_ABMONTHNAME2,
855 LocaleAbmonthname3 = OCI_LSI_ABMONTHNAME3,
856 LocaleAbmonthname4 = OCI_LSI_ABMONTHNAME4,
857 LocaleAbmonthname5 = OCI_LSI_ABMONTHNAME5,
858 LocaleAbmonthname6 = OCI_LSI_ABMONTHNAME6,
859 LocaleAbmonthname7 = OCI_LSI_ABMONTHNAME7,
860 LocaleAbmonthname8 = OCI_LSI_ABMONTHNAME8,
861 LocaleAbmonthname9 = OCI_LSI_ABMONTHNAME9,
862 LocaleAbmonthname10 = OCI_LSI_ABMONTHNAME10,
863 LocaleAbmonthname11 = OCI_LSI_ABMONTHNAME11,
864 LocaleAbmonthname12 = OCI_LSI_ABMONTHNAME12,
865 LocaleYes = OCI_LSI_YES,
866 LocaleNo = OCI_LSI_NO,
867 LocaleAm = OCI_LSI_AM,
868 LocalePm = OCI_LSI_PM,
869 LocaleAd = OCI_LSI_AD,
870 LocaleBc = OCI_LSI_BC,
871 LocaleDecimal = OCI_LSI_DECIMAL,
872 LocaleGroup = OCI_LSI_GROUP,
873 LocaleDebit = OCI_LSI_DEBIT,
874 LocaleCredit = OCI_LSI_CREDIT,
875 LocaleDateformat = OCI_LSI_DATEFORMAT,
876 LocaleInt = OCI_LSI_INT_CURRENCY,
877 LocaleLoc = OCI_LSI_LOC_CURRENCY,
878 LocaleLanguage = OCI_LSI_LANGUAGE,
879 LocaleAblanguage = OCI_LSI_ABLANGUAGE,
880 LocaleTerritory = OCI_LSI_TERRITORY,
881 LocaleCharacterSEt = OCI_LSI_CHARACTER_SET,
882 LocaleLinguisticName = OCI_LSI_LINGUISTIC_NAME,
883 LocaleCalendar = OCI_LSI_CALENDAR,
884 LocaleDualCurrency = OCI_LSI_DUAL_CURRENCY,
885 LocaleWritingdir = OCI_LSI_WRITINGDIR,
886 LocaleAbterritory = OCI_LSI_ABTERRITORY,
887 LocaleDdateformat = OCI_LSI_DDATEFORMAT,
888 LocaleDtimeformat = OCI_LSI_DTIMEFORMAT,
889 LocaleSfdateformat = OCI_LSI_SFDATEFORMAT,
890 LocaleSftimeformat = OCI_LSI_SFTIMEFORMAT,
891 LocaleNumgrouping = OCI_LSI_NUMGROUPING,
892 LocaleListsep = OCI_LSI_LISTSEP,
893 LocaleMondecimal = OCI_LSI_MONDECIMAL,
894 LocaleMongroup = OCI_LSI_MONGROUP,
895 LocaleMongrouping = OCI_LSI_MONGROUPING,
896 LocaleIntCurrenySep = OCI_LSI_INT_CURRENCYSEP
897 };
898
914 typedef void(*HAHandlerProc) (Connection& con, HAEventSource eventSource, HAEventType eventType, Timestamp& time);
915
935 static void Initialize(EnvironmentFlags mode = Environment::Default, const ostring& libpath = OTEXT(""));
936
951 static void Cleanup();
952
961 static Environment::EnvironmentFlags GetMode();
962
968 static Environment::ImportMode GetImportMode();
969
975 static Environment::CharsetMode GetCharset();
976
986 static unsigned int GetCharMaxSize();
987
995 static big_uint GetAllocatedBytes(AllocatedBytesFlags type);
996
1002 static bool Initialized();
1003
1014 static OracleVersion GetCompileVersion();
1015
1021 static unsigned int GetCompileMajorVersion();
1022
1028 static unsigned int GetCompileMinorVersion();
1029
1035 static unsigned int GetCompileRevisionVersion();
1036
1046 static OracleVersion GetRuntimeVersion();
1047
1053 static unsigned int GetRuntimeMajorVersion();
1054
1060 static unsigned int GetRuntimeMinorVersion();
1061
1067 static unsigned int GetRuntimeRevisionVersion();
1068
1079 static void EnableWarnings(bool value);
1080
1112 static bool SetFormat(FormatType formatType, const ostring& format);
1113
1124 static ostring GetFormat(FormatType formatType);
1125
1133 static ostring GetLocaleString(LocaleCode code);
1134
1161 static void StartDatabase(const ostring& db, const ostring& user, const ostring& pwd,
1162 Environment::StartFlags startFlags,
1163 Environment::StartMode startMode,
1164 Environment::SessionFlags sessionFlags = SessionSysDba,
1165 const ostring& spfile = OTEXT(""));
1166
1192 static void ShutdownDatabase(const ostring& db, const ostring& user, const ostring& pwd,
1193 Environment::ShutdownFlags shutdownFlags,
1194 Environment::ShutdownMode shutdownMode,
1195 Environment::SessionFlags sessionFlags = SessionSysDba);
1196
1207 static void ChangeUserPassword(const ostring& db, const ostring& user, const ostring& pwd, const ostring& newPwd);
1208
1225 static void SetHAHandler(HAHandlerProc handler);
1226
1227 private:
1228
1229 class EnvironmentHandle : core::HandleHolder<OCI_Environment*>
1230 {
1231 friend class Environment;
1232 };
1233
1234 static void HAHandler(OCI_Connection* pConnection, unsigned int source, unsigned int event, OCI_Timestamp* pTimestamp);
1235 static unsigned int TAFHandler(OCI_Connection* pConnection, unsigned int type, unsigned int event);
1236 static void NotifyHandler(OCI_Event* pEvent);
1237 static void NotifyHandlerAQ(OCI_Dequeue* pDequeue);
1238
1239 template<class T>
1240 static T GetUserCallback(AnyPointer ptr);
1241
1242 template<class T>
1243 static void SetUserCallback(AnyPointer ptr, T callback);
1244
1245 static core::Handle* GetEnvironmentHandle();
1246 static Environment* GetInstance();
1247
1248 static core::HandleStore& GetDefaultStore();
1249
1250 Environment(EnvironmentFlags mode, const ostring& libpath);
1251 ~Environment();
1252
1255 core::HandleStore _defaultStore;
1256 EnvironmentHandle _handle;
1257 EnvironmentFlags _mode;
1258 unsigned int _charMaxSize;
1259 bool _initialized;
1260 };
1261
1273 {
1274 public:
1275
1283
1292 static ThreadHandle Create();
1293
1301 static void Destroy(ThreadHandle handle);
1302
1312 static void Run(ThreadHandle handle, ThreadProc func, AnyPointer arg);
1313
1324 static void Join(ThreadHandle handle);
1325
1333 static ThreadId GetThreadId(ThreadHandle handle);
1334 };
1335
1345 class Mutex
1346 {
1347 public:
1348
1357 static MutexHandle Create();
1358
1366 static void Destroy(MutexHandle handle);
1367
1375 static void Acquire(MutexHandle handle);
1376
1384 static void Release(MutexHandle handle);
1385 };
1386
1398 {
1399 public:
1400
1408
1421 static void Create(const ostring& name, ThreadKeyFreeProc freeProc = nullptr);
1422
1431 static void SetValue(const ostring& name, AnyPointer value);
1432
1443 static AnyPointer GetValue(const ostring& name);
1444 };
1445
1453 class Pool : public core::HandleHolder<OCI_Pool*>
1454 {
1455 public:
1456
1463 {
1465 ConnectionPool = OCI_POOL_CONNECTION,
1467 SessionPool = OCI_POOL_SESSION
1469
1478
1484 Pool();
1485
1503 Pool(const ostring& db, const ostring& user, const ostring& pwd, Pool::PoolType poolType,
1504 unsigned int minSize, unsigned int maxSize, unsigned int increment = 1,
1505 Environment::SessionFlags sessionFlags = Environment::SessionDefault);
1506
1525 void Open(const ostring& db, const ostring& user, const ostring& pwd, Pool::PoolType poolType,
1526 unsigned int minSize, unsigned int maxSize, unsigned int increment = 1,
1527 Environment::SessionFlags sessionFlags = Environment::SessionDefault);
1528
1534 void Close();
1535
1564 Connection GetConnection(const ostring& sessionTag = OTEXT(""));
1565
1577 unsigned int GetTimeout() const;
1578
1592 void SetTimeout(unsigned int value);
1593
1603 bool GetNoWait() const;
1604
1620 void SetNoWait(bool value);
1621
1627 unsigned int GetBusyConnectionsCount() const;
1628
1634 unsigned int GetOpenedConnectionsCount() const;
1635
1641 unsigned int GetMinSize() const;
1642
1648 unsigned int GetMaxSize() const;
1649
1655 unsigned int GetIncrement() const;
1656
1665 unsigned int GetStatementCacheSize() const;
1666
1674 void SetStatementCacheSize(unsigned int value);
1675 };
1676
1684 class Connection : public core::HandleHolder<OCI_Connection*>
1685 {
1686 friend class Environment;
1687 friend class Exception;
1688 friend class Statement;
1689 friend class File;
1690 friend class Timestamp;
1691 friend class Pool;
1692 friend class Object;
1693 friend class TypeInfo;
1694 friend class Reference;
1695 friend class Resultset;
1696 friend class Subscription;
1697 friend class Agent;
1698 friend class Dequeue;
1699 friend class Enqueue;
1700 friend class Column;
1701 friend class Message;
1702 friend class DirectPath;
1703 friend class Vector;
1704
1705 template<class, int>
1706 friend class Lob;
1707 template<class>
1708 friend class Collection;
1709 public:
1710
1717 {
1722 TimeoutSend = OCI_NTO_SEND,
1727 TimeoutReceive = OCI_NTO_RECEIVE,
1732 TimeoutCall = OCI_NTO_CALL
1734
1743
1750 {
1752 FailoverRequestSession = OCI_FOT_SESSION,
1754 FailoverRequestSelect = OCI_FOT_SELECT
1756
1765
1772 {
1774 FailoverEventEnd = OCI_FOE_END,
1776 FailoverEventAbort = OCI_FOE_ABORT,
1778 FailoverEventReauthentificate = OCI_FOE_REAUTH,
1780 FailoverEventBegin = OCI_FOE_BEGIN,
1782 FailoverEventError = OCI_FOE_ERROR
1784
1793
1800 {
1802 FailoverOk = OCI_FOC_OK,
1804 FailoverRetry = OCI_FOC_RETRY
1806
1815
1822 {
1824 TraceIdentity = OCI_TRC_IDENTITY,
1826 TraceModule = OCI_TRC_MODULE,
1828 TraceAction = OCI_TRC_ACTION,
1830 TraceDetail = OCI_TRC_DETAIL
1832
1841
1849 typedef FailoverResult(*TAFHandlerProc) (Connection& con, FailoverRequest failoverRequest, FailoverEvent failoverEvent);
1850
1856 Connection();
1857
1871 Connection(const ostring& db, const ostring& user, const ostring& pwd, Environment::SessionFlags sessionFlags = Environment::SessionDefault);
1872
1915 void Open(const ostring& db, const ostring& user, const ostring& pwd, Environment::SessionFlags sessionFlags = Environment::SessionDefault);
1916
1922 void Close();
1923
1929 void Commit();
1930
1936 void Rollback();
1937
1946 void Break();
1947
1955 void SetAutoCommit(bool enabled);
1956
1962 bool GetAutoCommit() const;
1963
1972 bool IsServerAlive() const;
1973
1982 bool PingServer() const;
1983
1992 ostring GetConnectionString() const;
1993
2002 ostring GetUserName() const;
2003
2012 ostring GetPassword() const;
2013
2022 ostring GetServerVersion() const;
2023
2032 OracleVersion GetVersion() const;
2033
2039 unsigned int GetServerMajorVersion() const;
2040
2046 unsigned int GetServerMinorVersion() const;
2047
2053 unsigned int GetServerRevisionVersion() const;
2054
2062 void ChangePassword(const ostring& newPwd);
2063
2069 ostring GetSessionTag() const;
2070
2085 void SetSessionTag(const ostring& tag);
2086
2092 Transaction GetTransaction() const;
2093
2107 void SetTransaction(const Transaction& transaction);
2108
2140 bool SetFormat(FormatType formatType, const ostring& format);
2141
2152 ostring GetFormat(FormatType formatType);
2153
2173 void EnableServerOutput(unsigned int bufsize, unsigned int arrsize, unsigned int lnsize);
2174
2183 void DisableServerOutput();
2184
2193 bool GetServerOutput(ostring& line) const;
2194
2200 void GetServerOutput(std::vector<ostring>& lines) const;
2201
2230 void SetTrace(SessionTrace trace, const ostring& value);
2231
2242 ostring GetTrace(SessionTrace trace) const;
2243
2252 ostring GetDatabase() const;
2253
2262 ostring GetInstance() const;
2263
2272 ostring GetService() const;
2273
2282 ostring GetServer() const;
2283
2292 ostring GetDomain() const;
2293
2302 Timestamp GetInstanceStartTime() const;
2303
2315 unsigned int GetStatementCacheSize() const;
2316
2327 void SetStatementCacheSize(unsigned int value);
2328
2345 unsigned int GetDefaultLobPrefetchSize() const;
2346
2371 void SetDefaultLobPrefetchSize(unsigned int value);
2372
2387 unsigned int GetMaxCursors() const;
2388
2397 bool IsTAFCapable() const;
2398
2412 void SetTAFHandler(TAFHandlerProc handler);
2413
2419 AnyPointer GetUserData();
2420
2428 void SetUserData(AnyPointer value);
2429
2443 unsigned int GetTimeout(TimeoutType timeout);
2444
2472 void SetTimeout(TimeoutType timeout, unsigned int value);
2473
2474 private:
2475
2476 Connection(OCI_Connection* con, core::Handle* parent, bool allocated);
2477 };
2478
2486 class Transaction : public core::HandleHolder<OCI_Transaction*>
2487 {
2488 friend class Connection;
2489
2490 public:
2491
2498 {
2499 Unknown = OCI_UNKNOWN,
2501 New = OCI_TRS_NEW,
2503 Tight = OCI_TRS_TIGHT,
2505 Loose = OCI_TRS_LOOSE,
2507 ReadOnly = OCI_TRS_READONLY,
2509 ReadWrite = OCI_TRS_READWRITE,
2511 Serializable = OCI_TRS_SERIALIZABLE
2513
2522
2536 Transaction(const Connection& connection, unsigned int timeout, TransactionFlags flags, OCI_XID* pxid = nullptr);
2537
2543 void Prepare();
2544
2550 void Start();
2551
2557 void Stop();
2558
2564 void Resume();
2565
2571 void Forget();
2572
2581 TransactionFlags GetFlags() const;
2582
2588 unsigned int GetTimeout() const;
2589
2590 private:
2591
2593 };
2594
2605 class Number : public core::HandleHolder<OCI_Number*>, public core::Streamable
2606 {
2607 friend class Statement;
2608 friend class Resultset;
2609 friend class support::BindArray;
2610 friend class Object;
2611 template<class>
2612 friend class Collection;
2613
2614 public:
2615
2623 Number(bool create = false);
2624
2632 template<class T, typename core::SupportedNumeric<T>::Type::type* = nullptr>
2633 Number(const T& value);
2634
2635
2644 Number(const Number& other);
2645
2654 Number& operator= (const Number& other) noexcept;
2655
2670 Number(const otext* str, const otext* format = OTEXT(""));
2671
2686 Number(const ostring& str, const ostring& format = OTEXT(""));
2687
2702 void FromString(const ostring& str, const ostring& format = OTEXT("")) const;
2703
2714 ostring ToString(const ostring& format) const;
2715
2724 ostring ToString() const override;
2725
2731 Number Clone() const;
2732
2733 Number& operator ++ ();
2734 Number& operator -- ();
2735 Number operator ++ (int);
2736 Number operator -- (int);
2737
2738 bool operator == (const Number& other) const;
2739 bool operator != (const Number& other) const;
2740 bool operator > (const Number& other) const;
2741 bool operator < (const Number& other) const;
2742 bool operator >= (const Number& other) const;
2743 bool operator <= (const Number& other) const;
2744
2745 template<class T, typename core::SupportedNumeric<T>::Type::type* = nullptr>
2746 Number& operator = (const T& lhs);
2747
2748 template<class T, typename core::SupportedNumeric<T>::Type::type* = nullptr>
2749 operator T() const;
2750
2751 template<class T, typename core::SupportedNumeric<T>::Type::type* = nullptr>
2752 Number operator - (const T& value);
2753
2754 template<class T, typename core::SupportedNumeric<T>::Type::type* = nullptr>
2755 Number operator + (const T& value);
2756
2757 template<class T, typename core::SupportedNumeric<T>::Type::type* = nullptr>
2758 Number operator * (const T& value);
2759
2760 template<class T, typename core::SupportedNumeric<T>::Type::type* = nullptr>
2761 Number operator / (const T& value);
2762
2763 template<class T, typename core::SupportedNumeric<T>::Type::type* = nullptr>
2764 Number& operator += (const T& value);
2765
2766 template<class T, typename core::SupportedNumeric<T>::Type::type* = nullptr>
2767 Number& operator -= (const T& value);
2768
2769 template<class T, typename core::SupportedNumeric<T>::Type::type* = nullptr>
2770 Number& operator *= (const T& value);
2771
2772 template<class T, typename core::SupportedNumeric<T>::Type::type* = nullptr>
2773 Number& operator /= (const T& value);
2774
2775 private:
2776
2777 template<class T>
2778 static AnyPointer GetNativeValue(const T& value);
2779
2780 Number(OCI_Number* pNumber, core::Handle* parent = nullptr);
2781
2782 void Allocate();
2783
2784 int Compare(const Number& other) const;
2785
2786 template<class T>
2787 inline T GetValue() const;
2788
2789 template<class T>
2790 Number& SetValue(const T& value);
2791
2792 template<class T>
2793 void Add(const T& value);
2794
2795 template<class T>
2796 void Sub(const T& value);
2797
2798 template<class T>
2799 void Multiply(const T& value);
2800
2801 template<class T>
2802 void Divide(const T& value);
2803
2804 Number& operator = (OCI_Number*& lhs);
2805 };
2806
2814 class Date : public core::HandleHolder<OCI_Date*>, public core::Streamable
2815 {
2816 friend class Statement;
2817 friend class Resultset;
2818 friend class support::BindArray;
2819 friend class Object;
2820 template<class>
2821 friend class Collection;
2822 friend class Message;
2823
2824 public:
2825
2831 static Date SysDate();
2832
2840 Date(bool create = false);
2841
2850 Date(const Date& other);
2851
2860 Date& operator= (const Date& other) noexcept;
2861
2876 Date(const otext* str, const otext* format = OTEXT(""));
2877
2893 Date(const ostring& str, const ostring& format = OTEXT(""));
2894
2900 bool IsValid() const;
2901
2907 int GetYear() const;
2908
2914 void SetYear(int value);
2915
2921 int GetMonth() const;
2922
2928 void SetMonth(int value);
2929
2935 int GetDay() const;
2936
2942 void SetDay(int value);
2943
2949 int GetHours() const;
2950
2956 void SetHours(int value);
2957
2963 int GetMinutes() const;
2964
2970 void SetMinutes(int value);
2971
2977 int GetSeconds() const;
2978
2984 void SetSeconds(int value);
2985
2993 int DaysBetween(const Date& other) const;
2994
3004 void SetDate(int year, int month, int day);
3005
3015 void SetTime(int hour, int min, int sec);
3016
3029 void SetDateTime(int year, int month, int day, int hour, int min, int sec);
3030
3040 void GetDate(int& year, int& month, int& day) const;
3041
3051 void GetTime(int& hour, int& min, int& sec) const;
3052
3065 void GetDateTime(int& year, int& month, int& day, int& hour, int& min, int& sec) const;
3066
3074 void AddDays(int days);
3075
3083 void AddMonths(int months);
3084
3092 Date NextDay(const ostring& day) const;
3093
3099 Date LastDay() const;
3100
3109 void ChangeTimeZone(const ostring& tzSrc, const ostring& tzDst);
3110
3125 void FromString(const ostring& str, const ostring& format = OTEXT(""));
3126
3137 ostring ToString(const ostring& format) const;
3138
3147 ostring ToString() const override;
3148
3154 Date Clone() const;
3155
3161 Date& operator ++ ();
3162
3168 Date operator ++ (int);
3169
3175 Date& operator -- ();
3176
3182 Date operator -- (int);
3183
3189 Date operator + (int value) const;
3190
3196 Date operator - (int value) const;
3197
3203 Date& operator += (int value);
3204
3210 Date& operator -= (int value);
3211
3217 bool operator == (const Date& other) const;
3218
3224 bool operator != (const Date& other) const;
3225
3231 bool operator > (const Date& other) const;
3232
3238 bool operator < (const Date& other) const;
3239
3245 bool operator >= (const Date& other) const;
3246
3252 bool operator <= (const Date& other) const;
3253
3254 private:
3255
3256 int Compare(const Date& other) const;
3257
3258 Date(OCI_Date* pDate, core::Handle* parent = nullptr);
3259
3260 void Allocate();
3261 };
3262
3270 class Interval : public core::HandleHolder<OCI_Interval*>, public core::Streamable
3271 {
3272 friend class Environment;
3273 friend class Statement;
3274 friend class Resultset;
3275 friend class support::BindArray;
3276 friend class Object;
3277 template<class>
3278 friend class Collection;
3279
3280 public:
3281
3288 {
3290 YearMonth = OCI_INTERVAL_YM,
3292 DaySecond = OCI_INTERVAL_DS
3294
3303
3309 Interval();
3310
3318 Interval(IntervalType type);
3319
3328 Interval(const Interval& other);
3329
3338 Interval& operator= (const Interval& other) noexcept;
3339
3351 Interval(IntervalType type, const ostring& data);
3352
3358 IntervalType GetType() const;
3359
3365 bool IsValid() const;
3366
3375 int GetYear() const;
3376
3385 void SetYear(int value);
3386
3395 int GetMonth() const;
3396
3405 void SetMonth(int value);
3406
3415 int GetDay() const;
3416
3425 void SetDay(int value);
3426
3435 int GetHours() const;
3436
3445 void SetHours(int value);
3446
3455 int GetMinutes() const;
3456
3465 void SetMinutes(int value);
3466
3475 int GetSeconds() const;
3476
3485 void SetSeconds(int value);
3486
3492 int GetMilliSeconds() const;
3493
3499 void SetMilliSeconds(int value);
3500
3506 int GetNanoSeconds() const;
3507
3513 void SetNanoSeconds(int value);
3514
3529 void GetDaySecond(int& day, int& hour, int& min, int& sec, int& nsec) const;
3530
3545 void SetDaySecond(int day, int hour, int min, int sec, int nsec);
3546
3558 void GetYearMonth(int& year, int& month) const;
3559
3571 void SetYearMonth(int year, int month);
3572
3580 void UpdateTimeZone(const ostring& timeZone);
3581
3592 void FromString(const ostring& data);
3593
3602 ostring ToString(int leadingPrecision, int fractionPrecision) const;
3603
3609 ostring ToString() const override;
3610
3616 Interval Clone() const;
3617
3623 Interval operator + (const Interval& other) const;
3624
3630 Interval operator - (const Interval& other) const;
3631
3637 Interval& operator += (const Interval& other);
3638
3644 Interval& operator -= (const Interval& other);
3645
3651 bool operator == (const Interval& other) const;
3652
3658 bool operator != (const Interval& other) const;
3659
3665 bool operator > (const Interval& other) const;
3666
3672 bool operator < (const Interval& other) const;
3673
3679 bool operator >= (const Interval& other) const;
3680
3686 bool operator <= (const Interval& other) const;
3687
3688 private:
3689
3690 int Compare(const Interval& other) const;
3691
3692 void Allocate(IntervalType type);
3693
3694 Interval(OCI_Interval* pInterval, core::Handle* parent = nullptr);
3695 };
3696
3705 class Timestamp : public core::HandleHolder<OCI_Timestamp*>, public core::Streamable
3706 {
3707 friend class Environment;
3708 friend class Statement;
3709 friend class Resultset;
3710 friend class support::BindArray;
3711 friend class Object;
3712 friend class Connection;
3713 template<class>
3714 friend class Collection;
3715
3716 public:
3717
3724 {
3726 NoTimeZone = OCI_TIMESTAMP,
3728 WithTimeZone = OCI_TIMESTAMP_TZ,
3730 WithLocalTimeZone = OCI_TIMESTAMP_LTZ
3732
3741
3749 static Timestamp SysTimestamp(TimestampType type = NoTimeZone);
3750
3756 Timestamp();
3757
3766 Timestamp(const Timestamp& other);
3767
3776 Timestamp& operator= (const Timestamp& other) noexcept;
3777
3786
3799 Timestamp(TimestampType type, const ostring& data, const ostring& format = OTEXT(""));
3800
3806 TimestampType GetType() const;
3807
3815 void Convert(const Timestamp& other);
3816
3822 bool IsValid() const;
3823
3829 int GetYear() const;
3830
3836 void SetYear(int value);
3837
3843 int GetMonth() const;
3844
3850 void SetMonth(int value);
3851
3857 int GetDay() const;
3858
3864 void SetDay(int value);
3865
3871 int GetHours() const;
3872
3878 void SetHours(int value);
3879
3885 int GetMinutes() const;
3886
3892 void SetMinutes(int value);
3893
3899 int GetSeconds() const;
3900
3906 void SetSeconds(int value);
3907
3913 int GetMilliSeconds() const;
3914
3920 void SetMilliSeconds(int value);
3921
3931 void GetDate(int& year, int& month, int& day) const;
3932
3943 void GetTime(int& hour, int& min, int& sec, int& fsec) const;
3944
3954 void SetDate(int year, int month, int day);
3955
3966 void SetTime(int hour, int min, int sec, int fsec);
3967
3981 void GetDateTime(int& year, int& month, int& day, int& hour, int& min, int& sec, int& fsec) const;
3982
3997 void SetDateTime(int year, int month, int day, int hour, int min, int sec, int fsec, const ostring& timeZone = OTEXT(""));
3998
4007 ostring GetTimeZone() const;
4008
4018 void SetTimeZone(const ostring& timeZone);
4019
4028 void GetTimeZoneOffset(int& hour, int& min) const;
4029
4042 static void Substract(const Timestamp& lsh, const Timestamp& rsh, Interval& result);
4043
4055 void FromString(const ostring& data, const ostring& format = OCI_STRING_FORMAT_DATE);
4056
4068 ostring ToString(const ostring& format, int precision) const;
4069
4075 ostring ToString() const override;
4076
4082 Timestamp Clone() const;
4083
4089 Timestamp& operator ++ ();
4090
4096 Timestamp operator ++ (int);
4097
4103 Timestamp& operator -- ();
4104
4110 Timestamp operator -- (int);
4111
4117 Timestamp operator + (int value) const;
4118
4124 Timestamp operator - (int value) const;
4125
4131 Interval operator - (const Timestamp& other);
4132
4138 Timestamp& operator += (int value);
4139
4145 Timestamp& operator -= (int value);
4146
4152 Timestamp operator + (const Interval& other) const;
4153
4159 Timestamp operator - (const Interval& other) const;
4160
4166 Timestamp& operator += (const Interval& other);
4167
4173 Timestamp& operator -= (const Interval& other);
4174
4180 bool operator == (const Timestamp& other) const;
4181
4187 bool operator != (const Timestamp& other) const;
4188
4194 bool operator > (const Timestamp& other) const;
4195
4201 bool operator < (const Timestamp& other) const;
4202
4208 bool operator >= (const Timestamp& other) const;
4209
4215 bool operator <= (const Timestamp& other) const;
4216
4217 private:
4218
4219 int Compare(const Timestamp& other) const;
4220
4221 void Allocate(TimestampType type);
4222
4223 Timestamp(OCI_Timestamp* pTimestamp, core::Handle* parent = nullptr);
4224 };
4225
4233 template<class T, int U>
4234 class Lob : public core::HandleHolder<OCI_Lob*>
4235 {
4236 friend class Statement;
4237 friend class Resultset;
4238 friend class support::BindArray;
4239 friend class Object;
4240 template<class>
4241 friend class Collection;
4242
4243 public:
4244
4250 Lob();
4251
4262 Lob(const Connection& connection);
4263
4274 T Read(unsigned int length);
4275
4286 unsigned int Write(const T& content);
4287
4298 unsigned int Append(const T& content);
4299
4307 void Append(const Lob& other);
4308
4323 bool Seek(SeekMode seekMode, big_uint offset);
4324
4330 LobType GetType() const;
4331
4337 big_uint GetOffset() const;
4338
4344 big_uint GetLength() const;
4345
4351 big_uint GetMaxSize() const;
4352
4364 big_uint GetChunkSize() const;
4365
4371 Connection GetConnection() const;
4372
4380 void Truncate(big_uint length);
4381
4397 big_uint Erase(big_uint offset, big_uint length);
4398
4412 void Copy(Lob& dest, big_uint offset, big_uint offsetDest, big_uint length) const;
4413
4419 bool IsTemporary() const;
4420
4426 bool IsRemote() const;
4427
4440 void Open(OpenMode mode);
4441
4447 void Flush();
4448
4457 void Close();
4458
4477 void EnableBuffering(bool value);
4478
4484 Lob Clone() const;
4485
4491 Lob& operator += (const Lob& other);
4492
4498 bool operator == (const Lob& other) const;
4499
4505 bool operator != (const Lob& other) const;
4506
4507 private:
4508
4509 bool Equals(const Lob& other) const;
4510
4511 Lob(OCI_Lob* pLob, core::Handle* parent = nullptr);
4512
4513 };
4514
4525
4536
4547
4556 class File : public core::HandleHolder<OCI_File*>
4557 {
4558 friend class Statement;
4559 friend class Resultset;
4560 friend class support::BindArray;
4561 friend class Object;
4562 template<class>
4563 friend class Collection;
4564
4565 public:
4566
4572 File();
4573
4584 File(const Connection& connection);
4585
4600 File(const Connection& connection, const ostring& directory, const ostring& name);
4601
4612 Raw Read(unsigned int size);
4613
4628 bool Seek(SeekMode seekMode, big_uint offset);
4629
4638 bool Exists() const;
4639
4645 big_uint GetOffset() const;
4646
4652 big_uint GetLength() const;
4653
4659 Connection GetConnection() const;
4660
4673 void SetInfos(const ostring& directory, const ostring& name);
4674
4680 ostring GetName() const;
4681
4687 ostring GetDirectory() const;
4688
4694 void Open();
4695
4701 void Close();
4702
4708 bool IsOpened() const;
4709
4715 File Clone() const;
4716
4722 bool operator == (const File& other) const;
4723
4729 bool operator != (const File& other) const;
4730
4731 private:
4732
4733 bool Equals(const File& other) const;
4734
4735 File(OCI_File* pFile, core::Handle* parent = nullptr);
4736 };
4737
4745 class TypeInfo : public core::HandleHolder<OCI_TypeInfo*>
4746 {
4747 friend class Object;
4748 friend class Reference;
4749 template<class>
4750 friend class Collection;
4751 friend class Column;
4752 public:
4753
4760 {
4762 Table = OCI_TIF_TABLE,
4764 View = OCI_TIF_VIEW,
4766 Type = OCI_TIF_TYPE
4768
4777
4790 TypeInfo(const Connection& connection, const ostring& name, TypeInfoType type);
4791
4797 TypeInfoType GetType() const;
4798
4804 ostring GetName() const;
4805
4811 Connection GetConnection() const;
4812
4822 unsigned int GetColumnCount() const;
4823
4838 Column GetColumn(unsigned int index) const;
4839
4852 boolean IsFinalType() const;
4853
4868 TypeInfo GetSuperType() const;
4869
4870 private:
4871
4872 TypeInfo(OCI_TypeInfo* pTypeInfo, core::Handle* parent);
4873 };
4874
4882 class Object : public core::HandleHolder<OCI_Object*>, public core::Streamable
4883 {
4884 friend class Statement;
4885 friend class Resultset;
4886 friend class support::BindArray;
4887 friend class Reference;
4888 template<class>
4889 friend class Collection;
4890 friend class Message;
4891
4892 public:
4893
4900 {
4902 Persistent = OCI_OBJ_PERSISTENT,
4904 Transient = OCI_OBJ_TRANSIENT,
4906 Value = OCI_OBJ_VALUE
4908
4917
4923 Object();
4924
4932 Object(const TypeInfo& typeInfo);
4933
4941 bool IsAttributeNull(const ostring& name) const;
4942
4950 void SetAttributeNull(const ostring& name);
4951
4957 TypeInfo GetTypeInfo() const;
4958
4964 Reference GetReference() const;
4965
4971 ObjectType GetType() const;
4972
4985 template<class T>
4986 T Get(const ostring& name) const;
4987
5001 template<class T>
5002 void Get(const ostring& name, T& value) const;
5003
5017 template<class T>
5018 void Get(const ostring& name, Collection<T>& value) const;
5019
5033 template<class T>
5034 void Set(const ostring& name, const T& value);
5035
5041 Object Clone() const;
5042
5048 ostring ToString() const override;
5049
5050 private:
5051
5052 Object(OCI_Object* pObject, core::Handle* parent = nullptr);
5053 };
5054
5062 class Reference : public core::HandleHolder<OCI_Ref*>, public core::Streamable
5063 {
5064 friend class Statement;
5065 friend class Resultset;
5066 friend class support::BindArray;
5067 friend class Object;
5068 template<class>
5069 friend class Collection;
5070
5071 public:
5072
5078 Reference();
5079
5087 Reference(const TypeInfo& typeInfo);
5088
5094 TypeInfo GetTypeInfo() const;
5095
5104 Object GetObject() const;
5105
5111 bool IsReferenceNull() const;
5112
5121 void SetReferenceNull();
5122
5128 Reference Clone() const;
5129
5135 ostring ToString() const override;
5136
5137 private:
5138
5139 Reference(OCI_Ref* pRef, core::Handle* parent = nullptr);
5140 };
5141
5149 class XmlType : public core::HandleHolder<OCI_XmlType*>, public core::Streamable
5150 {
5151 friend class Resultset;
5152
5153 public:
5154
5160 ostring ToString() const override;
5161
5162 private:
5163
5164 XmlType(OCI_XmlType* pXmlType, core::Handle* parent = nullptr);
5165 };
5166
5174 class Vector : public core::HandleHolder<OCI_Vector*>, public core::Streamable
5175 {
5176 friend class Resultset;
5177
5178 public:
5179
5186 {
5188 Flex = OCI_VEC_FLEX,
5190 Int8 = OCI_VEC_INT8,
5192 Float32 = OCI_VEC_FLOAT32,
5194 Float64 = OCI_VEC_FLOAT64,
5196 Binary = OCI_VEC_BINARY
5198
5207
5213 Vector();
5214
5225 Vector(const Connection& connection);
5226
5235 template<class T, typename core::SupportedVectorNumeric<T>::Type::type* = nullptr>
5236 void Set(T* values, unsigned int size);
5237
5256 template<class T, typename core::SupportedVectorNumeric<T>::Type::type* = nullptr>
5257 void Get(T* values);
5258
5266 template<class T, typename core::SupportedVectorNumeric<T>::Type::type* = nullptr>
5267 void Set(const std::vector<T>& values);
5268
5281 template<class T, typename core::SupportedVectorNumeric<T>::Type::type* = nullptr>
5282 std::vector<T> Get();
5283
5289 unsigned int GetDimensionCount();
5290
5296 VectorFormat GetFormat();
5297
5308 void FromString(const ostring& str, VectorFormat format, unsigned int dimensions);
5309
5315 ostring ToString() const override;
5316
5317 private:
5318
5319 Vector(OCI_Vector* pVector, core::Handle* parent = nullptr);
5320 };
5321
5330 template<class T>
5332 {
5333 template<class>
5334 friend class CollectionIterator;
5335
5336 public:
5337
5338 typedef T ValueType;
5340
5342 CollectionElement(CollectionType* coll, unsigned int pos);
5343 operator T() const;
5344 CollectionElement& operator = (const ValueType& other);
5345 CollectionElement& operator = (const CollectionElement& other);
5346 bool IsNull() const;
5347 void SetNull();
5348
5349 private:
5350
5351 CollectionType* _coll;
5352 unsigned int _pos;
5353 };
5354
5362 template<class T>
5364 {
5365 public:
5366
5367 template<class>
5368 friend class Collection;
5369
5370 typedef typename T::ValueType value_type;
5372
5373 typedef std::random_access_iterator_tag iterator_category;
5374 typedef ptrdiff_t difference_type;
5375 typedef ptrdiff_t distance_type;
5376 typedef value_type* pointer;
5377 typedef value_type& reference;
5378
5381
5382 CollectionIterator& operator = (const CollectionIterator& other);
5383
5384 CollectionIterator& operator += (difference_type value);
5385 CollectionIterator& operator -= (difference_type value);
5386
5387 T& operator*();
5388 T* operator->();
5389
5390 CollectionIterator& operator++();
5391 CollectionIterator& operator--();
5392
5393 CollectionIterator operator++(int);
5394 CollectionIterator operator--(int);
5395
5396 CollectionIterator operator + (difference_type value);
5397 CollectionIterator operator - (difference_type value);
5398
5399 difference_type operator - (const CollectionIterator& other);
5400
5401 bool operator == (const CollectionIterator& other);
5402 bool operator != (const CollectionIterator& other);
5403 bool operator > (const CollectionIterator& other);
5404 bool operator < (const CollectionIterator& other);
5405 bool operator >= (const CollectionIterator& other);
5406 bool operator <= (const CollectionIterator& other);
5407
5408 protected:
5409
5410 CollectionIterator(CollectionType* collection, unsigned int pos);
5411
5412 T _elem;
5413 };
5414
5422 template<class T>
5423 class Collection : public core::HandleHolder<OCI_Coll*>, public core::Streamable
5424 {
5425 friend class Statement;
5426 friend class Resultset;
5427 friend class support::BindArray;
5428 friend class Object;
5429 template<class>
5430 friend class CollectionIterator;
5431 template<class>
5432 friend class Collection;
5433
5434 public:
5435
5442 {
5444 Varray = OCI_COLL_VARRAY,
5446 NestedTable = OCI_COLL_NESTED_TABLE,
5448 IndexedTable = OCI_COLL_INDEXED_TABLE
5450
5459
5465 Collection();
5466
5474 Collection(const TypeInfo& typeInfo);
5475
5481 CollectionType GetType() const;
5482
5488 unsigned int GetMax() const;
5489
5495 unsigned int GetSize() const;
5496
5507 unsigned int GetCount() const;
5508
5516 void Truncate(unsigned int size);
5517
5524 void Clear();
5525
5536 bool IsElementNull(unsigned int index) const;
5537
5548 void SetElementNull(unsigned int index);
5549
5567 bool Delete(unsigned int index) const;
5568
5576 T Get(unsigned int index) const;
5577
5586 void Set(unsigned int index, const T& value);
5587
5596 void Append(const T& value);
5597
5603 TypeInfo GetTypeInfo() const;
5604
5610 Collection Clone() const;
5611
5617 ostring ToString() const override;
5618
5625
5632
5638 iterator begin();
5639
5645 const_iterator begin() const;
5646
5652 iterator end();
5653
5659 const_iterator end() const;
5660
5666 CollectionElement<T> operator [] (unsigned int index);
5667
5673 CollectionElement<T> operator [](unsigned int index) const;
5674
5675 private:
5676
5677 static T GetElem(OCI_Elem* elem, core::Handle* parent);
5678
5679 static void SetElem(OCI_Elem* elem, const T& value);
5680
5681 Collection(OCI_Coll* pColl, core::Handle* parent = nullptr);
5682 };
5683
5691 template<class T, int U>
5692 class Long : public core::HandleHolder<OCI_Long*>
5693 {
5694 friend class Statement;
5695 friend class Resultset;
5696 friend class support::BindArray;
5697
5698 public:
5699
5705 Long();
5706
5714 Long(const Statement& statement);
5715
5726 unsigned int Write(const T& content);
5727
5733 unsigned int GetLength() const;
5734
5740 T GetContent() const;
5741
5742 private:
5743
5744 Long(OCI_Long* pLong, core::Handle* parent = nullptr);
5745 };
5746
5757
5768
5776 class BindInfo : public core::HandleHolder<OCI_Bind*>
5777 {
5778 friend class Statement;
5779
5780 public:
5781
5788 {
5790 In = OCI_BDM_IN,
5792 Out = OCI_BDM_OUT,
5794 InOut = OCI_BDM_IN_OUT
5796
5805
5812 {
5814 AsArray = 1,
5816 AsPlSqlTable = 2
5818
5827
5833 ostring GetName() const;
5834
5840 DataType GetType() const;
5841
5861 unsigned int GetSubType() const;
5862
5872 unsigned int GetDataCount() const;
5873
5879 Statement GetStatement() const;
5880
5901 void SetDataNull(bool value, unsigned int index = 1);
5902
5917 bool IsDataNull(unsigned int index = 1) const;
5918
5932 void SetCharsetForm(CharsetForm value);
5933
5939 BindDirection GetDirection() const;
5940
5941 private:
5942
5943 BindInfo(OCI_Bind* pBind, core::Handle* parent);
5944 };
5945
5953 class Statement : public core::HandleHolder<OCI_Statement*>
5954 {
5955 friend class Exception;
5956 friend class Resultset;
5957 template<class, int>
5958 friend class Long;
5959 friend class BindInfo;
5960 friend class BindObject;
5961
5962 public:
5963
5970 {
5972 TypeSelect = OCI_CST_SELECT,
5974 TypeUpdate = OCI_CST_UPDATE,
5976 TypeDelete = OCI_CST_DELETE,
5978 TypeInsert = OCI_CST_INSERT,
5980 TypeCreate = OCI_CST_CREATE,
5982 TypeDrop = OCI_CST_DROP,
5984 TypeAlter = OCI_CST_ALTER,
5986 TypeBegin = OCI_CST_BEGIN,
5988 TypeDeclare = OCI_CST_DECLARE,
5990 TypeCall = OCI_CST_CALL,
5992 TypeMerge = OCI_CST_MERGE
5994
6003
6010 {
6012 FetchForward = OCI_SFM_DEFAULT,
6014 FetchScrollable = OCI_SFM_SCROLLABLE
6016
6025
6032 {
6034 BindByPosition = OCI_BIND_BY_POS,
6036 BindByName = OCI_BIND_BY_NAME
6038
6047
6054 {
6056 LongExplicit = OCI_LONG_EXPLICIT,
6058 LongImplicit = OCI_LONG_IMPLICIT
6060
6069
6075 Statement();
6076
6087 Statement(const Connection& connection);
6088
6094 Connection GetConnection() const;
6095
6122 void Describe(const ostring& sql);
6123
6147 void Parse(const ostring& sql);
6148
6159 void Prepare(const ostring& sql);
6160
6166 void ExecutePrepared();
6167
6175 void Execute(const ostring& sql);
6176
6194 template<class T>
6195 unsigned int ExecutePrepared(T callback);
6196
6217 template<class T, class U>
6218 unsigned int ExecutePrepared(T callback, U adapter);
6219
6238 template<class T>
6239 unsigned int Execute(const ostring& sql, T callback);
6240
6262 template<class T, class U>
6263 unsigned int Execute(const ostring& sql, T callback, U adapter);
6264
6279 unsigned int GetAffectedRows() const;
6280
6286 ostring GetSql() const;
6287
6293 ostring GetSqlIdentifier() const;
6294
6306 Resultset GetResultset();
6307
6329 Resultset GetNextResultset();
6330
6355 void SetBindArraySize(unsigned int size);
6356
6362 unsigned int GetBindArraySize() const;
6363
6379 void AllowRebinding(bool value);
6380
6389 bool IsRebindingAllowed() const;
6390
6407 unsigned int GetBindIndex(const ostring& name) const;
6408
6414 unsigned int GetBindCount() const;
6415
6430 BindInfo GetBind(unsigned int index) const;
6431
6442 BindInfo GetBind(const ostring& name) const;
6443
6463 template<class T>
6464 void Bind(const ostring& name, T& value, BindInfo::BindDirection mode);
6465
6487 template<class T, class U>
6488 void Bind(const ostring& name, T& value, U extraInfo, BindInfo::BindDirection mode);
6489
6501 template<class T>
6502 void Bind(const ostring& name, Collection<T>& value, BindInfo::BindDirection mode);
6503
6524 template<class T>
6525 void Bind(const ostring& name, std::vector<T>& values, BindInfo::BindDirection mode, BindInfo::VectorType type = BindInfo::AsArray);
6526
6547 template<class T>
6548 void Bind(const ostring& name, std::vector<T>& values, TypeInfo& typeInfo, BindInfo::BindDirection mode, BindInfo::VectorType type = BindInfo::AsArray);
6549
6563 template<class T>
6564 void Bind(const ostring& name, std::vector<Collection<T> >& values, TypeInfo& typeInfo, BindInfo::BindDirection mode, BindInfo::VectorType type = BindInfo::AsArray);
6565
6589 template<class T, class U>
6590 void Bind(const ostring& name, std::vector<T>& values, U extraInfo, BindInfo::BindDirection mode, BindInfo::VectorType type = BindInfo::AsArray);
6591
6612 template<class T>
6613 void Register(const ostring& name);
6614
6632 template<class T, class U>
6633 void Register(const ostring& name, U& extraInfo);
6634
6653 template<class T, class U>
6654 void Register(const ostring& name, U extraInfo);
6655
6661 StatementType GetStatementType() const;
6662
6672 unsigned int GetSqlErrorPos() const;
6673
6684 void SetFetchMode(FetchMode value);
6685
6694 FetchMode GetFetchMode() const;
6695
6703 void SetBindMode(BindMode value);
6704
6713 BindMode GetBindMode() const;
6714
6722 void SetFetchSize(unsigned int value);
6723
6732 unsigned int GetFetchSize() const;
6733
6744 void SetPrefetchSize(unsigned int value);
6745
6754 unsigned int GetPrefetchSize() const;
6755
6774 void SetPrefetchMemory(unsigned int value);
6775
6784 unsigned int GetPrefetchMemory() const;
6785
6793 void SetPieceSize(unsigned int value);
6794
6803 unsigned int GetPieceSize() const;
6804
6815 void SetLongMode(LongMode value);
6816
6822 LongMode GetLongMode() const;
6823
6836 unsigned int GetSQLCommand() const;
6837
6850 ostring GetSQLVerb() const;
6851
6868 std::vector<ostring> GetParseBindNames() const;
6869
6875 void GetBatchErrors(std::vector<Exception>& exceptions);
6876
6877 private:
6878
6879 static bool IsResultsetHandle(core::Handle* handle);
6880 static void OnFreeSmartHandle(SmartHandle* smartHandle);
6881
6882 Statement(OCI_Statement* stmt, core::Handle* parent = nullptr);
6883
6884 support::BindsHolder* GetBindsHolder(bool create) const;
6885
6886 void ReleaseResultsets() const;
6887
6888 void SetLastBindMode(BindInfo::BindDirection mode);
6889
6890 void SetInData() const;
6891 void SetOutData() const;
6892 void ClearBinds() const;
6893
6894 template<typename M, class T>
6895 void Bind1(M& method, const ostring& name, T& value, BindInfo::BindDirection mode);
6896
6897 template<typename M, class T>
6898 void Bind2(M& method, const ostring& name, T& value, BindInfo::BindDirection mode);
6899
6900 template<typename M, class T>
6901 void BindVector1(M& method, const ostring& name, std::vector<T>& values, BindInfo::BindDirection mode, BindInfo::VectorType type);
6902
6903 template<typename M, class T, class U>
6904 void BindVector2(M& method, const ostring& name, std::vector<T>& values, BindInfo::BindDirection mode, U subType, BindInfo::VectorType type);
6905
6906 template<typename T>
6907 unsigned int Fetch(T callback);
6908
6909 template<typename T, typename U>
6910 unsigned int Fetch(T callback, U adapter);
6911 };
6912
6920 class Resultset : public core::HandleHolder<OCI_Resultset*>
6921 {
6922 friend class Statement;
6923 public:
6924
6931 {
6933 SeekAbsolute = OCI_SFD_ABSOLUTE,
6935 SeekRelative = OCI_SFD_RELATIVE
6937
6946
6959 template<class T>
6960 T Get(unsigned int index) const;
6961
6975 template<class T>
6976 void Get(unsigned int index, T& value) const;
6977
6990 template<class T>
6991 T Get(const ostring& name) const;
6992
7003 template<class T>
7004 void Get(const ostring& name, T& value) const;
7005
7020 template<class T, class U>
7021 bool Get(T& value, U adapter) const;
7022
7038 template<typename T>
7039 unsigned int ForEach(T callback);
7040
7063 template<typename T, typename U>
7064 unsigned int ForEach(T callback, U adapter);
7065
7079 bool Next();
7080
7094 bool Prev();
7095
7107 bool First();
7108
7120 bool Last();
7121
7142 bool Seek(SeekMode mode, int offset);
7143
7149 unsigned int GetCount() const;
7150
7161 unsigned int GetCurrentRow() const;
7162
7176 unsigned int GetColumnIndex(const ostring& name) const;
7177
7183 unsigned int GetColumnCount() const;
7184
7195 Column GetColumn(unsigned int index) const;
7196
7207 Column GetColumn(const ostring& name) const;
7208
7219 bool IsColumnNull(unsigned int index) const;
7220
7228 bool IsColumnNull(const ostring& name) const;
7229
7235 Statement GetStatement() const;
7236
7242 bool operator ++ (int);
7243
7249 bool operator -- (int);
7250
7257 bool operator += (int offset);
7258
7265 bool operator -= (int offset);
7266
7267 private:
7268
7269 Resultset(OCI_Resultset* resultset, core::Handle* parent);
7270 };
7271
7279 class Column : public core::HandleHolder<OCI_Column*>
7280 {
7281 friend class TypeInfo;
7282 friend class Resultset;
7283
7284 public:
7285
7292 {
7294 NoFlags = OCI_CPF_NONE,
7297 IsIdentity = OCI_CPF_IS_IDENTITY,
7301 IsGeneratedAlways = OCI_CPF_IS_GEN_ALWAYS,
7304 IsGeneratedByDefaultOnNull = OCI_CPF_IS_GEN_BY_DEFAULT_ON_NULL,
7306 IsLogicalPartitioning = OCI_CPF_IS_LPART,
7308 IsGeneratedByContainers = OCI_CPF_IS_CONID
7310
7319
7325 ostring GetName() const;
7326
7335 ostring GetSQLType() const;
7336
7346 ostring GetFullSQLType() const;
7347
7353 DataType GetType() const;
7354
7372 unsigned int GetSubType() const;
7373
7379 CharsetForm GetCharsetForm() const;
7380
7386 CollationID GetCollationID() const;
7387
7397 unsigned int GetSize() const;
7398
7404 int GetScale() const;
7405
7411 int GetPrecision() const;
7412
7418 int GetFractionalPrecision() const;
7419
7425 int GetLeadingPrecision() const;
7426
7427
7433 int GetDimension() const;
7434
7445 PropertyFlags GetPropertyFlags() const;
7446
7452 bool IsNullable() const;
7453
7463 bool IsCharSemanticUsed() const;
7464
7474 TypeInfo GetTypeInfo() const;
7475
7476 private:
7477
7478 Column(OCI_Column* pColumn, core::Handle* parent);
7479 };
7480
7491 class Subscription : public core::HandleHolder<OCI_Subscription*>
7492 {
7493 friend class Event;
7494
7495 public:
7496
7504 typedef void (*NotifyHandlerProc) (Event& evt);
7505
7512 {
7514 ObjectChanges = OCI_CNT_OBJECTS,
7516 RowChanges = OCI_CNT_ROWS,
7518 DatabaseChanges = OCI_CNT_DATABASES,
7520 AllChanges = OCI_CNT_ALL
7522
7531
7537 Subscription();
7538
7554 void Register(const Connection& connection, const ostring& name, ChangeTypes changeTypes, NotifyHandlerProc handler, unsigned int port = 0, unsigned int timeout = 0);
7555
7570 void Unregister();
7571
7577 void Watch(const ostring& sql);
7578
7584 ostring GetName() const;
7585
7591 unsigned int GetTimeout() const;
7592
7598 unsigned int GetPort() const;
7599
7608 Connection GetConnection() const;
7609
7610 private:
7611
7612 Subscription(OCI_Subscription* pSubscription);
7613 };
7614
7625 class Event : public core::HandleHolder<OCI_Event*>
7626 {
7627 friend class Subscription;
7628 friend class Environment;
7629
7630 public:
7631
7638 {
7640 DatabaseStart = OCI_ENT_STARTUP,
7642 DatabaseShutdown = OCI_ENT_SHUTDOWN,
7644 DatabaseShutdownAny = OCI_ENT_SHUTDOWN_ANY,
7646 DatabaseDrop = OCI_ENT_DROP_DATABASE,
7648 Unregister = OCI_ENT_DEREGISTER,
7650 ObjectChanged = OCI_ENT_OBJECT_CHANGED
7652
7661
7668 {
7670 ObjectInserted = OCI_ONT_INSERT,
7672 ObjectUpdated = OCI_ONT_UPDATE,
7674 ObjectDeleted = OCI_ONT_DELETE,
7676 ObjectAltered = OCI_ONT_ALTER,
7678 ObjectDropped = OCI_ONT_DROP,
7680 ObjectGeneric = OCI_ONT_GENERIC
7682
7691
7697 EventType GetType() const;
7698
7707 ObjectEvent GetObjectEvent() const;
7708
7714 ostring GetDatabaseName() const;
7715
7724 ostring GetObjectName() const;
7725
7731 ostring GetRowID() const;
7732
7738 Subscription GetSubscription() const;
7739
7740 private:
7741
7742 Event(OCI_Event* pEvent);
7743 };
7744
7752 class Agent : public core::HandleHolder<OCI_Agent*>
7753 {
7754 friend class Message;
7755 friend class Dequeue;
7756
7757 public:
7758
7781 Agent(const Connection& connection, const ostring& name = OTEXT(""), const ostring& address = OTEXT(""));
7782
7788 ostring GetName() const;
7789
7803 void SetName(const ostring& value);
7804
7813 ostring GetAddress() const;
7814
7828 void SetAddress(const ostring& value);
7829
7830 private:
7831
7832 Agent(OCI_Agent* pAgent, core::Handle* parent);
7833 };
7834
7842 class Message : public core::HandleHolder<OCI_Msg*>
7843 {
7844 friend class Dequeue;
7845
7846 public:
7847
7854 {
7856 Ready = OCI_AMS_READY,
7858 Waiting = OCI_AMS_WAITING,
7860 Processed = OCI_AMS_PROCESSED,
7862 Expired = OCI_AMS_EXPIRED
7864
7873
7903 Message(const TypeInfo& typeInfo);
7904
7913 void Reset();
7914
7920 template<class T>
7922
7930 template<class T>
7931 void SetPayload(const T& value);
7932
7941 Date GetEnqueueTime() const;
7942
7948 int GetAttemptCount() const;
7949
7955 MessageState GetState() const;
7956
7967 Raw GetID() const;
7968
7977 int GetExpiration() const;
7978
7998 void SetExpiration(int value);
7999
8008 int GetEnqueueDelay() const;
8009
8032 void SetEnqueueDelay(int value);
8033
8042 int GetPriority() const;
8043
8056 void SetPriority(int value);
8057
8067 Raw GetOriginalID() const;
8068
8080 void SetOriginalID(const Raw& value);
8081
8090 ostring GetCorrelation() const;
8091
8102 void SetCorrelation(const ostring& value);
8103
8117 ostring GetExceptionQueue() const;
8118
8145 void SetExceptionQueue(const ostring& value);
8146
8155 Agent GetSender() const;
8156
8164 void SetSender(const Agent& agent);
8165
8177 void SetConsumers(std::vector<Agent>& agents);
8178
8179 private:
8180
8181 Message(OCI_Msg* pMessage, core::Handle* parent);
8182 };
8183
8191 class Enqueue : public core::HandleHolder<OCI_Enqueue*>
8192 {
8193 public:
8194
8201 {
8203 Before = OCI_ASD_BEFORE,
8205 OnTop = OCI_ASD_TOP
8207
8216
8223 {
8225 Immediate = OCI_AMV_IMMEDIATE,
8227 OnCommit = OCI_AMV_ON_COMMIT
8229
8238
8260 Enqueue(const TypeInfo& typeInfo, const ostring& queueName);
8261
8269 void Put(const Message& message);
8270
8279 EnqueueVisibility GetVisibility() const;
8280
8291 void SetVisibility(EnqueueVisibility value);
8292
8301 EnqueueMode GetMode() const;
8302
8321 void SetMode(EnqueueMode value);
8322
8333 Raw GetRelativeMsgID() const;
8334
8348 void SetRelativeMsgID(const Raw& value);
8349 };
8350
8358 class Dequeue : public core::HandleHolder<OCI_Dequeue*>
8359 {
8360 friend class Environment;
8361
8362 public:
8363
8371 typedef void (*NotifyAQHandlerProc) (Dequeue& dequeue);
8372
8379 {
8381 Browse = OCI_ADM_BROWSE,
8383 Locked = OCI_ADM_LOCKED,
8385 Remove = OCI_ADM_REMOVE,
8387 Confirm = OCI_ADM_REMOVE_NODATA
8389
8398
8405 {
8407 Immediate = OCI_AMV_IMMEDIATE,
8409 OnCommit = OCI_AMV_ON_COMMIT
8411
8420
8427 {
8429 FirstMessage = OCI_ADN_FIRST_MSG,
8431 NextMessage = OCI_ADN_NEXT_MSG,
8434 NextTransaction = OCI_ADN_NEXT_TRANSACTION
8436
8445
8454 Dequeue(const TypeInfo& typeInfo, const ostring& queueName);
8455
8469 Message Get();
8470
8486 Agent Listen(int timeout);
8487
8496 ostring GetConsumer() const;
8497
8509 void SetConsumer(const ostring& value);
8510
8519 ostring GetCorrelation() const;
8520
8532 void SetCorrelation(const ostring& value);
8533
8542 Raw GetRelativeMsgID() const;
8543
8551 void SetRelativeMsgID(const Raw& value);
8552
8561 DequeueVisibility GetVisibility() const;
8562
8577 void SetVisibility(DequeueVisibility value);
8578
8587 DequeueMode GetMode() const;
8588
8599 void SetMode(DequeueMode value);
8600
8609 NavigationMode GetNavigation() const;
8610
8630 void SetNavigation(NavigationMode value);
8631
8640 int GetWaitTime() const;
8641
8659 void SetWaitTime(int value);
8660
8668 void SetAgents(std::vector<Agent>& agents);
8669
8686 void Subscribe(unsigned int port, unsigned int timeout, NotifyAQHandlerProc handler);
8687
8696 void Unsubscribe();
8697
8698 private:
8699
8700 Dequeue(OCI_Dequeue* pDequeue, core::Handle* parent);
8701 };
8702
8708 class Queue
8709 {
8710 public:
8711
8718 {
8720 NormalQueue = OCI_AQT_NORMAL,
8722 ExceptionQueue = OCI_AQT_EXCEPTION,
8724 NonPersistentQueue = OCI_AQT_NON_PERSISTENT
8726
8735
8760 static void Create(const Connection& connection, const ostring& queue, const ostring& table, QueueType type = NormalQueue,
8761 unsigned int maxRetries = 0, unsigned int retryDelay = 0, unsigned int retentionTime = 0,
8762 bool dependencyTracking = false, const ostring& comment = OTEXT(""));
8763
8784 static void Alter(const Connection& connection, const ostring& queue,
8785 unsigned int maxRetries = 0, unsigned int retryDelay = 0,
8786 unsigned int retentionTime = 0, const ostring& comment = OTEXT(""));
8787
8803 static void Drop(const Connection& connection, const ostring& queue);
8804
8822 static void Start(const Connection& connection, const ostring& queue, bool enableEnqueue = true, bool enableDequeue = true);
8823
8842 static void Stop(const Connection& connection, const ostring& queue, bool stopEnqueue = true, bool stopDequeue = true, bool wait = true);
8843 };
8844
8851 {
8852 public:
8853
8861 {
8863 None = OCI_AGM_NONE,
8866 Transactionnal = OCI_AGM_TRANSACTIONNAL
8868
8877
8885 {
8887 Buffered = OCI_APM_BUFFERED,
8889 Persistent = OCI_APM_PERSISTENT,
8891 All = OCI_APM_ALL
8893
8902
8937 static void Create(const Connection& connection, const ostring& table, const ostring& payloadType, bool multipleConsumers,
8938 const ostring& storageClause = OTEXT(""), const ostring& sortList = OTEXT(""),
8939 GroupingMode groupingMode = None, const ostring& comment = OTEXT(""),
8940 unsigned int primaryInstance = 0, unsigned int secondaryInstance = 0,
8941 const ostring& compatible = OTEXT(""));
8942
8961 static void Alter(const Connection& connection, const ostring& table, const ostring& comment, unsigned int primaryInstance = 0, unsigned int secondaryInstance = 0);
8962
8983 static void Drop(const Connection& connection, const ostring& table, bool force = true);
8984
9008 static void Purge(const Connection& connection, const ostring& table, PurgeMode mode, const ostring& condition = OTEXT(""), bool block = true);
9009
9027 static void Migrate(const Connection& connection, const ostring& table, const ostring& compatible = OTEXT(""));
9028 };
9029
9037 class DirectPath : public core::HandleHolder<OCI_DirPath*>
9038 {
9039 public:
9040
9047 {
9049 Default = OCI_DCM_DEFAULT,
9051 Force = OCI_DCM_FORCE
9053
9062
9069 {
9071 ResultComplete = OCI_DPR_COMPLETE,
9073 ResultError = OCI_DPR_ERROR,
9075 ResultFull = OCI_DPR_FULL,
9077 ResultPartial = OCI_DPR_PARTIAL,
9079 ResultEmpty = OCI_DPR_EMPTY
9081
9090
9112 DirectPath(const TypeInfo& typeInfo, unsigned int nbCols, unsigned int nbRows, const ostring& partition = OTEXT(""));
9113
9130 void SetColumn(unsigned int colIndex, const ostring& name, unsigned int maxSize, const ostring& format = OTEXT(""));
9131
9162 template<class T>
9163 void SetEntry(unsigned int rowIndex, unsigned int colIndex, const T& value, bool complete = true);
9164
9175 void Reset();
9176
9182 void Prepare();
9183
9202 DirectPath::Result Convert();
9203
9215 DirectPath::Result Load();
9216
9225 void Finish();
9226
9239 void Abort();
9240
9249 void Save();
9250
9256 void FlushRow();
9257
9269 void SetCurrentRows(unsigned int value);
9270
9279 unsigned int GetCurrentRows() const;
9280
9289 unsigned int GetMaxRows() const;
9290
9299 unsigned int GetRowCount() const;
9300
9313 unsigned int GetAffectedRows() const;
9314
9328 void SetDateFormat(const ostring& format);
9329
9356 void SetParallel(bool value);
9357
9372 void SetNoLog(bool value);
9373
9387 void SetCacheSize(unsigned int value);
9388
9399 void SetBufferSize(unsigned int value);
9400
9414 void SetConversionMode(ConversionMode value);
9415
9444 unsigned int GetErrorColumn();
9445
9479 unsigned int GetErrorRow();
9480 };
9481
9482
9483#define OCILIB_DEFINE_FLAG_OPERATORS(T) \
9484 inline core::Flags<T> operator | (T a, T b) { return core::Flags<T>(a) | core::Flags<T>(b); } \
9485
9486 OCILIB_DEFINE_FLAG_OPERATORS(Environment::EnvironmentFlagsValues)
9487 OCILIB_DEFINE_FLAG_OPERATORS(Environment::SessionFlagsValues)
9488 OCILIB_DEFINE_FLAG_OPERATORS(Environment::StartFlagsValues)
9489 OCILIB_DEFINE_FLAG_OPERATORS(Environment::StartModeValues)
9490 OCILIB_DEFINE_FLAG_OPERATORS(Environment::ShutdownModeValues)
9491 OCILIB_DEFINE_FLAG_OPERATORS(Environment::ShutdownFlagsValues)
9492 OCILIB_DEFINE_FLAG_OPERATORS(Environment::AllocatedBytesValues)
9493 OCILIB_DEFINE_FLAG_OPERATORS(Transaction::TransactionFlagsValues)
9494 OCILIB_DEFINE_FLAG_OPERATORS(Column::PropertyFlagsValues)
9495 OCILIB_DEFINE_FLAG_OPERATORS(Subscription::ChangeTypesValues)
9496}
AQ identified agent for messages delivery.
Definition: types.hpp:7753
Provides SQL bind information.
Definition: types.hpp:5777
VectorTypeValues
Vector type values.
Definition: types.hpp:5812
BindDirectionValues
Bind direction enumerated values.
Definition: types.hpp:5788
core::Enum< VectorTypeValues > VectorType
Vector type.
Definition: types.hpp:5826
core::Enum< BindDirectionValues > BindDirection
Bind direction.
Definition: types.hpp:5804
Class used for handling transient collection value. it is used internally by the Collection<T> class:
Definition: types.hpp:5332
Object identifying the SQL data types VARRAY and NESTED TABLE.
Definition: types.hpp:5424
CollectionIterator< const CollectionElement< T > > const_iterator
Common const iterator declaration.
Definition: types.hpp:5631
core::Enum< CollectionTypeValues > CollectionType
Collection type.
Definition: types.hpp:5458
CollectionTypeValues
Collection type enumerated values.
Definition: types.hpp:5442
CollectionIterator< CollectionElement< T > > iterator
Common iterator declaration.
Definition: types.hpp:5624
STL compliant Collection Random iterator class.
Definition: types.hpp:5364
Encapsulate a Resultset column or object member properties.
Definition: types.hpp:7280
PropertyFlagsValues
Column properties flags values.
Definition: types.hpp:7292
core::Flags< PropertyFlagsValues > PropertyFlags
Column properties flags.
Definition: types.hpp:7318
A connection or session with a specific database.
Definition: types.hpp:1685
FailoverEventValues
Failover events enumerated values.
Definition: types.hpp:1772
core::Enum< SessionTraceValues > SessionTrace
Session traces.
Definition: types.hpp:1840
core::Enum< FailoverResultValues > FailoverResult
Failover callback results.
Definition: types.hpp:1814
core::Enum< TimeoutTypeValues > TimeoutType
Timeout Types.
Definition: types.hpp:1742
FailoverRequestValues
Failover request enumerated values.
Definition: types.hpp:1750
core::Enum< FailoverRequestValues > FailoverRequest
Failover requests.
Definition: types.hpp:1764
SessionTraceValues
Session trace enumerated values.
Definition: types.hpp:1822
core::Enum< FailoverEventValues > FailoverEvent
Failover events.
Definition: types.hpp:1792
FailoverResultValues
Failover callback results enumerated values.
Definition: types.hpp:1800
TimeoutTypeValues
Timeout enumerated values.
Definition: types.hpp:1717
Object identifying the SQL data type DATE.
Definition: types.hpp:2815
Dequeue object for dequeuing messages into an Oracle Queue.
Definition: types.hpp:8359
DequeueVisibilityValues
Message visibility enumerated values.
Definition: types.hpp:8405
core::Enum< DequeueVisibilityValues > DequeueVisibility
Message visibility after begin dequeued.
Definition: types.hpp:8419
NavigationModeValues
Navigation Mode enumerated values.
Definition: types.hpp:8427
DequeueModeValues
Dequeue mode enumerated values.
Definition: types.hpp:8379
core::Enum< DequeueModeValues > DequeueMode
Dequeue mode.
Definition: types.hpp:8397
core::Enum< NavigationModeValues > NavigationMode
Navigation Mode.
Definition: types.hpp:8444
Oracle Direct path loading encapsulation.
Definition: types.hpp:9038
ResultValues
Direct Operation Result enumerated values.
Definition: types.hpp:9069
core::Enum< ConversionModeValues > ConversionMode
Conversion Mode.
Definition: types.hpp:9061
core::Enum< ResultValues > Result
Direct Operation Result.
Definition: types.hpp:9089
ConversionModeValues
Conversion mode enumerated values.
Definition: types.hpp:9047
Enqueue object for queuing messages into an Oracle Queue.
Definition: types.hpp:8192
EnqueueModeValues
Message enqueuing mode enumerated values.
Definition: types.hpp:8201
core::Enum< EnqueueModeValues > EnqueueMode
Message enqueuing mode.
Definition: types.hpp:8215
EnqueueVisibilityValues
Message visibility enumerated values.
Definition: types.hpp:8223
core::Enum< EnqueueVisibilityValues > EnqueueVisibility
Message visibility after begin queued.
Definition: types.hpp:8237
Static class in charge of library initialization / cleanup.
Definition: types.hpp:494
core::Flags< ShutdownModeValues > ShutdownMode
Oracle instance shutdown modes.
Definition: types.hpp:757
CharsetModeValues
Charset mode enumerated values.
Definition: types.hpp:629
StartModeValues
Oracle instance start modes enumerated values.
Definition: types.hpp:689
ImportModeValues
OCI libraries import mode enumerated values.
Definition: types.hpp:607
HAEventTypeValues
HA Event types enumerated values.
Definition: types.hpp:561
StartFlagsValues
Oracle instance start flags enumerated values.
Definition: types.hpp:715
core::Enum< LocaleCodeValues > LocaleCode
Locales string.
Definition: types.hpp:906
ShutdownFlagsValues
Oracle instance shutdown flags enumerated values.
Definition: types.hpp:765
LocaleCodeValues
Locales string enumerated values.
Definition: types.hpp:826
core::Enum< CharsetModeValues > CharsetMode
Environment charset mode.
Definition: types.hpp:643
core::Enum< ImportModeValues > ImportMode
OCI libraries import mode.
Definition: types.hpp:621
core::Flags< ShutdownFlagsValues > ShutdownFlags
Oracle instance shutdown flags.
Definition: types.hpp:794
core::Flags< StartFlagsValues > StartFlags
Oracle instance start flags.
Definition: types.hpp:731
HAEventSourceValues
HA Event sources enumerated values.
Definition: types.hpp:529
EnvironmentFlagsValues
Environment Flags enumerated values.
Definition: types.hpp:583
core::Enum< HAEventTypeValues > HAEventType
Type of HA events.
Definition: types.hpp:575
AllocatedBytesValues
Allocated Bytes enumerated values.
Definition: types.hpp:802
core::Flags< AllocatedBytesValues > AllocatedBytesFlags
Allocated Bytes.
Definition: types.hpp:818
SessionFlagsValues
Session flags enumerated values.
Definition: types.hpp:651
core::Flags< StartModeValues > StartMode
Oracle instance start modes.
Definition: types.hpp:707
core::Enum< HAEventSourceValues > HAEventSource
Source of HA events.
Definition: types.hpp:553
core::Flags< SessionFlagsValues > SessionFlags
Sessions flags.
Definition: types.hpp:681
ShutdownModeValues
Oracle instance shutdown modes enumerated values.
Definition: types.hpp:739
core::Flags< EnvironmentFlagsValues > EnvironmentFlags
Environment Flags.
Definition: types.hpp:599
Subscription Event.
Definition: types.hpp:7626
ObjectEventValues
Object events enumerated values.
Definition: types.hpp:7668
core::Enum< ObjectEventValues > ObjectEvent
Object events.
Definition: types.hpp:7690
core::Enum< EventTypeValues > EventType
Event type.
Definition: types.hpp:7660
EventTypeValues
Event type enumerated values.
Definition: types.hpp:7638
Exception class handling all OCILIB errors.
Definition: types.hpp:362
ExceptionTypeValues
Exception type enumerated values.
Definition: types.hpp:375
core::Enum< ExceptionTypeValues > ExceptionType
Type of Exception.
Definition: types.hpp:391
ostring GetMessage() const
Retrieve the error message.
Definition: Exception.hpp:152
const char * what() const noexcept override
Override the std::exception::what() method.
Definition: Exception.hpp:147
int GetOracleErrorCode() const
Return the Oracle error code.
Definition: Exception.hpp:203
unsigned int GetRow() const
Return the row index which caused an error during statement execution.
Definition: Exception.hpp:223
ExceptionType GetType() const
Return the Exception type.
Definition: Exception.hpp:198
Connection GetConnection() const
Return the connection within the error occurred.
Definition: Exception.hpp:218
int GetInternalErrorCode() const
Return the OCILIB error code.
Definition: Exception.hpp:208
Statement GetStatement() const
Return the statement within the error occurred.
Definition: Exception.hpp:213
Object identifying the SQL data type BFILE.
Definition: types.hpp:4557
Object identifying the SQL data type INTERVAL.
Definition: types.hpp:3271
IntervalTypeValues
Interval types enumerated values.
Definition: types.hpp:3288
core::Enum< IntervalTypeValues > IntervalType
Interval types.
Definition: types.hpp:3302
Object identifying the SQL data type LOB (CLOB, NCLOB and BLOB)
Definition: types.hpp:4235
T Read(unsigned int length)
Read a portion of a lob.
Object identifying the SQL data type LONG.
Definition: types.hpp:5693
T GetContent() const
Return the string read from a fetch sequence.
AQ message.
Definition: types.hpp:7843
MessageStateValues
Message state enumerated values.
Definition: types.hpp:7854
void SetPayload(const T &value)
Set the object payload of the message.
core::Enum< MessageStateValues > MessageState
Message state.
Definition: types.hpp:7872
T GetPayload()
Get the object payload of the message.
Static class allowing managing mutexes.
Definition: types.hpp:1346
Object identifying the SQL data type NUMBER.
Definition: types.hpp:2606
Object identifying the SQL data type OBJECT.
Definition: types.hpp:4883
core::Enum< ObjectTypeValues > ObjectType
Object Type.
Definition: types.hpp:4916
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.
Definition: types.hpp:4900
void Get(const ostring &name, T &value) const
Assign the given value with the given object attribute value.
A connection or session Pool.
Definition: types.hpp:1454
PoolTypeValues
Pool type enumerated values.
Definition: types.hpp:1463
core::Enum< PoolTypeValues > PoolType
Type of Pool.
Definition: types.hpp:1477
Class allowing the administration of Oracle Queues.
Definition: types.hpp:8709
QueueTypeValues
Queue Type enumerated values.
Definition: types.hpp:8718
core::Enum< QueueTypeValues > QueueType
Queue Type.
Definition: types.hpp:8734
Class allowing the administration of Oracle Queue tables.
Definition: types.hpp:8851
GroupingModeValues
Grouping mode enumerated values.
Definition: types.hpp:8861
PurgeModeValues
Purge mode enumerated values.
Definition: types.hpp:8885
core::Enum< GroupingModeValues > GroupingMode
Grouping Mode.
Definition: types.hpp:8876
core::Enum< PurgeModeValues > PurgeMode
Purge mode.
Definition: types.hpp:8901
Object identifying the SQL data type REF.
Definition: types.hpp:5063
Database resultset.
Definition: types.hpp:6921
unsigned int ForEach(T callback)
Fetch all rows in the resultset and call the given callback for row.
SeekModeValues
Seek Modes enumerated values.
Definition: types.hpp:6931
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.
Definition: types.hpp:6945
Object used for executing SQL or PL/SQL statement and returning the produced results.
Definition: types.hpp:5954
LongModeValues
LONG data type mapping modes enumerated values.
Definition: types.hpp:6054
StatementTypeValues
Statement Type enumerated values.
Definition: types.hpp:5970
core::Enum< BindModeValues > BindMode
Bind Modes.
Definition: types.hpp:6046
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.
Definition: types.hpp:6032
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.
Definition: types.hpp:6010
core::Enum< FetchModeValues > FetchMode
Fetch Modes.
Definition: types.hpp:6024
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.
Definition: types.hpp:6068
core::Enum< StatementTypeValues > StatementType
Statement Type.
Definition: types.hpp:6002
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.
Definition: types.hpp:7492
core::Flags< ChangeTypesValues > ChangeTypes
Subscription changes flags.
Definition: types.hpp:7530
ChangeTypesValues
Subscription changes flags values.
Definition: types.hpp:7512
static class allowing to manipulate threads
Definition: types.hpp:1273
POCI_THREAD ThreadProc
Thread callback.
Definition: types.hpp:1282
Static class allowing to set/get thread local storage (TLS) values for a given unique key.
Definition: types.hpp:1398
POCI_THREADKEYDEST ThreadKeyFreeProc
Thread Key callback for freeing resources.
Definition: types.hpp:1407
Object identifying the SQL data type TIMESTAMP.
Definition: types.hpp:3706
core::Enum< TimestampTypeValues > TimestampType
Type of timestamp.
Definition: types.hpp:3740
TimestampTypeValues
Interval types enumerated values.
Definition: types.hpp:3724
Oracle Transaction object.
Definition: types.hpp:2487
core::Flags< TransactionFlagsValues > TransactionFlags
Transaction flags.
Definition: types.hpp:2521
TransactionFlagsValues
Transaction flags enumerated values.
Definition: types.hpp:2498
Provides type information on Oracle Database objects.
Definition: types.hpp:4746
TypeInfoTypeValues
Type of object information enumerated values.
Definition: types.hpp:4760
core::Enum< TypeInfoTypeValues > TypeInfoType
Type of object information.
Definition: types.hpp:4776
Object identifying the SQL data type VECTOR.
Definition: types.hpp:5175
VectorFormatValues
Vector Format types enumerated values.
Definition: types.hpp:5186
core::Enum< VectorFormatValues > VectorFormat
Type of Format.
Definition: types.hpp:5206
Object identifying the SQL data type XMLTYPE.
Definition: types.hpp:5150
Internal usage. Map supporting concurrent access from multiple threads.
Definition: core.hpp:283
Template Enumeration template class providing some type safety to some extends for manipulating enume...
Definition: core.hpp:131
Template Flags template class providing some type safety to some extends for manipulating flags set v...
Definition: core.hpp:161
Internal usage. Smart pointer class with reference counting for managing OCILIB object handles.
Definition: core.hpp:378
Internal usage. Interface for handling ownership and relationship of a C API handle.
Definition: core.hpp:338
Internal usage. Provide a store for C Handles to C++ Handles mapping.
Definition: core.hpp:354
Abstract class allowing derived classes to be compatible with any type supporting the operator << oci...
Definition: core.hpp:462
Internal usage. SynchronizationGuard object.
Definition: core.hpp:240
Internal usage. Class implementing bind translations between C++ vectors and C API arrays.
Definition: support.hpp:80
Internal usage. Class owning bind objects allowing to set/get C data prior/after a statement executio...
Definition: support.hpp:213
struct OCI_Ref OCI_Ref
Oracle REF type representation.
Definition: types.h:356
struct OCI_Elem OCI_Elem
Oracle Collection item representation.
Definition: types.h:329
struct OCI_XmlType OCI_XmlType
Oracle XMLTYPE type representation.
Definition: types.h:366
struct OCI_Dequeue OCI_Dequeue
OCILIB encapsulation of A/Q dequeuing operations.
Definition: types.h:490
struct OCI_Connection OCI_Connection
Oracle physical connection.
Definition: types.h:124
struct OCI_Object OCI_Object
Oracle Named types representation.
Definition: types.h:309
void(* POCI_THREAD)(OCI_Thread *thread, void *arg)
Thread procedure prototype.
Definition: types.h:529
struct OCI_Statement OCI_Statement
Oracle SQL or PL/SQL statement.
Definition: types.h:136
struct OCI_Timestamp OCI_Timestamp
Oracle internal timestamp representation.
Definition: types.h:289
struct OCI_Date OCI_Date
Oracle internal date representation.
Definition: types.h:279
struct OCI_Coll OCI_Coll
Oracle Collections (VARRAYs and Nested Tables) representation.
Definition: types.h:319
struct OCI_Bind OCI_Bind
Internal bind representation.
Definition: types.h:148
struct OCI_Error OCI_Error
Encapsulates an Oracle or OCILIB exception.
Definition: types.h:410
struct OCI_Lob OCI_Lob
Oracle Internal Large objects:
Definition: types.h:198
struct OCI_Long OCI_Long
Oracle Long data type.
Definition: types.h:260
struct OCI_Column OCI_Column
Oracle SQL Column and Type member representation.
Definition: types.h:175
struct OCI_Interval OCI_Interval
Oracle internal interval representation.
Definition: types.h:299
struct OCI_Transaction OCI_Transaction
Oracle Transaction.
Definition: types.h:238
struct OCI_Msg OCI_Msg
OCILIB encapsulation of A/Q message.
Definition: types.h:470
struct OCI_Number OCI_Number
Oracle NUMBER representation.
Definition: types.h:269
struct OCI_TypeInfo OCI_TypeInfo
Type info metadata handle.
Definition: types.h:386
struct OCI_File OCI_File
Oracle External Large objects:
Definition: types.h:223
void(* POCI_THREADKEYDEST)(void *data)
Thread key destructor prototype.
Definition: types.h:545
struct OCI_Event OCI_Event
OCILIB encapsulation of Oracle DCN event.
Definition: types.h:460
struct OCI_Resultset OCI_Resultset
Collection of output columns from a select statement.
Definition: types.h:163
struct OCI_Subscription OCI_Subscription
OCILIB encapsulation of Oracle DCN notification.
Definition: types.h:450
struct OCI_Agent OCI_Agent
OCILIB encapsulation of A/Q Agent.
Definition: types.h:480
struct OCI_Vector OCI_Vector
Oracle VECTOR type representation.
Definition: types.h:376
static T Check(T result)
Internal usage. Checks if the last OCILIB function call has raised an error. If so,...
Definition: Utils.hpp:53
OCILIB ++ Namespace.
OracleVersionValues
Oracle Version enumerated values.
Definition: types.hpp:50
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 )
Definition: config.hpp:120
NumericTypeValues
Numeric type enumerated values.
Definition: types.hpp:136
@ NumericDouble
Definition: types.hpp:150
@ NumericInt
Definition: types.hpp:140
@ NumericUnsignedBigInt
Definition: types.hpp:148
@ NumericUnsignedShort
Definition: types.hpp:144
@ NumericBigInt
Definition: types.hpp:142
@ NumericNumber
Definition: types.hpp:154
@ NumericFloat
Definition: types.hpp:152
@ NumericUnsignedInt
Definition: types.hpp:146
@ NumericShort
Definition: types.hpp:138
core::Enum< OpenModeValues > OpenMode
Open Modes.
Definition: types.hpp:277
Long< Raw, LongBinary > Blong
Class handling LONG RAW oracle type.
Definition: types.hpp:5767
core::Enum< NumericTypeValues > NumericType
Numeric data type.
Definition: types.hpp:164
Lob< ostring, LobNationalCharacter > NClob
Class handling NCLOB oracle type.
Definition: types.hpp:4535
LongTypeValues
Long types enumerated values.
Definition: types.hpp:309
@ LongCharacter
Definition: types.hpp:313
@ LongBinary
Definition: types.hpp:311
const void * ThreadId
Thread Unique ID.
Definition: config.hpp:165
CharsetFormValues
Charset form enumerated values.
Definition: types.hpp:172
@ CharsetFormDefault
Definition: types.hpp:174
@ CharsetFormNational
Definition: types.hpp:176
OpenModeValues
Open Modes enumerated values.
Definition: types.hpp:263
@ ReadWrite
Definition: types.hpp:267
@ ReadOnly
Definition: types.hpp:265
CollationIDValues
Collation ID enumerated values.
Definition: types.hpp:194
@ CollationIDBinaryAI
Definition: types.hpp:220
@ CollationIDNlsSortAI
Definition: types.hpp:204
@ CollationIDNlsSortVar1
Definition: types.hpp:208
@ CollationIDNlsSortCI
Definition: types.hpp:202
@ CollationIDNlsSortVar1CI
Definition: types.hpp:210
@ CollationIDNlsSortVar1AI
Definition: types.hpp:212
@ CollationIDBinaryCI
Definition: types.hpp:218
@ CollationIDNone
Definition: types.hpp:196
@ CollationIDNlsSort
Definition: types.hpp:200
@ CollationIDNlsSortCS
Definition: types.hpp:206
@ CollationIDBinary
Definition: types.hpp:216
@ CollationIDNlsSortVar1CS
Definition: types.hpp:214
@ CollationIDNlsComp
Definition: types.hpp:198
SeekModeValues
Seek Modes enumerated values.
Definition: types.hpp:239
@ SeekOffset
Definition: types.hpp:245
@ SeekSet
Definition: types.hpp:241
@ SeekEnd
Definition: types.hpp:243
core::Enum< CollationIDValues > CollationID
Type of Collation ID.
Definition: types.hpp:230
Lob< ostring, LobCharacter > Clob
Class handling CLOB oracle type.
Definition: types.hpp:4524
core::Enum< LobTypeValues > LobType
Type of Lob.
Definition: types.hpp:301
core::Enum< SeekModeValues > SeekMode
Seek Modes.
Definition: types.hpp:255
std::vector< unsigned char > Raw
C++ counterpart of SQL RAW data type.
Definition: config.hpp:138
core::Enum< LongTypeValues > LongType
Type of Long.
Definition: types.hpp:323
OCI_Mutex * MutexHandle
Alias for an OCI_Mutex pointer.
Definition: config.hpp:147
FormatTypeValues
Format type enumerated values.
Definition: types.hpp:331
@ FormatBinaryDouble
Definition: types.hpp:339
@ FormatBinaryFloat
Definition: types.hpp:341
@ FormatDate
Definition: types.hpp:333
@ FormatTimestamp
Definition: types.hpp:335
@ FormatNumeric
Definition: types.hpp:337
void * AnyPointer
Alias for the generic void pointer.
Definition: config.hpp:129
DataTypeValues
Data type enumerated values.
Definition: types.hpp:86
@ TypeCollection
Definition: types.hpp:110
@ TypeReference
Definition: types.hpp:112
@ TypeXmlType
Definition: types.hpp:116
@ TypeRaw
Definition: types.hpp:106
@ TypeInterval
Definition: types.hpp:104
@ TypeStatement
Definition: types.hpp:96
@ TypeDate
Definition: types.hpp:90
@ TypeTimestamp
Definition: types.hpp:102
@ TypeVector
Definition: types.hpp:118
@ TypeBoolean
Definition: types.hpp:114
@ TypeFile
Definition: types.hpp:100
@ TypeObject
Definition: types.hpp:108
@ TypeLong
Definition: types.hpp:94
@ TypeString
Definition: types.hpp:92
@ TypeLob
Definition: types.hpp:98
@ TypeNumeric
Definition: types.hpp:88
LobTypeValues
Lob types enumerated values.
Definition: types.hpp:285
@ LobCharacter
Definition: types.hpp:289
@ LobNationalCharacter
Definition: types.hpp:291
@ LobBinary
Definition: types.hpp:287
core::Enum< FormatTypeValues > FormatType
Format type.
Definition: types.hpp:351
Long< ostring, LongCharacter > Clong
Class handling LONG oracle type.
Definition: types.hpp:5756
Lob< Raw, LobBinary > Blob
Class handling BLOB oracle type.
Definition: types.hpp:4546
OCI_Thread * ThreadHandle
Alias for an OCI_Thread pointer.
Definition: config.hpp:156
core::Enum< CharsetFormValues > CharsetForm
Type of charsetForm.
Definition: types.hpp:186
core::Enum< DataTypeValues > DataType
Column data type.
Definition: types.hpp:128
core::Enum< OracleVersionValues > OracleVersion
Oracle Version.
Definition: types.hpp:78