OCILIB (C and C++ Driver for Oracle)  4.0.0
ocilib.hpp
1 /*
2  +-----------------------------------------------------------------------------------------+
3  | |
4  | |
5  | OCILIB ++ - C++ wrapper around OCILIB |
6  | |
7  | (C Wrapper for Oracle OCI) |
8  | |
9  | Website : http://www.ocilib.net |
10  | |
11  | Copyright (c) 2007-2014 Vincent ROGIER <vince.rogier@ocilib.net> |
12  | |
13  +-----------------------------------------------------------------------------------------+
14  | |
15  | This library is free software; you can redistribute it and/or |
16  | modify it under the terms of the GNU Lesser General Public |
17  | License as published by the Free Software Foundation; either |
18  | version 2 of the License, or (at your option) any later version. |
19  | |
20  | This library is distributed in the hope that it will be useful, |
21  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
22  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
23  | Lesser General Public License for more details. |
24  | |
25  | You should have received a copy of the GNU Lesser General Public |
26  | License along with this library; if not, write to the Free |
27  | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
28  | |
29  +-----------------------------------------------------------------------------------------+
30 
31  +-----------------------------------------------------------------------------------------+
32  | IMPORTANT NOTICE |
33  +-----------------------------------------------------------------------------------------+
34  | |
35  | This C++ header defines C++ wrapper classes around the OCILIB C API |
36  | It requires a compatible version of OCILIB |
37  +-----------------------------------------------------------------------------------------+
38 
39  */
40 
41 /* --------------------------------------------------------------------------------------------- *
42  * $Id: ocilib.hpp, Vincent Rogier $
43  * --------------------------------------------------------------------------------------------- */
44 
45 #ifndef OCILIBCPP_H_INCLUDED
46 #define OCILIBCPP_H_INCLUDED
47 
48 /* includes */
49 
50 #include <string>
51 #include <list>
52 #include <algorithm>
53 #include <iostream>
54 #include <vector>
55 #include <map>
56 
57 #include "ocilib.h"
58 
64 namespace ocilib
65 {
66 
165 typedef std::basic_string<otext, std::char_traits<otext>, std::allocator<otext> > ostring;
166 
174 typedef void * AnyPointer;
175 
183 typedef std::vector<unsigned char> Raw;
184 
193 
202 
210 typedef const void * ThreadId;
211 
219 typedef void * CallbackPointer;
220 
221 }
222 
223 /* Including core classes */
224 
225 #include "ocilib_core.hpp"
226 
227 /* Defining public classes */
228 
229 namespace ocilib
230 {
231 
238 {
240  TypeNumeric = OCI_CDT_NUMERIC,
242  TypeDate = OCI_CDT_DATETIME,
244  TypeString = OCI_CDT_TEXT,
246  TypeLong = OCI_CDT_LONG,
248  TypeStatement = OCI_CDT_CURSOR,
250  TypeLob = OCI_CDT_LOB,
252  TypeFile = OCI_CDT_FILE,
254  TypeTimestamp = OCI_CDT_TIMESTAMP,
256  TypeInterval = OCI_CDT_INTERVAL,
258  TypeRaw = OCI_CDT_RAW,
260  TypeObject = OCI_CDT_OBJECT,
262  TypeCollection = OCI_CDT_COLLECTION,
264  TypeReference = OCI_CDT_REF
265 };
266 
275 
282 {
284  NumericShort = OCI_NUM_SHORT,
286  NumericInt = OCI_NUM_INT,
288  NumericBigInt = OCI_NUM_BIGINT,
290  NumericUnsignedShort = OCI_NUM_USHORT,
292  NumericUnsignedInt = OCI_NUM_UINT,
294  NumericUnsignedBigInt = OCI_NUM_BIGUINT,
296  NumericDouble = OCI_NUM_DOUBLE,
298  NumericFloat = OCI_NUM_FLOAT
299 };
300 
309 
316 {
318  CharsetFormDefault = OCI_CSF_DEFAULT,
320  CharsetFormNational = OCI_CSF_NATIONAL
321 };
330 
331 
338 {
340  SeekSet = OCI_SEEK_SET,
342  SeekEnd = OCI_SEEK_END,
344  SeekOffset = OCI_SEEK_CUR
345 };
346 
355 
362 {
364  ReadOnly = OCI_LOB_READONLY,
366  ReadWrite = OCI_LOB_READWRITE
367 };
368 
377 
384 {
386  LobBinary = OCI_BLOB,
388  LobCharacter = OCI_CLOB,
390  LobNationalCharacter = OCI_NCLOB
391 };
392 
401 
402 
409 {
411  LongBinary = OCI_BLONG,
413  LongCharacter = OCI_CLONG
414 };
415 
424 
433 class Exception : public HandleHolder<OCI_Error *>, public std::exception
434 {
435  friend void Check();
436  friend class Statement;
437 
438 public:
439 
446  {
448  OracleError = OCI_ERR_ORACLE,
450  OcilibError = OCI_ERR_OCILIB,
452  OracleWarning = OCI_ERR_WARNING
453  };
454 
463 
469  ostring GetMessage() const;
470 
477  ExceptionType GetType() const;
478 
484  int GetOracleErrorCode() const;
485 
491  int GetInternalErrorCode() const;
492 
498  Statement GetStatement() const;
499 
505  Connection GetConnection() const;
506 
519  unsigned int GetRow() const;
520 
529  virtual const char *what() const throw();
530 
536  virtual ~Exception() throw ();
537 
538 private:
539 
540  Exception();
541  Exception(OCI_Error *err);
542 
543  std::string _what;
544 };
545 
552 {
553  friend class Connection;
554  friend class Subscription;
555  friend class Dequeue;
556  template<class THandleType>
557  friend class HandleHolder;
558 
559 public:
560 
567  {
569  SourceInstance = OCI_HES_INSTANCE,
571  SourceDatabase = OCI_HES_DATABASE,
573  SourceNode = OCI_HES_NODE,
575  SourceService = OCI_HES_SERVICE,
577  SourceServiceMember = OCI_HES_SERVICE_MEMBER,
579  SourceASMInstance = OCI_HES_ASM_INSTANCE,
581  SourcePreConnect = OCI_HES_PRECONNECT
582  };
583 
592 
599  {
601  EventDown = OCI_HET_DOWN,
603  EventUp = OCI_HET_UP
604  };
605 
614 
621  {
623  Default = OCI_ENV_DEFAULT,
625  Threaded = OCI_ENV_THREADED,
627  Events = OCI_ENV_EVENTS
628  };
629 
638 
645  {
647  ImportLinkage = OCI_IMPORT_MODE_LINKAGE,
649  ImportRuntime = OCI_IMPORT_MODE_RUNTIME
650  };
651 
660 
667  {
669  CharsetAnsi = OCI_CHAR_ANSI,
671  CharsetWide = OCI_CHAR_WIDE
672  };
673 
682 
689  {
691  SessionDefault = OCI_SESSION_DEFAULT,
693  SessionXa = OCI_SESSION_XA,
695  SessionSysDba = OCI_SESSION_SYSDBA,
697  SessionSysOper = OCI_SESSION_SYSOPER
698  };
699 
708 
715  {
717  StartOnly = OCI_DB_SPM_START,
719  StartMount = OCI_DB_SPM_MOUNT,
721  StartOpen = OCI_DB_SPM_OPEN,
723  StartFull = OCI_DB_SPM_FULL
724  };
725 
734 
741  {
743  StartDefault = OCI_DB_SPF_DEFAULT,
745  StartForce = OCI_DB_SPF_FORCE,
747  StartRestrict = OCI_DB_SPF_RESTRICT
748  };
749 
758 
765  {
767  ShutdownOnly = OCI_DB_SDM_SHUTDOWN,
769  ShutdownClose = OCI_DB_SDM_CLOSE,
771  ShutdownDismount = OCI_DB_SDM_DISMOUNT,
773  ShutdownFull = OCI_DB_SDM_FULL
774  };
775 
784 
791  {
794  ShutdowntDefault = OCI_DB_SDF_DEFAULT,
797  ShutdowTrans = OCI_DB_SDF_TRANS,
801  ShutdownTransLocal = OCI_DB_SDF_TRANS_LOCAL,
804  ShutdownImmediate = OCI_DB_SDF_IMMEDIATE,
810  ShutdownAbort = OCI_DB_SDF_ABORT
811  };
812 
821 
829  typedef void(*HAHandlerProc) (Connection &con, HAEventSource eventSource, HAEventType eventType, Timestamp &time);
830 
849  static void Initialize(EnvironmentFlags mode = Environment::Default, const ostring& libpath = OTEXT(""));
850 
864  static void Cleanup();
865 
874  static Environment::EnvironmentFlags GetMode();
875 
881  static Environment::ImportMode GetImportMode();
882 
888  static Environment::CharsetMode GetCharset();
889 
900  static unsigned int GetCompileVersion();
901 
911  static unsigned int GetRuntimeVersion();
912 
923  static void EnableWarnings(bool value);
924 
951  static void StartDatabase(const ostring &db, const ostring &user, const ostring& pwd,
952  Environment::StartFlags startFlags,
953  Environment::StartMode startMode,
954  Environment::SessionFlags sessionFlags = SessionSysDba,
955  const ostring& spfile = OTEXT(""));
956 
982  static void ShutdownDatabase(const ostring& db, const ostring& user, const ostring& pwd,
983  Environment::ShutdownFlags shutdownFlags,
984  Environment::ShutdownMode shutdownMode,
985  Environment::SessionFlags sessionFlags = SessionSysDba);
986 
997  static void ChangeUserPassword(const ostring& db, const ostring& user, const ostring& pwd, const ostring& newPwd);
998 
1015  static void SetHAHandler(HAHandlerProc handler);
1016 
1017 private:
1018 
1019  static void HAHandler(OCI_Connection *pConnection, unsigned int source, unsigned int event, OCI_Timestamp *pTimestamp);
1020  static unsigned int TAFHandler(OCI_Connection *pConnection, unsigned int type, unsigned int event);
1021  static void NotifyHandler(OCI_Event *pEvent);
1022  static void NotifyHandlerAQ(OCI_Dequeue *pDequeue);
1023 
1024  typedef ConcurrentPool<AnyPointer, Handle *> HandlePool;
1025  typedef ConcurrentPool<AnyPointer, CallbackPointer> CallbackPool;
1026 
1027  class EnvironmentHandle : public HandleHolder<AnyPointer>
1028  {
1029  friend class Connection;
1030 
1031  public:
1032 
1033  HandlePool Handles;
1034  CallbackPool Callbacks;
1035  unsigned int Mode;
1036 
1037  EnvironmentHandle();
1038 
1039  void Initialize(AnyPointer pEnv, unsigned int envMode);
1040  void Finalize();
1041  };
1042 
1043  static EnvironmentHandle& GetEnvironmentHandle();
1044 };
1045 
1056 class Thread
1057 {
1058 public:
1059 
1066  typedef POCI_THREAD ThreadProc;
1067 
1076  static ThreadHandle Create();
1077 
1085  static void Destroy(ThreadHandle handle);
1086 
1096  static void Run(ThreadHandle handle, ThreadProc func, void *args);
1097 
1108  static void Join(ThreadHandle handle);
1109 
1117  static ThreadId GetThreadId(ThreadHandle handle);
1118 };
1119 
1129 class Mutex
1130 {
1131 public:
1132 
1141  static MutexHandle Create();
1142 
1150  static void Destroy(MutexHandle handle);
1151 
1159  static void Acquire(MutexHandle handle);
1160 
1168  static void Release(MutexHandle handle);
1169 };
1170 
1182 {
1183 public:
1184 
1191  typedef POCI_THREADKEYDEST ThreadKeyFreeProc;
1192 
1205  static void Create(const ostring& name, ThreadKeyFreeProc freeProc = 0);
1206 
1215  static void SetValue(const ostring& name, AnyPointer value);
1216 
1227  static AnyPointer GetValue(const ostring& name);
1228 };
1229 
1237 class Pool : public HandleHolder<OCI_Pool *>
1238 {
1239 public:
1240 
1247  {
1249  ConnectionPool = OCI_POOL_CONNECTION,
1251  SessionPool = OCI_POOL_SESSION
1252  };
1253 
1262 
1268  Pool();
1269 
1287  Pool(const ostring& db, const ostring& user, const ostring& pwd, Pool::PoolType poolType,
1288  unsigned int minSize, unsigned int maxSize, unsigned int increment = 1,
1290 
1309  void Open(const ostring& db, const ostring& user, const ostring& pwd, Pool::PoolType poolType,
1310  unsigned int minSize, unsigned int maxSize, unsigned int increment = 1,
1312 
1318  void Close();
1319 
1348  Connection GetConnection(const ostring& sessionTag = OTEXT(""));
1349 
1361  unsigned int GetTimeout() const;
1362 
1376  void SetTimeout(unsigned int value);
1377 
1387  bool GetNoWait() const;
1388 
1401  void SetNoWait(bool value);
1402 
1408  unsigned int GetBusyConnectionsCount() const;
1409 
1415  unsigned int GetOpenedConnectionsCount() const;
1416 
1422  unsigned int GetMinSize() const;
1423 
1429  unsigned int GetMaxSize() const;
1430 
1436  unsigned int GetIncrement() const;
1437 
1446  unsigned int GetStatementCacheSize() const;
1447 
1455  void SetStatementCacheSize(unsigned int value);
1456 };
1457 
1465 class Connection : public HandleHolder<OCI_Connection *>
1466 {
1467  friend class Environment;
1468  friend class Exception;
1469  friend class Statement;
1470  friend class File;
1471  friend class Timestamp;
1472  friend class Pool;
1473  friend class Object;
1474  friend class TypeInfo;
1475  friend class Reference;
1476  friend class Resultset;
1477  friend class Subscription;
1478 
1479  template<class TLobObjectType, int TLobOracleType>
1480  friend class Lob;
1481  template <class TDataType>
1482  friend class Collection;
1483 public:
1484 
1491  {
1493  FailoverRequestSession = OCI_FOT_SESSION,
1495  FailoverRequestSelect = OCI_FOT_SELECT
1496  };
1497 
1506 
1513  {
1515  FailoverEventEnd = OCI_FOE_END,
1517  FailoverEventAbort = OCI_FOE_ABORT,
1519  FailoverEventReauthentificate = OCI_FOE_REAUTH,
1521  FailoverEventBegin = OCI_FOE_BEGIN,
1523  FailoverEventError = OCI_FOE_ERROR
1524  };
1525 
1534 
1541  {
1543  FailoverOk = OCI_FOC_OK,
1545  FailoverRetry = OCI_FOC_RETRY
1546  };
1547 
1556 
1563  {
1565  TraceIdentity = OCI_TRC_IDENTITY,
1567  TraceModule = OCI_TRC_MODULE,
1569  TraceAction = OCI_TRC_ACTION,
1571  TraceDetail = OCI_TRC_DETAIL
1572  };
1573 
1582 
1590  typedef FailoverResult(*TAFHandlerProc) (Connection &con, FailoverRequest failoverRequest, FailoverEvent failoverEvent);
1591 
1597  Connection();
1598 
1612  Connection(const ostring& db, const ostring& user, const ostring& pwd, Environment::SessionFlags sessionFlags = Environment::SessionDefault);
1613 
1656  void Open(const ostring& db, const ostring& user, const ostring& pwd, Environment::SessionFlags sessionFlags = Environment::SessionDefault);
1657 
1663  void Close();
1664 
1670  void Commit();
1671 
1677  void Rollback();
1678 
1687  void Break();
1688 
1696  void SetAutoCommit(bool enabled);
1697 
1703  bool GetAutoCommit() const;
1704 
1713  bool IsServerAlive() const;
1714 
1723  bool PingServer() const;
1724 
1733  ostring GetConnectionString() const;
1734 
1743  ostring GetUserName() const;
1744 
1753  ostring GetPassword() const;
1754 
1763  ostring GetServerVersion() const;
1764 
1783  unsigned int GetVersion() const;
1784 
1790  unsigned int GetServerMajorVersion() const;
1791 
1797  unsigned int GetServerMinorVersion() const;
1798 
1804  unsigned int GetServerRevisionVersion() const;
1805 
1813  void ChangePassword(const ostring& newPwd);
1814 
1820  ostring GetSessionTag() const;
1821 
1836  void SetSessionTag(const ostring& tag);
1837 
1843  Transaction GetTransaction() const;
1844 
1858  void SetTransaction(const Transaction &transaction);
1859 
1875  void SetDefaultDateFormat(const ostring& format);
1876 
1885  ostring GetDefaultDateFormat() const;
1886 
1907  void SetDefaultNumericFormat(const ostring& format);
1908 
1917  ostring GetDefaultNumericFormat() const;
1918 
1938  void EnableServerOutput(unsigned int bufsize, unsigned int arrsize, unsigned int lnsize);
1939 
1948  void DisableServerOutput();
1949 
1958  bool GetServerOutput(ostring &line) const;
1959 
1965  void GetServerOutput(std::vector<ostring> &lines) const;
1966 
1967 
1996  void SetTrace(SessionTrace trace, const ostring& value);
1997 
2008  ostring GetTrace(SessionTrace trace) const;
2009 
2018  ostring GetDatabase() const;
2019 
2028  ostring GetInstance() const;
2029 
2038  ostring GetService() const;
2039 
2048  ostring GetServer() const;
2049 
2058  ostring GetDomain() const;
2059 
2068  Timestamp GetInstanceStartTime() const;
2069 
2081  unsigned int GetStatementCacheSize() const;
2082 
2093  void SetStatementCacheSize(unsigned int value);
2094 
2111  unsigned int GetDefaultLobPrefetchSize() const;
2112 
2137  void SetDefaultLobPrefetchSize(unsigned int value);
2138 
2147  bool IsTAFCapable() const;
2148 
2162  void SetTAFHandler(TAFHandlerProc handler);
2163 
2169  AnyPointer GetUserData();
2170 
2181  void SetUserData(AnyPointer value);
2182 
2183 private:
2184 
2185  Connection(OCI_Connection *con, Handle *parent);
2186 };
2187 
2195 class Transaction : public HandleHolder<OCI_Transaction *>
2196 {
2197  friend class Connection;
2198 
2199 public:
2200 
2207  {
2208  Unknown = OCI_UNKNOWN,
2210  New = OCI_TRS_NEW,
2212  Tight = OCI_TRS_TIGHT,
2214  Loose = OCI_TRS_LOOSE,
2216  ReadOnly = OCI_TRS_READONLY,
2218  ReadWrite = OCI_TRS_READWRITE,
2220  Serializable = OCI_TRS_SERIALIZABLE
2221  };
2222 
2231 
2245  Transaction(const Connection &connection, unsigned int timeout, TransactionFlags flags, OCI_XID *pxid = NULL);
2246 
2252  void Prepare();
2253 
2259  void Start();
2260 
2266  void Stop();
2267 
2273  void Resume();
2274 
2280  void Forget();
2281 
2290  TransactionFlags GetFlags() const;
2291 
2297  unsigned int GetTimeout() const;
2298 
2299 private:
2300 
2301  Transaction(OCI_Transaction *trans);
2302 };
2303 
2311 class Date : public HandleHolder<OCI_Date *>
2312 {
2313  friend class Statement;
2314  friend class Resultset;
2315  friend class BindArray;
2316  friend class Object;
2317  template <class TDataType>
2318  friend class Collection;
2319  friend class Message;
2320 
2321 public:
2322 
2328  Date();
2329 
2335  bool IsValid() const;
2336 
2342  int GetYear() const;
2343 
2349  void SetYear(int value);
2350 
2356  int GetMonth() const;
2357 
2363  void SetMonth(int value);
2364 
2370  int GetDay() const;
2371 
2377  void SetDay(int value);
2378 
2384  int GetHours() const;
2385 
2391  void SetHours(int value);
2392 
2398  int GetMinutes() const;
2399 
2405  void SetMinutes(int value);
2406 
2412  int GetSeconds() const;
2413 
2419  void SetSeconds(int value);
2420 
2428  int DaysBetween(const Date& other) const;
2429 
2439  void SetDate(int year, int month, int day);
2440 
2450  void SetTime(int hour, int min, int sec);
2451 
2464  void SetDateTime(int year, int month, int day, int hour, int min, int sec);
2465 
2475  void GetDate(int &year, int &month, int &day) const;
2476 
2486  void GetTime(int &hour, int &min, int &sec) const;
2487 
2500  void GetDateTime(int &year, int &month, int &day, int &hour, int &min, int &sec) const;
2501 
2509  void AddDays(int days);
2510 
2518  void AddMonths(int months);
2519 
2525  void SysDate();
2526 
2534  Date NextDay(const ostring& day) const;
2535 
2541  Date LastDay() const;
2542 
2551  void ChangeTimeZone(const ostring& tzSrc, const ostring& tzDst);
2552 
2564  void FromString(const ostring& str, const ostring& format = OCI_STRING_FORMAT_DATE);
2565 
2576  ostring ToString(const ostring& format = OCI_STRING_FORMAT_DATE) const;
2577 
2583  Date Clone() const;
2584 
2593  operator ostring() const;
2594 
2600  Date& operator ++ ();
2601 
2607  Date operator ++ (int);
2608 
2614  Date& operator -- ();
2615 
2621  Date operator -- (int);
2622 
2628  Date operator + (int value);
2629 
2635  Date operator - (int value);
2636 
2642  Date& operator += (int value);
2643 
2649  Date& operator -= (int value);
2650 
2656  bool operator == (const Date& other) const;
2657 
2663  bool operator != (const Date& other) const;
2664 
2670  bool operator > (const Date& other) const;
2671 
2677  bool operator < (const Date& other) const;
2678 
2684  bool operator >= (const Date& other) const;
2685 
2691  bool operator <= (const Date& other) const;
2692 
2693 private:
2694 
2695  int Compare(const Date& other) const;
2696 
2697  Date(OCI_Date *pDate, Handle *parent = 0);
2698 };
2699 
2707 class Interval : public HandleHolder<OCI_Interval *>
2708 {
2709  friend class Environment;
2710  friend class Statement;
2711  friend class Resultset;
2712  friend class BindArray;
2713  friend class Object;
2714  template <class TDataType>
2715  friend class Collection;
2716 
2717 public:
2718 
2725  {
2727  YearMonth = OCI_INTERVAL_YM,
2729  DaySecond = OCI_INTERVAL_DS
2730  };
2731 
2740 
2748  Interval(IntervalType type);
2749 
2755  IntervalType GetType() const;
2756 
2762  bool IsValid() const;
2763 
2772  int GetYear() const;
2773 
2782  void SetYear(int value);
2783 
2792  int GetMonth() const;
2793 
2802  void SetMonth(int value);
2803 
2812  int GetDay() const;
2813 
2822  void SetDay(int value);
2823 
2832  int GetHours() const;
2833 
2842  void SetHours(int value);
2843 
2852  int GetMinutes() const;
2853 
2862  void SetMinutes(int value);
2863 
2872  int GetSeconds() const;
2873 
2882  void SetSeconds(int value);
2883 
2889  int GetMilliSeconds() const;
2890 
2896  void SetMilliSeconds(int value);
2897 
2912  void GetDaySecond(int &day, int &hour, int &min, int &sec, int &fsec) const;
2913 
2928  void SetDaySecond(int day, int hour, int min, int sec, int fsec);
2929 
2941  void GetYearMonth(int &year, int &month) const;
2942 
2954  void SetYearMonth(int year, int month);
2955 
2963  void UpdateTimeZone(const ostring& timeZone);
2964 
2975  void FromString(const ostring& data);
2976 
2985  ostring ToString(int leadingPrecision = 10, int fractionPrecision = 10) const;
2986 
2992  Interval Clone() const;
2993 
3002  operator ostring() const;
3003 
3009  Interval operator + (const Interval& other);
3010 
3016  Interval operator - (const Interval& other);
3017 
3023  Interval& operator += (const Interval& other);
3024 
3030  Interval& operator -= (const Interval& other);
3031 
3037  bool operator == (const Interval& other) const;
3038 
3044  bool operator != (const Interval& other) const;
3045 
3051  bool operator > (const Interval& other) const;
3052 
3058  bool operator < (const Interval& other) const;
3059 
3065  bool operator >= (const Interval& other) const;
3066 
3072  bool operator <= (const Interval& other) const;
3073 
3074 private:
3075 
3076  int Compare(const Interval& other) const;
3077 
3078  Interval(OCI_Interval *pInterval, Handle *parent = 0);
3079 };
3080 
3089 class Timestamp : public HandleHolder<OCI_Timestamp *>
3090 {
3091  friend class Environment;
3092  friend class Statement;
3093  friend class Resultset;
3094  friend class BindArray;
3095  friend class Object;
3096  friend class Connection;
3097  template <class TDataType>
3098  friend class Collection;
3099 
3100 public:
3101 
3108  {
3110  NoTimeZone = OCI_TIMESTAMP,
3112  WithTimeZone = OCI_TIMESTAMP_TZ,
3114  WithLocalTimeZone = OCI_TIMESTAMP_LTZ
3115  };
3116 
3125 
3126  Timestamp(TimestampType type);
3127 
3133  TimestampType GetType() const;
3134 
3142  void Convert(const Timestamp& other);
3143 
3149  bool IsValid() const;
3150 
3156  int GetYear() const;
3157 
3163  void SetYear(int value);
3164 
3170  int GetMonth() const;
3171 
3177  void SetMonth(int value);
3178 
3184  int GetDay() const;
3185 
3191  void SetDay(int value);
3192 
3198  int GetHours() const;
3199 
3205  void SetHours(int value);
3206 
3212  int GetMinutes() const;
3213 
3219  void SetMinutes(int value);
3220 
3226  int GetSeconds() const;
3227 
3233  void SetSeconds(int value);
3234 
3240  int GetMilliSeconds() const;
3241 
3247  void SetMilliSeconds(int value);
3248 
3258  void GetDate(int &year, int &month, int &day) const;
3259 
3270  void GetTime(int &hour, int &min, int &sec, int &fsec) const;
3271 
3281  void SetDate(int year, int month, int day);
3282 
3293  void SetTime(int hour, int min, int sec, int fsec);
3294 
3308  void GetDateTime(int &year, int &month, int &day, int &hour, int &min, int &sec, int &fsec) const;
3309 
3324  void SetDateTime(int year, int month, int day, int hour, int min, int sec, int fsec, const ostring& timeZone = OTEXT(""));
3325 
3334  ostring GetTimeZone() const;
3335 
3345  void SetTimeZone(const ostring& timeZone);
3346 
3355  void GetTimeZoneOffset(int &hour, int &min) const;
3356 
3357 
3358  static void Substract(const Timestamp &lsh, const Timestamp &rsh, Interval &result);
3359 
3365  void SysTimestamp();
3366 
3378  void FromString(const ostring& data, const ostring& format = OCI_STRING_FORMAT_DATE);
3379 
3391  ostring ToString(const ostring& format = OCI_STRING_FORMAT_DATE, int precision = 0) const;
3392 
3398  Timestamp Clone() const;
3399 
3408  operator ostring() const;
3409 
3415  Timestamp& operator ++ ();
3416 
3422  Timestamp operator ++ (int);
3423 
3429  Timestamp& operator -- ();
3430 
3436  Timestamp operator -- (int);
3437 
3443  Timestamp operator + (int value);
3444 
3450  Timestamp operator - (int value);
3451 
3457  Interval operator - (const Timestamp& other);
3458 
3464  Timestamp& operator += (int value);
3465 
3471  Timestamp& operator -= (int value);
3472 
3478  Timestamp operator + (const Interval& other);
3479 
3485  Timestamp operator - (const Interval& other);
3486 
3492  Timestamp& operator += (const Interval& other);
3493 
3499  Timestamp& operator -= (const Interval& other);
3500 
3506  bool operator == (const Timestamp& other) const;
3507 
3513  bool operator != (const Timestamp& other) const;
3514 
3520  bool operator > (const Timestamp& other) const;
3521 
3527  bool operator < (const Timestamp& other) const;
3528 
3534  bool operator >= (const Timestamp& other) const;
3535 
3541  bool operator <= (const Timestamp& other) const;
3542 
3543 private:
3544 
3545  int Compare(const Timestamp& other) const;
3546 
3547  Timestamp(OCI_Timestamp *pTimestamp, Handle *parent = 0);
3548 };
3549 
3557 template<class TLobObjectType, int TLobOracleType>
3558 class Lob : public HandleHolder<OCI_Lob *>
3559 {
3560  friend class Statement;
3561  friend class Resultset;
3562  friend class BindArray;
3563  friend class Object;
3564  template <class TDataType>
3565  friend class Collection;
3566 
3567 public:
3568 
3579  Lob(const Connection &connection);
3580 
3591  TLobObjectType Read(unsigned int length);
3592 
3603  unsigned int Write(const TLobObjectType &content);
3604 
3615  unsigned int Append(const TLobObjectType& content);
3616 
3627  void Append(const Lob& other);
3628 
3643  bool Seek(SeekMode seekMode, big_uint offset);
3644 
3650  LobType GetType() const;
3651 
3657  big_uint GetOffset() const;
3658 
3664  big_uint GetLength() const;
3665 
3671  big_uint GetMaxSize() const;
3672 
3684  big_uint GetChunkSize() const;
3685 
3691  Connection GetConnection() const;
3692 
3700  void Truncate(big_uint length);
3701 
3717  big_uint Erase(big_uint offset, big_uint length);
3718 
3732  void Copy(Lob &dest, big_uint offset, big_uint offsetDest, big_uint length) const;
3733 
3739  bool IsTemporary() const;
3740 
3753  void Open(OpenMode mode);
3754 
3760  void Flush();
3761 
3770  void Close();
3771 
3790  void EnableBuffering(bool value);
3791 
3797  Lob Clone() const;
3798 
3804  operator TLobObjectType() const;
3805 
3811  Lob& operator += (const Lob& other);
3812 
3818  bool operator == (const Lob& other) const;
3819 
3825  bool operator != (const Lob& other) const;
3826 
3827 private:
3828 
3829  bool Equals(const Lob &other) const;
3830 
3831  Lob(OCI_Lob *pLob, Handle *parent = 0);
3832 
3833 };
3834 
3845 
3856 
3867 
3876 class File : public HandleHolder<OCI_File *>
3877 {
3878  friend class Statement;
3879  friend class Resultset;
3880  friend class BindArray;
3881  friend class Object;
3882  template <class TDataType>
3883  friend class Collection;
3884 
3885 public:
3886 
3897  File(const Connection &connection);
3898 
3913  File(const Connection &connection, const ostring& directory, const ostring& name);
3914 
3925  Raw Read(unsigned int size);
3926 
3941  bool Seek(SeekMode seekMode, big_uint offset);
3942 
3951  bool Exists() const;
3952 
3958  big_uint GetOffset() const;
3959 
3965  big_uint GetLength() const;
3966 
3972  Connection GetConnection() const;
3973 
3986  void SetInfos(const ostring& directory, const ostring& name);
3987 
3993  ostring GetName() const;
3994 
4000  ostring GetDirectory() const;
4001 
4007  void Open();
4008 
4014  void Close();
4015 
4021  bool IsOpened() const;
4022 
4028  File Clone() const;
4029 
4035  bool operator == (const File& other) const;
4036 
4042  bool operator != (const File& other) const;
4043 
4044 private:
4045 
4046  bool Equals(const File &other) const;
4047 
4048  File(OCI_File *pFile, Handle *parent = 0);
4049 };
4050 
4058 class TypeInfo : public HandleHolder<OCI_TypeInfo *>
4059 {
4060  friend class Object;
4061  friend class Reference;
4062  template <class TDataType>
4063  friend class Collection;
4064  friend class Column;
4065 public:
4066 
4073  {
4075  Table = OCI_TIF_TABLE,
4077  View = OCI_TIF_VIEW,
4079  Type = OCI_TIF_TYPE
4080  };
4081 
4090 
4103  TypeInfo(const Connection &connection, const ostring& name, TypeInfoType type);
4104 
4110  TypeInfoType GetType() const;
4111  ostring GetName() const;
4112 
4118  Connection GetConnection() const;
4119 
4129  unsigned int GetColumnCount() const;
4130 
4145  Column GetColumn(unsigned int index) const;
4146 
4147 private:
4148 
4149  TypeInfo(OCI_TypeInfo *pTypeInfo);
4150 };
4151 
4159 class Object : public HandleHolder<OCI_Object *>
4160 {
4161  friend class Statement;
4162  friend class Resultset;
4163  friend class BindArray;
4164  friend class Reference;
4165  template <class TDataType>
4166  friend class Collection;
4167  friend class Message;
4168 
4169 public:
4170 
4177  {
4179  Persistent = OCI_OBJ_PERSISTENT,
4181  Transient = OCI_OBJ_TRANSIENT,
4183  Value = OCI_OBJ_VALUE
4184  };
4185 
4194 
4202  Object(const TypeInfo &typeInfo);
4203 
4211  bool IsAttributeNull(const ostring& name) const;
4212 
4220  void SetAttributeNull(const ostring& name);
4221 
4227  TypeInfo GetTypeInfo() const;
4228 
4234  Reference GetReference() const;
4235 
4241  ObjectType GetType() const;
4242 
4255  template<class TDataType>
4256  TDataType Get(const ostring& name) const;
4257 
4271  template<class TDataType>
4272  void Set(const ostring& name, const TDataType &value);
4273 
4279  Object Clone() const;
4280 
4286  ostring ToString() const;
4287 
4296  operator ostring() const;
4297 
4298 private:
4299 
4300  Object(OCI_Object *pObject, Handle *parent = 0);
4301 };
4302 
4310 class Reference : public HandleHolder<OCI_Ref *>
4311 {
4312  friend class Statement;
4313  friend class Resultset;
4314  friend class BindArray;
4315  friend class Object;
4316  template <class TDataType>
4317  friend class Collection;
4318 
4319 public:
4320 
4328  Reference(const TypeInfo &typeInfo);
4329 
4335  TypeInfo GetTypeInfo() const;
4336 
4345  Object GetObject() const;
4346 
4352  bool IsReferenceNull() const;
4353 
4362  void SetReferenceNull();
4363 
4369  Reference Clone() const;
4370 
4376  ostring ToString() const;
4377 
4386  operator ostring() const;
4387 
4388 private:
4389 
4390  Reference(OCI_Ref *pRef, Handle *parent = 0);
4391 };
4392 
4400 template <class TDataType>
4401 class Collection : public HandleHolder<OCI_Coll *>
4402 {
4403  friend class Statement;
4404  friend class Resultset;
4405  friend class BindArray;
4406  friend class Object;
4407  template <class TOtherDataType>
4408  friend class CollectionIterator;
4409 
4410  template <class TOtherDataType>
4411  friend class Collection;
4412 public:
4413 
4420  {
4422  Varray = OCI_COLL_VARRAY,
4424  NestedTable = OCI_COLL_NESTED_TABLE
4425  };
4426 
4435 
4443  Collection(const TypeInfo &typeInfo);
4444 
4450  CollectionType GetType() const;
4451 
4457  unsigned int GetMax() const;
4458 
4464  unsigned int GetSize() const;
4465 
4476  unsigned int GetCount() const;
4477 
4485  void Truncate(unsigned int size);
4486 
4493  void Clear();
4494 
4505  bool IsElementNull(unsigned int index) const;
4506 
4517  void SetElementNull(unsigned int index);
4518 
4536  bool Delete(unsigned int index) const;
4537 
4545  TDataType Get(unsigned int index) const;
4546 
4555  void Set(unsigned int index, const TDataType &value);
4556 
4565  void Append(const TDataType &data);
4566 
4572  TypeInfo GetTypeInfo() const;
4573 
4579  Collection Clone() const;
4580 
4586  ostring ToString() const;
4587 
4596  operator ostring() const;
4597 
4607  class Element
4608  {
4609  friend class Collection<TDataType>::Iterator;
4610 
4611  public:
4612  Element(Collection &coll, unsigned int pos);
4613  operator TDataType() const;
4614  Element& operator = (TDataType value);
4615  bool IsNull() const;
4616  void SetNull();
4617 
4618  private:
4619  Collection & _coll;
4620  unsigned int _pos;
4621  };
4622 
4628  class Iterator : public std::iterator<std::bidirectional_iterator_tag, TDataType>
4629  {
4630 
4631  public:
4632 
4633  Iterator(Collection &collection, unsigned int pos);
4634  Iterator(const Iterator& other);
4635 
4636  bool operator== (const Iterator& other);
4637  bool operator!= (const Iterator& other);
4638 
4639  Element& operator*();
4640 
4641  Iterator &operator--();
4642  Iterator operator--(int);
4643 
4644  Iterator &operator++();
4645  Iterator operator++(int);
4646 
4647  private:
4648 
4649  Element _elem;
4650  };
4651 
4658 
4664  Iterator begin();
4665 
4671  Iterator end();
4672 
4678  Element operator [] (int index);
4679 
4680 private:
4681 
4682  TDataType GetElem(OCI_Elem *elem, Handle *parent) const;
4683 
4684  void SetElem(OCI_Elem *elem, const TDataType &value);
4685 
4686  Collection(OCI_Coll *pColl, Handle *parent = 0);
4687 };
4688 
4696 template<class TLongObjectType, int TLongOracleType>
4697 class Long : public HandleHolder<OCI_Long *>
4698 {
4699  friend class Statement;
4700  friend class Resultset;
4701  friend class BindArray;
4702 
4703 public:
4704 
4712  Long(const Statement &statement);
4713 
4724  unsigned int Write(const TLongObjectType& content);
4725 
4731  unsigned int GetLength() const;
4732 
4738  TLongObjectType GetContent() const;
4739 
4740 private:
4741 
4742  Long(OCI_Long *pLong, Handle *parent = 0);
4743 };
4744 
4752 class BindInfo : public HandleHolder<OCI_Bind *>
4753 {
4754  friend class Statement;
4755 
4756 public:
4757 
4764  {
4766  In = OCI_BDM_IN,
4768  Out = OCI_BDM_OUT,
4770  InOut = OCI_BDM_IN_OUT
4771  };
4772 
4781 
4787  ostring GetName() const;
4788 
4794  DataType GetType() const;
4795 
4815  unsigned int GetSubType() const;
4816 
4826  unsigned int GetDataCount() const;
4827 
4833  Statement GetStatement() const;
4834 
4855  void SetDataNull(bool value, unsigned int index = 1);
4856 
4871  bool IsDataNull(unsigned int index = 1) const;
4872 
4886  void SetCharsetForm(CharsetForm value);
4887 
4893  BindDirection GetDirection() const;
4894 
4895 private:
4896 
4897  BindInfo(OCI_Bind *pBind, Handle *parent);
4898 };
4899 
4907 class Statement : public HandleHolder<OCI_Statement *>
4908 {
4909  friend class Exception;
4910  friend class Resultset;
4911  template<class TLongObjectType, int TLongOracleType>
4912  friend class Long;
4913  friend class BindInfo;
4914  friend class BindObject;
4915 
4916 public:
4917 
4924  {
4926  TypeSelect = OCI_CST_SELECT,
4928  TypeUpdate = OCI_CST_UPDATE,
4930  TypeDelete = OCI_CST_DELETE,
4932  TypeInsert = OCI_CST_INSERT,
4934  TypeCreate = OCI_CST_CREATE,
4936  TypeDrop = OCI_CST_DROP,
4938  TypeAlter = OCI_CST_ALTER,
4940  TypeBegin = OCI_CST_BEGIN,
4942  TypeDeclare = OCI_CST_DECLARE,
4944  TypeCall = OCI_CST_CALL,
4945  };
4946 
4955 
4962  {
4964  FetchForward = OCI_SFM_DEFAULT,
4966  FetchScrollable = OCI_SFM_SCROLLABLE
4967  };
4968 
4977 
4984  {
4986  BindByPosition = OCI_BIND_BY_POS,
4988  BindByName = OCI_BIND_BY_NAME
4989  };
4990 
4999 
5006  {
5008  LongExplicit = OCI_LONG_EXPLICIT,
5010  LongImplicit = OCI_LONG_IMPLICIT
5011  };
5012 
5021 
5032  Statement(const Connection &connection);
5033  ~Statement();
5039 
5045  Connection GetConnection() const;
5046 
5073  void Describe(const ostring& sql);
5074 
5098  void Parse(const ostring& sql);
5099 
5110  void Prepare(const ostring& sql);
5111 
5117  void Execute();
5118 
5126  void Execute(const ostring& sql);
5127 
5142  unsigned int GetAffectedRows() const;
5143 
5149  ostring GetSql() const;
5150 
5162  Resultset GetResultset();
5163 
5185  Resultset GetNextResultset();
5186 
5211  void SetBindArraySize(unsigned int size);
5212 
5218  unsigned int GetBindArraySize() const;
5219 
5235  void AllowRebinding(bool value);
5236 
5245  bool IsRebindingAllowed() const;
5246 
5263  unsigned int GetBindIndex(const ostring& name) const;
5264 
5270  unsigned int GetBindCount() const;
5271 
5286  BindInfo GetBind(unsigned int index) const;
5287 
5298  BindInfo GetBind(const ostring& name) const;
5299 
5319  template <class TDataType>
5320  void Bind(const ostring& name, TDataType &value, BindInfo::BindDirection mode);
5321 
5343  template <class TDataType, class TExtraInfo>
5344  void Bind(const ostring& name, TDataType &value, TExtraInfo extraInfo, BindInfo::BindDirection mode);
5345 
5365  template <class TDataType>
5366  void Bind(const ostring& name, std::vector<TDataType> &values, BindInfo::BindDirection mode);
5367 
5387  template <class TDataType>
5388  void Bind(const ostring& name, std::vector<TDataType> &values, TypeInfo &typeInfo, BindInfo::BindDirection mode);
5389 
5412  template <class TDataType, class TExtraInfo>
5413  void Bind(const ostring& name, std::vector<TDataType> &values, TExtraInfo extraInfo, BindInfo::BindDirection mode);
5414 
5435  template <class TDataType>
5436  void Register(const ostring& name);
5437 
5455  template <class TDataType, class TExtraInfo>
5456  void Register(const ostring& name, TExtraInfo& extraInfo);
5457 
5476  template <class TDataType, class TExtraInfo>
5477  void Register(const ostring& name, TExtraInfo extraInfo);
5478 
5484  StatementType GetStatementType() const;
5485 
5495  unsigned int GetSqlErrorPos() const;
5496 
5507  void SetFetchMode(FetchMode value);
5508 
5517  FetchMode GetFetchMode() const;
5518 
5526  void SetBindMode(BindMode value);
5527 
5536  BindMode GetBindMode() const;
5537 
5545  void SetFetchSize(unsigned int value);
5546 
5555  unsigned int GetFetchSize() const;
5556 
5567  void SetPrefetchSize(unsigned int value);
5568 
5577  unsigned int GetPrefetchSize() const;
5578 
5597  void SetPrefetchMemory(unsigned int value);
5598 
5607  unsigned int GetPrefetchMemory() const;
5608 
5616  void SetLongMaxSize(unsigned int value);
5617 
5626  unsigned int GetLongMaxSize() const;
5627 
5638  void SetLongMode(LongMode value);
5639 
5645  LongMode GetLongMode() const;
5646 
5659  unsigned int GetSQLCommand() const;
5660 
5673  ostring GetSQLVerb() const;
5674 
5680  void GetBatchErrors(std::vector<Exception> &exceptions);
5681 
5682 private:
5683 
5684  Statement(OCI_Statement *stmt, Handle *parent = 0);
5685 
5686  BindsHolder *GetBindsHolder(bool allocate);
5687 
5688  void ReleaseResultsets();
5689 
5690  void SetLastBindMode(BindInfo::BindDirection mode);
5691 
5692  void SetInData();
5693  void SetOutData();
5694  void ClearBinds();
5695 
5696  template <typename TBindMethod, class TDataType>
5697  void Bind (TBindMethod &method, const ostring& name, TDataType& value, BindInfo::BindDirection mode);
5698 
5699  template <typename TBindMethod, class TObjectType, class TDataType>
5700  void Bind (TBindMethod &method, const ostring& name, TObjectType &value, BindValue<TDataType> datatype, BindInfo::BindDirection mode);
5701 
5702  template <typename TBindMethod, class TObjectType, class TDataType>
5703  void Bind (TBindMethod &method, const ostring& name, std::vector<TObjectType> &values, BindValue<TDataType> datatype, BindInfo::BindDirection mode);
5704 
5705  template <typename TBindMethod, class TObjectType, class TDataType, class TElemType>
5706  void Bind (TBindMethod &method, const ostring& name, std::vector<TObjectType> &values, BindValue<TDataType> datatype, BindInfo::BindDirection mode, TElemType type);
5707 };
5708 
5716 class Resultset : public HandleHolder<OCI_Resultset *>
5717 {
5718  friend class Statement;
5719 public:
5720 
5727  {
5729  SeekAbsolute = OCI_SFD_ABSOLUTE,
5731  SeekRelative = OCI_SFD_RELATIVE
5732  };
5733 
5742 
5759  template<class TDataType>
5760  TDataType Get(unsigned int index) const;
5761 
5778  template<class TDataType>
5779  TDataType Get(const ostring& name) const;
5780 
5794  bool Next();
5795 
5809  bool Prev();
5810 
5822  bool First();
5823 
5835  bool Last();
5836 
5857  bool Seek(SeekMode mode, int offset);
5858 
5864  unsigned int GetCount() const;
5865 
5876  unsigned int GetCurrentRow() const;
5877 
5891  unsigned int GetColumnIndex(const ostring& name) const;
5892 
5898  unsigned int GetColumnCount() const;
5899 
5910  Column GetColumn(unsigned int index) const;
5911 
5922  Column GetColumn(const ostring& name) const;
5923 
5934  bool IsColumnNull(unsigned int index) const;
5935 
5943  bool IsColumnNull(const ostring& name) const;
5944 
5950  Statement GetStatement() const;
5951 
5957  bool operator ++ (int);
5958 
5964  bool operator -- (int);
5965 
5972  bool operator += (int offset);
5973 
5980  bool operator -= (int offset);
5981 
5982 private:
5983 
5984  Resultset(OCI_Resultset *resultset, Handle *parent);
5985 };
5986 
5994 class Column : public HandleHolder<OCI_Column *>
5995 {
5996  friend class TypeInfo;
5997  friend class Resultset;
5998 
5999 public:
6000 
6007  {
6009  NoFlags = OCI_CPF_NONE,
6012  IsIdentity = OCI_CPF_IS_IDENTITY,
6016  IsGeneratedAlways = OCI_CPF_IS_GEN_ALWAYS,
6019  IsGeneratedByDefaultOnNull = OCI_CPF_IS_GEN_BY_DEFAULT_ON_NULL
6020  };
6021 
6030 
6031  ostring GetName() const;
6032 
6041  ostring GetSQLType() const;
6042 
6052  ostring GetFullSQLType() const;
6053 
6059  DataType GetType() const;
6060 
6078  unsigned int GetSubType() const;
6079 
6085  CharsetForm GetCharsetForm() const;
6086 
6096  unsigned int GetSize() const;
6097 
6103  int GetScale() const;
6104 
6110  int GetPrecision() const;
6111 
6117  int GetFractionalPrecision() const;
6118 
6124  int GetLeadingPrecision() const;
6125 
6136  PropertyFlags GetPropertyFlags() const;
6137 
6143  bool IsNullable() const;
6144 
6154  bool IsCharSemanticUsed() const;
6155 
6165  TypeInfo GetTypeInfo() const;
6166 
6167 private:
6168 
6169  Column(OCI_Column *pColumn, Handle *parent);
6170 };
6171 
6182 class Subscription : public HandleHolder<OCI_Subscription *>
6183 {
6184  friend class Event;
6185 
6186 public:
6187 
6195  typedef void (*NotifyHandlerProc) (Event &evt);
6196 
6197 
6204  {
6206  ObjectChanges = OCI_CNT_OBJECTS,
6208  RowChanges = OCI_CNT_ROWS,
6210  DatabaseChanges = OCI_CNT_DATABASES,
6212  AllChanges = OCI_CNT_ALL
6213  };
6214 
6223 
6229  Subscription();
6230 
6246  void Register(const Connection &connection, const ostring& name, ChangeTypes changeTypes, NotifyHandlerProc handler, unsigned int port = 0, unsigned int timeout = 0);
6247 
6263  void Unregister();
6264 
6270  void Watch(const ostring& sql);
6271 
6277  ostring GetName() const;
6278 
6284  unsigned int GetTimeout() const;
6285 
6291  unsigned int GetPort() const;
6292 
6301  Connection GetConnection() const;
6302 
6303 private:
6304 
6305  Subscription(OCI_Subscription *pSubcription);
6306 };
6307 
6318 class Event : public HandleHolder<OCI_Event *>
6319 {
6320  friend class Subscription;
6321  friend class Environment;
6322 
6323 public:
6324 
6331  {
6333  DatabaseStart = OCI_ENT_STARTUP,
6335  DatabaseShutdown = OCI_ENT_SHUTDOWN,
6337  DatabaseShutdownAny = OCI_ENT_SHUTDOWN_ANY,
6339  DatabaseDrop = OCI_ENT_DROP_DATABASE,
6341  Unregister = OCI_ENT_DEREGISTER,
6343  ObjectChanged = OCI_ENT_OBJECT_CHANGED
6344  };
6345 
6354 
6361  {
6363  ObjectInserted = OCI_ONT_INSERT,
6365  ObjectUpdated = OCI_ONT_UPDATE,
6367  ObjectDeleted = OCI_ONT_DELETE,
6369  ObjectAltered = OCI_ONT_ALTER,
6371  ObjectDropped = OCI_ONT_DROP,
6373  ObjectGeneric = OCI_ONT_GENERIC
6374  };
6375 
6384 
6390  EventType GetType() const;
6391 
6400  ObjectEvent GetObjectEvent() const;
6401 
6407  ostring GetDatabaseName() const;
6408 
6417  ostring GetObjectName() const;
6418 
6424  ostring GetRowID() const;
6425 
6431  Subscription GetSubscription() const;
6432 
6433 private:
6434 
6435  Event(OCI_Event *pEvent);
6436 };
6437 
6438 
6446 class Agent : public HandleHolder<OCI_Agent *>
6447 {
6448  friend class Message;
6449  friend class Dequeue;
6450 
6451 public:
6452 
6475  Agent(const Connection &connection, const ostring& name = OTEXT(""), const ostring& address = OTEXT(""));
6476 
6482  ostring GetName() const;
6483 
6497  void SetName(const ostring& value);
6498 
6507  ostring GetAddress() const;
6508 
6522  void SetAddress(const ostring& value);
6523 
6524 private:
6525 
6526  Agent(OCI_Agent *pAgent, Handle *parent);
6527 };
6528 
6536 class Message : public HandleHolder<OCI_Msg *>
6537 {
6538  friend class Dequeue;
6539 
6540 public:
6541 
6548  {
6550  Ready = OCI_AMS_READY,
6552  Waiting = OCI_AMS_WAITING,
6554  Processed = OCI_AMS_PROCESSED,
6556  Expired = OCI_AMS_EXPIRED
6557  };
6558 
6567 
6597  Message(const TypeInfo &typeInfo);
6598 
6607  void Reset();
6608 
6614  template <class TPayloadType>
6615  TPayloadType GetPayload();
6616 
6624  template <class TPayloadType>
6625  void SetPayload(const TPayloadType &value);
6626 
6635  Date GetEnqueueTime() const;
6636 
6642  int GetAttemptCount() const;
6643 
6649  MessageState GetState() const;
6650 
6661  Raw GetID() const;
6662 
6671  int GetExpiration() const;
6672 
6692  void SetExpiration(int value);
6693 
6702  int GetEnqueueDelay() const;
6703 
6726  void SetEnqueueDelay(int value);
6727 
6736  int GetPriority() const;
6737 
6750  void SetPriority(int value);
6751 
6761  Raw GetOriginalID() const;
6762 
6774  void SetOriginalID(const Raw &value);
6775 
6784  ostring GetCorrelation() const;
6785 
6796  void SetCorrelation(const ostring& value);
6797 
6811  ostring GetExceptionQueue() const;
6812 
6839  void SetExceptionQueue(const ostring& value);
6840 
6849  Agent GetSender() const;
6850 
6858  void SetSender(const Agent &agent);
6859 
6871  void SetConsumers(std::vector<Agent> &agents);
6872 
6873 private:
6874 
6875  Message(OCI_Msg *pMessage, Handle *parent);
6876 };
6877 
6885 class Enqueue : public HandleHolder<OCI_Enqueue *>
6886 {
6887 public:
6888 
6895  {
6897  Before = OCI_ASD_BEFORE,
6899  OnTop = OCI_ASD_TOP
6900  };
6901 
6910 
6917  {
6919  Immediate = OCI_AMV_IMMEDIATE,
6921  OnCommit = OCI_AMV_ON_COMMIT
6922  };
6923 
6932 
6954  Enqueue(const TypeInfo &typeInfo, const ostring& queueName);
6955 
6963  void Put(const Message &message);
6964 
6973  EnqueueVisibility GetVisibility() const;
6974 
6985  void SetVisibility(EnqueueVisibility value);
6986 
6995  EnqueueMode GetMode() const;
6996 
7015  void SetMode(EnqueueMode value);
7016 
7027  Raw GetRelativeMsgID() const;
7028 
7042  void SetRelativeMsgID(const Raw &value);
7043 };
7044 
7052 class Dequeue : public HandleHolder<OCI_Dequeue *>
7053 {
7054  friend class Environment;
7055 
7056 public:
7057 
7065  typedef void (*NotifyAQHandlerProc) (Dequeue &dequeue);
7066 
7073  {
7075  Browse = OCI_ADM_BROWSE,
7077  Locked = OCI_ADM_LOCKED,
7079  Remove = OCI_ADM_REMOVE,
7081  Confirm = OCI_ADM_REMOVE_NODATA
7082  };
7083 
7092 
7099  {
7101  Immediate = OCI_AMV_IMMEDIATE,
7103  OnCommit = OCI_AMV_ON_COMMIT
7104  };
7105 
7114 
7121  {
7123  FirstMessage = OCI_ADN_FIRST_MSG,
7125  NextMessage = OCI_ADN_NEXT_MSG,
7128  NextTransaction = OCI_ADN_NEXT_TRANSACTION,
7129  };
7130 
7139 
7148  Dequeue(const TypeInfo &typeInfo, const ostring& queueName);
7149 
7163  Message Get();
7164 
7180  Agent Listen(int timeout);
7181 
7190  ostring GetConsumer() const;
7191 
7203  void SetConsumer(const ostring& value);
7204 
7213  ostring GetCorrelation() const;
7214 
7226  void SetCorrelation(const ostring& value);
7227 
7236  Raw GetRelativeMsgID() const;
7237 
7245  void SetRelativeMsgID(const Raw &value);
7246 
7255  DequeueVisibility GetVisibility() const;
7256 
7271  void SetVisibility(DequeueVisibility value);
7272 
7281  DequeueMode GetMode() const;
7282 
7293  void SetMode(DequeueMode value);
7294 
7303  NavigationMode GetNavigation() const;
7304 
7324  void SetNavigation(NavigationMode value);
7325 
7334  int GetWaitTime() const;
7335 
7353  void SetWaitTime(int value);
7354 
7362  void SetAgents(std::vector<Agent> &agents);
7363 
7380  void Subscribe(unsigned int port, unsigned int timeout, NotifyAQHandlerProc handler);
7381 
7390  void Unsubscribe();
7391 
7392 private:
7393 
7394  Dequeue(OCI_Dequeue *pDequeue);
7395 };
7396 
7402 class Queue
7403 {
7404 public:
7405 
7412  {
7414  NormalQueue = OCI_AQT_NORMAL,
7416  ExceptionQueue = OCI_AQT_EXCEPTION,
7418  NonPersistentQueue = OCI_AQT_NON_PERSISTENT
7419  };
7420 
7429 
7454  static void Create(const Connection &connection, const ostring& queue, const ostring& table, QueueType type = NormalQueue,
7455  unsigned int maxRetries = 0, unsigned int retryDelay = 0, unsigned int retentionTime = 0,
7456  bool dependencyTracking = false, const ostring& comment = OTEXT(""));
7457 
7478  static void Alter(const Connection &connection, const ostring& queue,
7479  unsigned int maxRetries= 0, unsigned int retryDelay= 0,
7480  unsigned int retentionTime= 0, const ostring& comment = OTEXT(""));
7481 
7497  static void Drop(const Connection &connection, const ostring& queue);
7498 
7516  static void Start(const Connection &connection, const ostring& queue, bool enableEnqueue = true, bool enableDequeue = true);
7517 
7536  static void Stop(const Connection &connection, const ostring& queue, bool stopEnqueue = true, bool stopDequeue = true, bool wait = true);
7537 };
7538 
7545 {
7546 public:
7547 
7555  {
7557  None = OCI_AGM_NONE,
7560  Transactionnal = OCI_AGM_TRANSACTIONNAL
7561  };
7562 
7571 
7579  {
7581  Buffered = OCI_APM_BUFFERED,
7583  Persistent = OCI_APM_PERSISTENT,
7585  All = OCI_APM_ALL
7586  };
7587 
7596 
7631  static void Create(const Connection &connection, const ostring& table, const ostring& payloadType, bool multipleConsumers,
7632  const ostring& storageClause = OTEXT(""), const ostring& sortList = OTEXT(""),
7633  GroupingMode groupingMode = None, const ostring& comment = OTEXT(""),
7634  unsigned int primaryInstance = 0, unsigned int secondaryInstance = 0,
7635  const ostring& compatible = OTEXT(""));
7636 
7655  static void Alter(const Connection &connection, const ostring& table, const ostring& comment, unsigned int primaryInstance = 0, unsigned int secondaryInstance = 0);
7656 
7677  static void Drop(const Connection &connection, const ostring& table, bool force = true);
7678 
7702  static void Purge(const Connection &connection, const ostring& table, PurgeMode mode, const ostring& condition = OTEXT(""), bool block = true);
7703 
7721  static void Migrate(const Connection &connection, const ostring& table, const ostring& compatible = OTEXT(""));
7722 };
7723 
7731 class DirectPath : public HandleHolder<OCI_DirPath *>
7732 {
7733 public:
7734 
7741  {
7743  Default = OCI_DCM_DEFAULT,
7745  Force = OCI_DCM_FORCE
7746  };
7747 
7756 
7763  {
7765  ResultComplete = OCI_DPR_COMPLETE,
7767  ResultError = OCI_DPR_ERROR,
7769  ResultFull = OCI_DPR_FULL ,
7771  ResultPartial = OCI_DPR_PARTIAL,
7773  ResultEmpty = OCI_DPR_EMPTY
7774  };
7775 
7784 
7806  DirectPath(const TypeInfo &typeInfo, unsigned int nbCols, unsigned int nbRows, const ostring& partition = OTEXT(""));
7807 
7824  void SetColumn(unsigned int colIndex, const ostring& name, unsigned int maxSize, const ostring& format = OTEXT(""));
7825 
7856  template <class TDataType>
7857  void SetEntry(unsigned int rowIndex, unsigned int colIndex, const TDataType& value, bool complete = true);
7858 
7869  void Reset();
7870 
7876  void Prepare();
7877 
7896  DirectPath::Result Convert();
7897 
7909  DirectPath::Result Load();
7910 
7919  void Finish();
7920 
7933  void Abort();
7934 
7943  void Save();
7944 
7950  void FlushRow();
7951 
7963  void SetCurrentRows(unsigned int value);
7964 
7973  unsigned int GetCurrentRows() const;
7974 
7983  unsigned int GetMaxRows() const;
7984 
7993  unsigned int GetRowCount() const;
7994 
8007  unsigned int GetAffectedRows() const;
8008 
8022  void SetDateFormat(const ostring& format);
8023 
8050  void SetParallel(bool value);
8051 
8066  void SetNoLog(bool value);
8067 
8081  void SetCacheSize(unsigned int value);
8082 
8093  void SetBufferSize(unsigned int value);
8094 
8108  void SetConversionMode(ConversionMode value);
8109 
8138  unsigned int GetErrorColumn();
8139 
8173  unsigned int GetErrorRow();
8174 };
8175 
8176 }
8177 
8178 #include "ocilib_impl.hpp"
8179 
8180 
8181 #endif
8182 
Oracle Named types representation.
CharsetModeValues
Charset mode enumerated values.
Definition: ocilib.hpp:666
Oracle Collection item representation.
Encapsulate a Resultset column or object member properties.
Definition: ocilib.hpp:5994
Lob< Raw, LobBinary > Blob
Class handling BLOB oracle type.
Definition: ocilib.hpp:3866
DequeueVisibilityValues
Message visibility enumerated values.
Definition: ocilib.hpp:7098
Flags< SessionFlagsValues > SessionFlags
Sessions flags.
Definition: ocilib.hpp:707
Oracle Transaction.
Static class allowing to set/get thread local storage (TLS) values for a given unique key...
Definition: ocilib.hpp:1181
Exception class handling all OCILIB errors.
Definition: ocilib.hpp:433
int GetOracleErrorCode() const
Return the Oracle error code.
Provides SQL bind informations.
Definition: ocilib.hpp:4752
TypeInfoTypeValues
Type of object information enumerated values.
Definition: ocilib.hpp:4072
EventTypeValues
Event type enumerated values.
Definition: ocilib.hpp:6330
Oracle Long data type.
LobTypeValues
Lob types enumerated values.
Definition: ocilib.hpp:383
Enum< BindModeValues > BindMode
Bind Modes.
Definition: ocilib.hpp:4998
friend void Check()
Internal usage. Checks if the last OCILIB method call has raised an error. If so, it raises a C++ exc...
Definition: ocilib_impl.hpp:52
HAEventSourceValues
HA Event sources enumerated values.
Definition: ocilib.hpp:566
int GetInternalErrorCode() const
Return the OCILIB error code.
Enum< DequeueModeValues > DequeueMode
Dequeue mode.
Definition: ocilib.hpp:7091
Enum< PoolTypeValues > PoolType
Type of Pool.
Definition: ocilib.hpp:1261
Enum< CharsetFormValues > CharsetForm
Type of charsetForm.
Definition: ocilib.hpp:329
FetchModeValues
Fetch Modes enumerated values.
Definition: ocilib.hpp:4961
HAEventTypeValues
HA Event types enumerated values.
Definition: ocilib.hpp:598
Class allowing the administration of Oracle Queues.
Definition: ocilib.hpp:7402
SessionTraceValues
Session trace enumerated values.
Definition: ocilib.hpp:1562
Enum< GroupingModeValues > GroupingMode
Grouping Mode.
Definition: ocilib.hpp:7570
Subscription Event.
Definition: ocilib.hpp:6318
OCILIB encapsulation of OCI mutexes.
StatementTypeValues
Statement Type enumerated values.
Definition: ocilib.hpp:4923
Enum< LobTypeValues > LobType
Type of Lob.
Definition: ocilib.hpp:400
Statement GetStatement() const
Return the statement within the error occurred.
Enum< DataTypeValues > DataType
Column data type.
Definition: ocilib.hpp:274
OCI_Mutex * MutexHandle
Alias for an OCI_Mutex pointer.
Definition: ocilib.hpp:192
Global transaction identifier.
Definition: ocilib.h:956
Object used for executing SQL or PL/SQL statement and returning the produced results.
Definition: ocilib.hpp:4907
Encapsulates an Oracle or OCILIB exception.
A connection or session with a specific database.
Definition: ocilib.hpp:1465
Flags< PropertyFlagsValues > PropertyFlags
Column properties flags.
Definition: ocilib.hpp:6029
static class allowing to manipulate threads
Definition: ocilib.hpp:1056
PoolTypeValues
Pool type enumerated values.
Definition: ocilib.hpp:1246
Internal bind representation.
Object identifying the SQL data type LONG.
Definition: ocilib.hpp:4697
Oracle Transaction object.
Definition: ocilib.hpp:2195
FailoverResultValues
Failover callback results enumerated values.
Definition: ocilib.hpp:1540
Enum< ObjectTypeValues > ObjectType
Object Type.
Definition: ocilib.hpp:4193
LongTypeValues
Long types enumerated values.
Definition: ocilib.hpp:408
TimestampTypeValues
Interval types enumerated values.
Definition: ocilib.hpp:3107
StartFlagsValues
Oracle instance start flags enumerated values.
Definition: ocilib.hpp:740
Flags< ShutdownFlagsValues > ShutdownFlags
Oracle instance shutdown flags.
Definition: ocilib.hpp:820
AQ identified agent for messages delivery.
Definition: ocilib.hpp:6446
Static class allowing managing mutexes.
Definition: ocilib.hpp:1129
Enum< DequeueVisibilityValues > DequeueVisibility
Message visibility after begin dequeued.
Definition: ocilib.hpp:7113
Oracle Direct path loading encapsulation.
Definition: ocilib.hpp:7731
Enum< EnqueueVisibilityValues > EnqueueVisibility
Message visibility after begin queued.
Definition: ocilib.hpp:6931
Class used for handling transient collection value. it is used internally by:
Definition: ocilib.hpp:4607
Enum< NavigationModeValues > NavigationMode
Navigation Mode.
Definition: ocilib.hpp:7138
Enum< EventTypeValues > EventType
Event type.
Definition: ocilib.hpp:6353
EnqueueModeValues
Message enqueuing mode enumerated values.
Definition: ocilib.hpp:6894
void(* POCI_THREAD)(OCI_Thread *thread, void *arg)
Thread procedure prototype.
Definition: ocilib.h:819
Template Enum template class providing some type safety to some extends for manipulating enum variabl...
Flags< ChangeTypesValues > ChangeTypes
Subscription changes flags.
Definition: ocilib.hpp:6222
Enum< ExceptionTypeValues > ExceptionType
Type of Exception.
Definition: ocilib.hpp:462
ConversionModeValues
Conversion mode enumerated values.
Definition: ocilib.hpp:7740
Flags< EnvironmentFlagsValues > EnvironmentFlags
Environment Flags.
Definition: ocilib.hpp:637
ostring GetMessage() const
Retrieve the error message.
ShutdownModeValues
Oracle instance shutdown modes enumerated values.
Definition: ocilib.hpp:764
OCILIB encapsulation of Oracle DCN notification.
OCILIB encapsulation of A/Q dequeuing operations.
Oracle SQL or PL/SQL statement.
const void * ThreadId
Thread Unique ID.
Definition: ocilib.hpp:210
Object identifying the SQL data type REF.
Definition: ocilib.hpp:4310
Enum< IntervalTypeValues > IntervalType
Interval types.
Definition: ocilib.hpp:2739
SeekModeValues
Seek Modes enumerated values.
Definition: ocilib.hpp:337
OCILIB encapsulation of OCI Threads.
Enum< StatementTypeValues > StatementType
Statement Type.
Definition: ocilib.hpp:4954
PurgeModeValues
Purge mode enumerated values.
Definition: ocilib.hpp:7578
Oracle physical connection.
Static class in charge of library initialization / cleanup.
Definition: ocilib.hpp:551
FailoverRequestValues
Failover request enumerated values.
Definition: ocilib.hpp:1490
Enum< ObjectEventValues > ObjectEvent
Object events.
Definition: ocilib.hpp:6383
FailoverEventValues
Failover events enumerated values.
Definition: ocilib.hpp:1512
ChangeTypesValues
Subscription changes flags values.
Definition: ocilib.hpp:6203
Enum< SeekModeValues > SeekMode
Seek Modes.
Definition: ocilib.hpp:5741
Connection GetConnection() const
Return the connection within the error occurred.
void * AnyPointer
Alias for the generic void pointer.
Definition: ocilib.hpp:174
Oracle internal interval representation.
ExceptionType GetType() const
Return the Exception type.
Oracle REF type representation.
Enum< ShutdownModeValues > ShutdownMode
Oracle instance shutdown modes.
Definition: ocilib.hpp:783
Object identifying the SQL data type BFILE.
Definition: ocilib.hpp:3876
Object identifying the SQL data types VARRAY and NESTED TABLE.
Definition: ocilib.hpp:4401
Enum< MessageStateValues > MessageState
Message state.
Definition: ocilib.hpp:6566
ResultValues
Direct Operation operation Result enumerated values.
Definition: ocilib.hpp:7762
Flags< StartFlagsValues > StartFlags
Oracle instance start flags.
Definition: ocilib.hpp:757
Object identifying the SQL data type INTERVAL.
Definition: ocilib.hpp:2707
CollectionTypeValues
Collection type enumerated values.
Definition: ocilib.hpp:4419
Enum< EnqueueModeValues > EnqueueMode
Message enqueuing mode.
Definition: ocilib.hpp:6909
GroupingModeValues
Grouping mode enumerated values.
Definition: ocilib.hpp:7554
Class allowing the administration of Oracle Queue tables.
Definition: ocilib.hpp:7544
virtual const char * what() const
Override the std::exception::what() method.
Oracle internal date representation.
Enum< LongModeValues > LongMode
LONG datatype mapping modes.
Definition: ocilib.hpp:5020
OCILIB encapsulation of Oracle DCN event.
Enum< TimestampTypeValues > TimestampType
Type of Exception.
Definition: ocilib.hpp:3124
Enqueue object for queuing messages into an Oracle Queue.
Definition: ocilib.hpp:6885
Oracle Collections (VARRAYs and Nested Tables) representation.
SessionFlagsValues
Session flags enumerated values.
Definition: ocilib.hpp:688
TransactionFlagsValues
Transaction flags enumerated values.
Definition: ocilib.hpp:2206
Enum< FailoverEventValues > FailoverEvent
Failover events.
Definition: ocilib.hpp:1533
OpenModeValues
Open Modes enumerated values.
Definition: ocilib.hpp:361
Enum< FetchModeValues > FetchMode
Fetch Modes.
Definition: ocilib.hpp:4976
Type info metadata handle.
Enum< CollectionTypeValues > CollectionType
Collection type.
Definition: ocilib.hpp:4434
A connection or session Pool.
Definition: ocilib.hpp:1237
BindModeValues
Bind Modes enumerated values.
Definition: ocilib.hpp:4983
Enum< PurgeModeValues > PurgeMode
Purge mode.
Definition: ocilib.hpp:7595
OCILIB encapsulation of A/Q Agent.
Enum< HAEventSourceValues > HAEventSource
Source of HA events.
Definition: ocilib.hpp:591
BindDirectionValues
Bind direction enumerated values.
Definition: ocilib.hpp:4763
Enum< FailoverResultValues > FailoverResult
Failover callback results.
Definition: ocilib.hpp:1555
Iterator iterator
common iterator declaration
Definition: ocilib.hpp:4657
Enum< LongTypeValues > LongType
Type of Long.
Definition: ocilib.hpp:423
Enum< HAEventTypeValues > HAEventType
Type of HA events.
Definition: ocilib.hpp:613
ObjectEventValues
Object events enumerated values.
Definition: ocilib.hpp:6360
LongModeValues
LONG datatype mapping modes enumerated values.
Definition: ocilib.hpp:5005
ObjectTypeValues
Object Type enumerated values.
Definition: ocilib.hpp:4176
Enum< ConversionModeValues > ConversionMode
Conversion Mode.
Definition: ocilib.hpp:7755
STL compliant bi-directional iterator class.
Definition: ocilib.hpp:4628
Oracle internal timestamp representation.
Enum< NumericTypeValues > NumericType
Numeric data type.
Definition: ocilib.hpp:308
void * CallbackPointer
Alias used for storing user callback method pointers.
Definition: ocilib.hpp:219
Enum< CharsetModeValues > CharsetMode
Environment charset mode.
Definition: ocilib.hpp:681
Template class providing OCILIB handles auto memory, life cycle and scope management.
NumericTypeValues
Numeric type enumerated values.
Definition: ocilib.hpp:281
Template Flags template class providing some type safety to some extends for manipulating flags set v...
Enum< TypeInfoTypeValues > TypeInfoType
Type of object information.
Definition: ocilib.hpp:4089
OCI_Thread * ThreadHandle
Alias for an OCI_Thread pointer.
Definition: ocilib.hpp:201
Enum< ImportModeValues > ImportMode
OCI libraries import mode.
Definition: ocilib.hpp:659
CharsetFormValues
Charset form enumerated values.
Definition: ocilib.hpp:315
void(* POCI_THREADKEYDEST)(void *data)
Thread key destructor prototype.
Definition: ocilib.h:835
OCILIB encapsulation of A/Q message.
std::vector< unsigned char > Raw
C++ counterpart of SQL RAW data type.
Definition: ocilib.hpp:183
Provides type information on Oracle Database objects.
Definition: ocilib.hpp:4058
EnqueueVisibilityValues
Message visibility enumerated values.
Definition: ocilib.hpp:6916
NavigationModeValues
Navigation Mode enumerated values.
Definition: ocilib.hpp:7120
IntervalTypeValues
Interval types enumerated values.
Definition: ocilib.hpp:2724
ShutdownFlagsValues
Oracle instance shutdown flags enumerated values.
Definition: ocilib.hpp:790
DequeueModeValues
Dequeue mode enumerated values.
Definition: ocilib.hpp:7072
DataTypeValues
Data type enumerated values.
Definition: ocilib.hpp:237
ImportModeValues
OCI libraries import mode enumerated values.
Definition: ocilib.hpp:644
Enum< FailoverRequestValues > FailoverRequest
Failover requests.
Definition: ocilib.hpp:1505
Lob< ostring, LobNationalCharacter > NClob
Class handling NCLOB oracle type.
Definition: ocilib.hpp:3855
MessageStateValues
Message state enumerated values.
Definition: ocilib.hpp:6547
Enum< SeekModeValues > SeekMode
Seek Modes.
Definition: ocilib.hpp:354
Object identifying the SQL data type LOB (CLOB, NCLOB and BLOB)
Definition: ocilib.hpp:3558
Oracle External Large objects:
SeekModeValues
Seek Modes enumerated values.
Definition: ocilib.hpp:5726
Enum< ResultValues > Result
Direct Operation operation Result.
Definition: ocilib.hpp:7783
QueueTypeValues
Queue Type enumerated values.
Definition: ocilib.hpp:7411
Oracle Internal Large objects:
unsigned int GetRow() const
Return the row index which caused an error during statement execution.
ExceptionTypeValues
Exception type enumerated values.
Definition: ocilib.hpp:445
Lob< ostring, LobCharacter > Clob
Class handling CLOB oracle type.
Definition: ocilib.hpp:3844
Enum< BindDirectionValues > BindDirection
Bind direction.
Definition: ocilib.hpp:4780
PropertyFlagsValues
Column properties flags values.
Definition: ocilib.hpp:6006
Enum< SessionTraceValues > SessionTrace
Session traces.
Definition: ocilib.hpp:1581
AQ message.
Definition: ocilib.hpp:6536
Database resultset.
Definition: ocilib.hpp:5716
Flags< TransactionFlagsValues > TransactionFlags
Transaction flags.
Definition: ocilib.hpp:2230
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: ocilib.hpp:165
Collection of output columns from a select statement.
StartModeValues
Oracle instance start modes enumerated values.
Definition: ocilib.hpp:714
Oracle SQL Column and Type member representation.
Enum< StartModeValues > StartMode
Oracle instance start modes.
Definition: ocilib.hpp:733
Object identifying the SQL data type TIMESTAMP.
Definition: ocilib.hpp:3089
Enum< QueueTypeValues > QueueType
Queue Type.
Definition: ocilib.hpp:7428
Dequeue object for dequeuing messages into an Oracle Queue.
Definition: ocilib.hpp:7052
Object identifying the SQL data type OBJECT.
Definition: ocilib.hpp:4159
EnvironmentFlagsValues
Environment Flags enumerated values.
Definition: ocilib.hpp:620
Subscription to database or objects changes.
Definition: ocilib.hpp:6182
Object identifying the SQL data type DATE.
Definition: ocilib.hpp:2311
Enum< OpenModeValues > OpenMode
Open Modes.
Definition: ocilib.hpp:376