OCILIB (C and C++ Driver for Oracle)  4.1.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-2015 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 <vector>
53 #include <map>
54 
55 #include "ocilib.h"
56 
62 namespace ocilib
63 {
64 
173 typedef std::basic_string<otext, std::char_traits<otext>, std::allocator<otext> > ostring;
174 
182 typedef void * AnyPointer;
183 
191 typedef std::vector<unsigned char> Raw;
192 
201 
210 
218 typedef const void * ThreadId;
219 
227 typedef void * CallbackPointer;
228 
229 }
230 
231 /* Including core classes */
232 
233 #include "ocilib_core.hpp"
234 
235 /* Defining public classes */
236 
237 namespace ocilib
238 {
239 
246 {
247  Oracle80 = OCI_8_0,
248  Oracle8i = OCI_8_1,
249  Oracle9iR1 = OCI_9_0,
250  Oracle9iR2 = OCI_9_2,
251  Oracle10gR1 = OCI_10_1,
252  Oracle10gR2 = OCI_10_2,
253  Oracle11gR1 = OCI_11_1,
254  Oracle11gR2 = OCI_11_2,
255  Oracle12cR1 = OCI_12_1
256 };
257 
266 
273 {
275  TypeNumeric = OCI_CDT_NUMERIC,
277  TypeDate = OCI_CDT_DATETIME,
279  TypeString = OCI_CDT_TEXT,
281  TypeLong = OCI_CDT_LONG,
283  TypeStatement = OCI_CDT_CURSOR,
285  TypeLob = OCI_CDT_LOB,
287  TypeFile = OCI_CDT_FILE,
289  TypeTimestamp = OCI_CDT_TIMESTAMP,
291  TypeInterval = OCI_CDT_INTERVAL,
293  TypeRaw = OCI_CDT_RAW,
295  TypeObject = OCI_CDT_OBJECT,
297  TypeCollection = OCI_CDT_COLLECTION,
299  TypeReference = OCI_CDT_REF
300 };
301 
310 
317 {
319  NumericShort = OCI_NUM_SHORT,
321  NumericInt = OCI_NUM_INT,
323  NumericBigInt = OCI_NUM_BIGINT,
325  NumericUnsignedShort = OCI_NUM_USHORT,
327  NumericUnsignedInt = OCI_NUM_UINT,
329  NumericUnsignedBigInt = OCI_NUM_BIGUINT,
331  NumericDouble = OCI_NUM_DOUBLE,
333  NumericFloat = OCI_NUM_FLOAT
334 };
335 
344 
351 {
353  CharsetFormDefault = OCI_CSF_DEFAULT,
355  CharsetFormNational = OCI_CSF_NATIONAL
356 };
365 
366 
373 {
375  SeekSet = OCI_SEEK_SET,
377  SeekEnd = OCI_SEEK_END,
379  SeekOffset = OCI_SEEK_CUR
380 };
381 
390 
397 {
399  ReadOnly = OCI_LOB_READONLY,
401  ReadWrite = OCI_LOB_READWRITE
402 };
403 
412 
419 {
421  LobBinary = OCI_BLOB,
423  LobCharacter = OCI_CLOB,
425  LobNationalCharacter = OCI_NCLOB
426 };
427 
436 
437 
444 {
446  LongBinary = OCI_BLONG,
448  LongCharacter = OCI_CLONG
449 };
450 
459 
460 
467 {
469  FormatDate = OCI_FMT_DATE,
471  FormatTimestamp = OCI_FMT_TIMESTAMP,
473  FormatNumeric = OCI_FMT_NUMERIC,
475  FormatBinaryDouble = OCI_FMT_BINARY_DOUBLE,
477  FormatBinaryFloat = OCI_FMT_BINARY_FLOAT
478 };
479 
488 
497 class Exception : public std::exception
498 {
499  template<class TResultType>
500  friend TResultType Check(TResultType result);
501  friend class Statement;
502 
503 public:
504 
511  {
513  OracleError = OCI_ERR_ORACLE,
515  OcilibError = OCI_ERR_OCILIB,
517  OracleWarning = OCI_ERR_WARNING
518  };
519 
528 
534  ostring GetMessage() const;
535 
542  ExceptionType GetType() const;
543 
549  int GetOracleErrorCode() const;
550 
556  int GetInternalErrorCode() const;
557 
563  Statement GetStatement() const;
564 
570  Connection GetConnection() const;
571 
584  unsigned int GetRow() const;
585 
594  virtual const char *what() const throw();
595 
601  virtual ~Exception() throw ();
602 
603 private:
604 
605  Exception();
606  Exception(OCI_Error *err);
607 
608  std::string _what;
609  OCI_Statement *_pStatement;
610  OCI_Connection *_pConnnection;
611  unsigned int _row;
612  ExceptionType _type;
613  unsigned int _errLib;
614  unsigned int _errOracle;
615 };
616 
623 {
624  friend class Mutex;
625  friend class Connection;
626  friend class Pool;
627  friend class Subscription;
628  friend class Dequeue;
629  template<class THandleType>
630  friend class HandleHolder;
631 
632 public:
633 
640  {
642  SourceInstance = OCI_HES_INSTANCE,
644  SourceDatabase = OCI_HES_DATABASE,
646  SourceNode = OCI_HES_NODE,
648  SourceService = OCI_HES_SERVICE,
650  SourceServiceMember = OCI_HES_SERVICE_MEMBER,
652  SourceASMInstance = OCI_HES_ASM_INSTANCE,
654  SourcePreConnect = OCI_HES_PRECONNECT
655  };
656 
665 
672  {
674  EventDown = OCI_HET_DOWN,
676  EventUp = OCI_HET_UP
677  };
678 
687 
694  {
696  Default = OCI_ENV_DEFAULT,
698  Threaded = OCI_ENV_THREADED,
700  Events = OCI_ENV_EVENTS
701  };
702 
711 
718  {
720  ImportLinkage = OCI_IMPORT_MODE_LINKAGE,
722  ImportRuntime = OCI_IMPORT_MODE_RUNTIME
723  };
724 
733 
740  {
742  CharsetAnsi = OCI_CHAR_ANSI,
744  CharsetWide = OCI_CHAR_WIDE
745  };
746 
755 
762  {
764  SessionDefault = OCI_SESSION_DEFAULT,
766  SessionXa = OCI_SESSION_XA,
768  SessionSysDba = OCI_SESSION_SYSDBA,
770  SessionSysOper = OCI_SESSION_SYSOPER
771  };
772 
781 
788  {
790  StartOnly = OCI_DB_SPM_START,
792  StartMount = OCI_DB_SPM_MOUNT,
794  StartOpen = OCI_DB_SPM_OPEN,
796  StartFull = OCI_DB_SPM_FULL
797  };
798 
807 
814  {
816  StartDefault = OCI_DB_SPF_DEFAULT,
818  StartForce = OCI_DB_SPF_FORCE,
820  StartRestrict = OCI_DB_SPF_RESTRICT
821  };
822 
831 
838  {
840  ShutdownOnly = OCI_DB_SDM_SHUTDOWN,
842  ShutdownClose = OCI_DB_SDM_CLOSE,
844  ShutdownDismount = OCI_DB_SDM_DISMOUNT,
846  ShutdownFull = OCI_DB_SDM_FULL
847  };
848 
857 
864  {
867  ShutdowntDefault = OCI_DB_SDF_DEFAULT,
870  ShutdowTrans = OCI_DB_SDF_TRANS,
874  ShutdownTransLocal = OCI_DB_SDF_TRANS_LOCAL,
877  ShutdownImmediate = OCI_DB_SDF_IMMEDIATE,
883  ShutdownAbort = OCI_DB_SDF_ABORT
884  };
885 
894 
902  typedef void(*HAHandlerProc) (Connection &con, HAEventSource eventSource, HAEventType eventType, Timestamp &time);
903 
922  static void Initialize(EnvironmentFlags mode = Environment::Default, const ostring& libpath = OTEXT(""));
923 
937  static void Cleanup();
938 
947  static Environment::EnvironmentFlags GetMode();
948 
954  static Environment::ImportMode GetImportMode();
955 
961  static Environment::CharsetMode GetCharset();
962 
968  static bool Initialized();
969 
980  static OracleVersion GetCompileVersion();
981 
987  static unsigned int GetCompileMajorVersion();
988 
994  static unsigned int GetCompileMinorVersion();
995 
1001  static unsigned int GetCompileRevisionVersion();
1002 
1012  static OracleVersion GetRuntimeVersion();
1013 
1019  static unsigned int GetRuntimeMajorVersion();
1020 
1026  static unsigned int GetRuntimeMinorVersion();
1027 
1033  static unsigned int GetRuntimeRevisionVersion();
1034 
1045  static void EnableWarnings(bool value);
1046 
1078  static bool SetFormat(FormatType formatType, const ostring& format);
1079 
1090  static ostring GetFormat(FormatType formatType);
1091 
1118  static void StartDatabase(const ostring &db, const ostring &user, const ostring& pwd,
1119  Environment::StartFlags startFlags,
1120  Environment::StartMode startMode,
1121  Environment::SessionFlags sessionFlags = SessionSysDba,
1122  const ostring& spfile = OTEXT(""));
1123 
1149  static void ShutdownDatabase(const ostring& db, const ostring& user, const ostring& pwd,
1150  Environment::ShutdownFlags shutdownFlags,
1151  Environment::ShutdownMode shutdownMode,
1152  Environment::SessionFlags sessionFlags = SessionSysDba);
1153 
1164  static void ChangeUserPassword(const ostring& db, const ostring& user, const ostring& pwd, const ostring& newPwd);
1165 
1182  static void SetHAHandler(HAHandlerProc handler);
1183 
1184 private:
1185 
1186  class EnvironmentHandle : HandleHolder < AnyPointer >
1187  {
1188  friend class Environment;
1189  };
1190 
1191  static void HAHandler(OCI_Connection *pConnection, unsigned int source, unsigned int event, OCI_Timestamp *pTimestamp);
1192  static unsigned int TAFHandler(OCI_Connection *pConnection, unsigned int type, unsigned int event);
1193  static void NotifyHandler(OCI_Event *pEvent);
1194  static void NotifyHandlerAQ(OCI_Dequeue *pDequeue);
1195 
1196  template <class TCallbackType>
1197  static TCallbackType GetUserCallback(AnyPointer ptr);
1198 
1199  template <class TCallbackType>
1200  static void SetUserCallback(AnyPointer ptr, TCallbackType callback);
1201 
1202  template <class THandleType>
1203  static void SetSmartHandle(AnyPointer ptr, THandleType handle);
1204 
1205  template <class THandleType>
1206  static THandleType GetSmartHandle(AnyPointer ptr);
1207 
1208  static Handle * GetEnvironmentHandle();
1209 
1210  static Environment& GetInstance();
1211 
1212  Environment();
1213 
1214  void SelfInitialize(EnvironmentFlags mode, const ostring& libpath);
1215  void SelfCleanup();
1216 
1217  Locker _locker;
1218  EnvironmentHandle _handle;
1219  ConcurrentMap<AnyPointer, Handle *> _handles;
1220  ConcurrentMap<AnyPointer, CallbackPointer> _callbacks;
1221  EnvironmentFlags _mode;
1222  bool _initialized;
1223 };
1224 
1235 class Thread
1236 {
1237 public:
1238 
1246 
1255  static ThreadHandle Create();
1256 
1264  static void Destroy(ThreadHandle handle);
1265 
1275  static void Run(ThreadHandle handle, ThreadProc func, void *args);
1276 
1287  static void Join(ThreadHandle handle);
1288 
1296  static ThreadId GetThreadId(ThreadHandle handle);
1297 };
1298 
1308 class Mutex
1309 {
1310 public:
1311 
1320  static MutexHandle Create();
1321 
1329  static void Destroy(MutexHandle handle);
1330 
1338  static void Acquire(MutexHandle handle);
1339 
1347  static void Release(MutexHandle handle);
1348 };
1349 
1361 {
1362 public:
1363 
1371 
1384  static void Create(const ostring& name, ThreadKeyFreeProc freeProc = 0);
1385 
1394  static void SetValue(const ostring& name, AnyPointer value);
1395 
1406  static AnyPointer GetValue(const ostring& name);
1407 };
1408 
1416 class Pool : public HandleHolder<OCI_Pool *>
1417 {
1418 public:
1419 
1426  {
1428  ConnectionPool = OCI_POOL_CONNECTION,
1430  SessionPool = OCI_POOL_SESSION
1431  };
1432 
1441 
1447  Pool();
1448 
1466  Pool(const ostring& db, const ostring& user, const ostring& pwd, Pool::PoolType poolType,
1467  unsigned int minSize, unsigned int maxSize, unsigned int increment = 1,
1469 
1488  void Open(const ostring& db, const ostring& user, const ostring& pwd, Pool::PoolType poolType,
1489  unsigned int minSize, unsigned int maxSize, unsigned int increment = 1,
1491 
1497  void Close();
1498 
1527  Connection GetConnection(const ostring& sessionTag = OTEXT(""));
1528 
1540  unsigned int GetTimeout() const;
1541 
1555  void SetTimeout(unsigned int value);
1556 
1566  bool GetNoWait() const;
1567 
1580  void SetNoWait(bool value);
1581 
1587  unsigned int GetBusyConnectionsCount() const;
1588 
1594  unsigned int GetOpenedConnectionsCount() const;
1595 
1601  unsigned int GetMinSize() const;
1602 
1608  unsigned int GetMaxSize() const;
1609 
1615  unsigned int GetIncrement() const;
1616 
1625  unsigned int GetStatementCacheSize() const;
1626 
1634  void SetStatementCacheSize(unsigned int value);
1635 };
1636 
1644 class Connection : public HandleHolder<OCI_Connection *>
1645 {
1646  friend class Environment;
1647  friend class Exception;
1648  friend class Statement;
1649  friend class File;
1650  friend class Timestamp;
1651  friend class Pool;
1652  friend class Object;
1653  friend class TypeInfo;
1654  friend class Reference;
1655  friend class Resultset;
1656  friend class Subscription;
1657 
1658  template<class TLobObjectType, int TLobOracleType>
1659  friend class Lob;
1660  template <class TDataType>
1661  friend class Collection;
1662 public:
1663 
1670  {
1672  FailoverRequestSession = OCI_FOT_SESSION,
1674  FailoverRequestSelect = OCI_FOT_SELECT
1675  };
1676 
1685 
1692  {
1694  FailoverEventEnd = OCI_FOE_END,
1696  FailoverEventAbort = OCI_FOE_ABORT,
1698  FailoverEventReauthentificate = OCI_FOE_REAUTH,
1700  FailoverEventBegin = OCI_FOE_BEGIN,
1702  FailoverEventError = OCI_FOE_ERROR
1703  };
1704 
1713 
1720  {
1722  FailoverOk = OCI_FOC_OK,
1724  FailoverRetry = OCI_FOC_RETRY
1725  };
1726 
1735 
1742  {
1744  TraceIdentity = OCI_TRC_IDENTITY,
1746  TraceModule = OCI_TRC_MODULE,
1748  TraceAction = OCI_TRC_ACTION,
1750  TraceDetail = OCI_TRC_DETAIL
1751  };
1752 
1761 
1769  typedef FailoverResult(*TAFHandlerProc) (Connection &con, FailoverRequest failoverRequest, FailoverEvent failoverEvent);
1770 
1776  Connection();
1777 
1791  Connection(const ostring& db, const ostring& user, const ostring& pwd, Environment::SessionFlags sessionFlags = Environment::SessionDefault);
1792 
1835  void Open(const ostring& db, const ostring& user, const ostring& pwd, Environment::SessionFlags sessionFlags = Environment::SessionDefault);
1836 
1842  void Close();
1843 
1849  void Commit();
1850 
1856  void Rollback();
1857 
1866  void Break();
1867 
1875  void SetAutoCommit(bool enabled);
1876 
1882  bool GetAutoCommit() const;
1883 
1892  bool IsServerAlive() const;
1893 
1902  bool PingServer() const;
1903 
1912  ostring GetConnectionString() const;
1913 
1922  ostring GetUserName() const;
1923 
1932  ostring GetPassword() const;
1933 
1942  ostring GetServerVersion() const;
1943 
1952  OracleVersion GetVersion() const;
1953 
1959  unsigned int GetServerMajorVersion() const;
1960 
1966  unsigned int GetServerMinorVersion() const;
1967 
1973  unsigned int GetServerRevisionVersion() const;
1974 
1982  void ChangePassword(const ostring& newPwd);
1983 
1989  ostring GetSessionTag() const;
1990 
2005  void SetSessionTag(const ostring& tag);
2006 
2012  Transaction GetTransaction() const;
2013 
2027  void SetTransaction(const Transaction &transaction);
2028 
2060  bool SetFormat(FormatType formatType, const ostring& format);
2061 
2072  ostring GetFormat(FormatType formatType);
2073 
2093  void EnableServerOutput(unsigned int bufsize, unsigned int arrsize, unsigned int lnsize);
2094 
2103  void DisableServerOutput();
2104 
2113  bool GetServerOutput(ostring &line) const;
2114 
2120  void GetServerOutput(std::vector<ostring> &lines) const;
2121 
2122 
2151  void SetTrace(SessionTrace trace, const ostring& value);
2152 
2163  ostring GetTrace(SessionTrace trace) const;
2164 
2173  ostring GetDatabase() const;
2174 
2183  ostring GetInstance() const;
2184 
2193  ostring GetService() const;
2194 
2203  ostring GetServer() const;
2204 
2213  ostring GetDomain() const;
2214 
2223  Timestamp GetInstanceStartTime() const;
2224 
2236  unsigned int GetStatementCacheSize() const;
2237 
2248  void SetStatementCacheSize(unsigned int value);
2249 
2266  unsigned int GetDefaultLobPrefetchSize() const;
2267 
2292  void SetDefaultLobPrefetchSize(unsigned int value);
2293 
2302  bool IsTAFCapable() const;
2303 
2317  void SetTAFHandler(TAFHandlerProc handler);
2318 
2324  AnyPointer GetUserData();
2325 
2333  void SetUserData(AnyPointer value);
2334 
2335 private:
2336 
2337  Connection(OCI_Connection *con, Handle *parent);
2338 };
2339 
2347 class Transaction : public HandleHolder<OCI_Transaction *>
2348 {
2349  friend class Connection;
2350 
2351 public:
2352 
2359  {
2360  Unknown = OCI_UNKNOWN,
2362  New = OCI_TRS_NEW,
2364  Tight = OCI_TRS_TIGHT,
2366  Loose = OCI_TRS_LOOSE,
2368  ReadOnly = OCI_TRS_READONLY,
2370  ReadWrite = OCI_TRS_READWRITE,
2372  Serializable = OCI_TRS_SERIALIZABLE
2373  };
2374 
2383 
2397  Transaction(const Connection &connection, unsigned int timeout, TransactionFlags flags, OCI_XID *pxid = NULL);
2398 
2404  void Prepare();
2405 
2411  void Start();
2412 
2418  void Stop();
2419 
2425  void Resume();
2426 
2432  void Forget();
2433 
2442  TransactionFlags GetFlags() const;
2443 
2449  unsigned int GetTimeout() const;
2450 
2451 private:
2452 
2453  Transaction(OCI_Transaction *trans);
2454 };
2455 
2463 class Date : public HandleHolder<OCI_Date *>, public Streamable
2464 {
2465  friend class Statement;
2466  friend class Resultset;
2467  friend class BindArray;
2468  friend class Object;
2469  template <class TDataType>
2470  friend class Collection;
2471  friend class Message;
2472 
2473 public:
2474 
2480  static Date SysDate();
2481 
2487  Date();
2488 
2503  Date(const ostring& str, const ostring& format = OTEXT(""));
2504 
2510  bool IsValid() const;
2511 
2517  int GetYear() const;
2518 
2524  void SetYear(int value);
2525 
2531  int GetMonth() const;
2532 
2538  void SetMonth(int value);
2539 
2545  int GetDay() const;
2546 
2552  void SetDay(int value);
2553 
2559  int GetHours() const;
2560 
2566  void SetHours(int value);
2567 
2573  int GetMinutes() const;
2574 
2580  void SetMinutes(int value);
2581 
2587  int GetSeconds() const;
2588 
2594  void SetSeconds(int value);
2595 
2603  int DaysBetween(const Date& other) const;
2604 
2614  void SetDate(int year, int month, int day);
2615 
2625  void SetTime(int hour, int min, int sec);
2626 
2639  void SetDateTime(int year, int month, int day, int hour, int min, int sec);
2640 
2650  void GetDate(int &year, int &month, int &day) const;
2651 
2661  void GetTime(int &hour, int &min, int &sec) const;
2662 
2675  void GetDateTime(int &year, int &month, int &day, int &hour, int &min, int &sec) const;
2676 
2684  void AddDays(int days);
2685 
2693  void AddMonths(int months);
2694 
2702  Date NextDay(const ostring& day) const;
2703 
2709  Date LastDay() const;
2710 
2719  void ChangeTimeZone(const ostring& tzSrc, const ostring& tzDst);
2720 
2735  void FromString(const ostring& str, const ostring& format = OTEXT(""));
2736 
2747  ostring ToString(const ostring& format) const;
2748 
2757  ostring ToString() const;
2758 
2764  Date Clone() const;
2765 
2771  Date& operator ++ ();
2772 
2778  Date operator ++ (int);
2779 
2785  Date& operator -- ();
2786 
2792  Date operator -- (int);
2793 
2799  Date operator + (int value);
2800 
2806  Date operator - (int value);
2807 
2813  Date& operator += (int value);
2814 
2820  Date& operator -= (int value);
2821 
2827  bool operator == (const Date& other) const;
2828 
2834  bool operator != (const Date& other) const;
2835 
2841  bool operator > (const Date& other) const;
2842 
2848  bool operator < (const Date& other) const;
2849 
2855  bool operator >= (const Date& other) const;
2856 
2862  bool operator <= (const Date& other) const;
2863 
2864 private:
2865 
2866  int Compare(const Date& other) const;
2867 
2868  Date(OCI_Date *pDate, Handle *parent = 0);
2869 
2870  void Allocate();
2871 };
2872 
2880 class Interval : public HandleHolder<OCI_Interval *>, public Streamable
2881 {
2882  friend class Environment;
2883  friend class Statement;
2884  friend class Resultset;
2885  friend class BindArray;
2886  friend class Object;
2887  template <class TDataType>
2888  friend class Collection;
2889 
2890 public:
2891 
2898  {
2900  YearMonth = OCI_INTERVAL_YM,
2902  DaySecond = OCI_INTERVAL_DS
2903  };
2904 
2913 
2919  Interval();
2920 
2928  Interval(IntervalType type);
2929 
2941  Interval(IntervalType type, const ostring& data);
2942 
2948  IntervalType GetType() const;
2949 
2955  bool IsValid() const;
2956 
2965  int GetYear() const;
2966 
2975  void SetYear(int value);
2976 
2985  int GetMonth() const;
2986 
2995  void SetMonth(int value);
2996 
3005  int GetDay() const;
3006 
3015  void SetDay(int value);
3016 
3025  int GetHours() const;
3026 
3035  void SetHours(int value);
3036 
3045  int GetMinutes() const;
3046 
3055  void SetMinutes(int value);
3056 
3065  int GetSeconds() const;
3066 
3075  void SetSeconds(int value);
3076 
3082  int GetMilliSeconds() const;
3083 
3089  void SetMilliSeconds(int value);
3090 
3105  void GetDaySecond(int &day, int &hour, int &min, int &sec, int &fsec) const;
3106 
3121  void SetDaySecond(int day, int hour, int min, int sec, int fsec);
3122 
3134  void GetYearMonth(int &year, int &month) const;
3135 
3147  void SetYearMonth(int year, int month);
3148 
3156  void UpdateTimeZone(const ostring& timeZone);
3157 
3168  void FromString(const ostring& data);
3169 
3178  ostring ToString(int leadingPrecision, int fractionPrecision) const;
3179 
3185  ostring ToString() const;
3186 
3192  Interval Clone() const;
3193 
3199  Interval operator + (const Interval& other);
3200 
3206  Interval operator - (const Interval& other);
3207 
3213  Interval& operator += (const Interval& other);
3214 
3220  Interval& operator -= (const Interval& other);
3221 
3227  bool operator == (const Interval& other) const;
3228 
3234  bool operator != (const Interval& other) const;
3235 
3241  bool operator > (const Interval& other) const;
3242 
3248  bool operator < (const Interval& other) const;
3249 
3255  bool operator >= (const Interval& other) const;
3256 
3262  bool operator <= (const Interval& other) const;
3263 
3264 private:
3265 
3266  int Compare(const Interval& other) const;
3267 
3268  Interval(OCI_Interval *pInterval, Handle *parent = 0);
3269 };
3270 
3279 class Timestamp : public HandleHolder<OCI_Timestamp *>, public Streamable
3280 {
3281  friend class Environment;
3282  friend class Statement;
3283  friend class Resultset;
3284  friend class BindArray;
3285  friend class Object;
3286  friend class Connection;
3287  template <class TDataType>
3288  friend class Collection;
3289 
3290 public:
3291 
3298  {
3300  NoTimeZone = OCI_TIMESTAMP,
3302  WithTimeZone = OCI_TIMESTAMP_TZ,
3304  WithLocalTimeZone = OCI_TIMESTAMP_LTZ
3305  };
3306 
3315 
3323  static Timestamp SysTimestamp(TimestampType type = NoTimeZone);
3324 
3330  Timestamp();
3331 
3339  Timestamp(TimestampType type);
3340 
3353  Timestamp(TimestampType type, const ostring& data, const ostring& format = OTEXT(""));
3354 
3360  TimestampType GetType() const;
3361 
3369  void Convert(const Timestamp& other);
3370 
3376  bool IsValid() const;
3377 
3383  int GetYear() const;
3384 
3390  void SetYear(int value);
3391 
3397  int GetMonth() const;
3398 
3404  void SetMonth(int value);
3405 
3411  int GetDay() const;
3412 
3418  void SetDay(int value);
3419 
3425  int GetHours() const;
3426 
3432  void SetHours(int value);
3433 
3439  int GetMinutes() const;
3440 
3446  void SetMinutes(int value);
3447 
3453  int GetSeconds() const;
3454 
3460  void SetSeconds(int value);
3461 
3467  int GetMilliSeconds() const;
3468 
3474  void SetMilliSeconds(int value);
3475 
3485  void GetDate(int &year, int &month, int &day) const;
3486 
3497  void GetTime(int &hour, int &min, int &sec, int &fsec) const;
3498 
3508  void SetDate(int year, int month, int day);
3509 
3520  void SetTime(int hour, int min, int sec, int fsec);
3521 
3535  void GetDateTime(int &year, int &month, int &day, int &hour, int &min, int &sec, int &fsec) const;
3536 
3551  void SetDateTime(int year, int month, int day, int hour, int min, int sec, int fsec, const ostring& timeZone = OTEXT(""));
3552 
3561  ostring GetTimeZone() const;
3562 
3572  void SetTimeZone(const ostring& timeZone);
3573 
3582  void GetTimeZoneOffset(int &hour, int &min) const;
3583 
3596  static void Substract(const Timestamp &lsh, const Timestamp &rsh, Interval &result);
3597 
3609  void FromString(const ostring& data, const ostring& format = OCI_STRING_FORMAT_DATE);
3610 
3622  ostring ToString(const ostring& format, int precision) const;
3623 
3629  ostring ToString() const;
3630 
3631 
3637  Timestamp Clone() const;
3638 
3644  Timestamp& operator ++ ();
3645 
3651  Timestamp operator ++ (int);
3652 
3658  Timestamp& operator -- ();
3659 
3665  Timestamp operator -- (int);
3666 
3672  Timestamp operator + (int value);
3673 
3679  Timestamp operator - (int value);
3680 
3686  Interval operator - (const Timestamp& other);
3687 
3693  Timestamp& operator += (int value);
3694 
3700  Timestamp& operator -= (int value);
3701 
3707  Timestamp operator + (const Interval& other);
3708 
3714  Timestamp operator - (const Interval& other);
3715 
3721  Timestamp& operator += (const Interval& other);
3722 
3728  Timestamp& operator -= (const Interval& other);
3729 
3735  bool operator == (const Timestamp& other) const;
3736 
3742  bool operator != (const Timestamp& other) const;
3743 
3749  bool operator > (const Timestamp& other) const;
3750 
3756  bool operator < (const Timestamp& other) const;
3757 
3763  bool operator >= (const Timestamp& other) const;
3764 
3770  bool operator <= (const Timestamp& other) const;
3771 
3772 private:
3773 
3774  int Compare(const Timestamp& other) const;
3775 
3776  Timestamp(OCI_Timestamp *pTimestamp, Handle *parent = 0);
3777 };
3778 
3786 template<class TLobObjectType, int TLobOracleType>
3787 class Lob : public HandleHolder<OCI_Lob *>
3788 {
3789  friend class Statement;
3790  friend class Resultset;
3791  friend class BindArray;
3792  friend class Object;
3793  template <class TDataType>
3794  friend class Collection;
3795 
3796 public:
3797 
3803  Lob();
3804 
3815  Lob(const Connection &connection);
3816 
3827  TLobObjectType Read(unsigned int length);
3828 
3839  unsigned int Write(const TLobObjectType &content);
3840 
3851  unsigned int Append(const TLobObjectType& content);
3852 
3860  void Append(const Lob& other);
3861 
3876  bool Seek(SeekMode seekMode, big_uint offset);
3877 
3883  LobType GetType() const;
3884 
3890  big_uint GetOffset() const;
3891 
3897  big_uint GetLength() const;
3898 
3904  big_uint GetMaxSize() const;
3905 
3917  big_uint GetChunkSize() const;
3918 
3924  Connection GetConnection() const;
3925 
3933  void Truncate(big_uint length);
3934 
3950  big_uint Erase(big_uint offset, big_uint length);
3951 
3965  void Copy(Lob &dest, big_uint offset, big_uint offsetDest, big_uint length) const;
3966 
3972  bool IsTemporary() const;
3973 
3986  void Open(OpenMode mode);
3987 
3993  void Flush();
3994 
4003  void Close();
4004 
4023  void EnableBuffering(bool value);
4024 
4030  Lob Clone() const;
4031 
4037  Lob& operator += (const Lob& other);
4038 
4044  bool operator == (const Lob& other) const;
4045 
4051  bool operator != (const Lob& other) const;
4052 
4053 private:
4054 
4055  bool Equals(const Lob &other) const;
4056 
4057  Lob(OCI_Lob *pLob, Handle *parent = 0);
4058 
4059 };
4060 
4071 
4082 
4093 
4102 class File : public HandleHolder<OCI_File *>
4103 {
4104  friend class Statement;
4105  friend class Resultset;
4106  friend class BindArray;
4107  friend class Object;
4108  template <class TDataType>
4109  friend class Collection;
4110 
4111 public:
4112 
4118  File();
4119 
4130  File(const Connection &connection);
4131 
4146  File(const Connection &connection, const ostring& directory, const ostring& name);
4147 
4158  Raw Read(unsigned int size);
4159 
4174  bool Seek(SeekMode seekMode, big_uint offset);
4175 
4184  bool Exists() const;
4185 
4191  big_uint GetOffset() const;
4192 
4198  big_uint GetLength() const;
4199 
4205  Connection GetConnection() const;
4206 
4219  void SetInfos(const ostring& directory, const ostring& name);
4220 
4226  ostring GetName() const;
4227 
4233  ostring GetDirectory() const;
4234 
4240  void Open();
4241 
4247  void Close();
4248 
4254  bool IsOpened() const;
4255 
4261  File Clone() const;
4262 
4268  bool operator == (const File& other) const;
4269 
4275  bool operator != (const File& other) const;
4276 
4277 private:
4278 
4279  bool Equals(const File &other) const;
4280 
4281  File(OCI_File *pFile, Handle *parent = 0);
4282 };
4283 
4291 class TypeInfo : public HandleHolder<OCI_TypeInfo *>
4292 {
4293  friend class Object;
4294  friend class Reference;
4295  template <class TDataType>
4296  friend class Collection;
4297  friend class Column;
4298 public:
4299 
4306  {
4308  Table = OCI_TIF_TABLE,
4310  View = OCI_TIF_VIEW,
4312  Type = OCI_TIF_TYPE
4313  };
4314 
4323 
4336  TypeInfo(const Connection &connection, const ostring& name, TypeInfoType type);
4337 
4343  TypeInfoType GetType() const;
4344 
4350  ostring GetName() const;
4351 
4357  Connection GetConnection() const;
4358 
4368  unsigned int GetColumnCount() const;
4369 
4384  Column GetColumn(unsigned int index) const;
4385 
4386 private:
4387 
4388  TypeInfo(OCI_TypeInfo *pTypeInfo);
4389 };
4390 
4398 class Object : public HandleHolder<OCI_Object *>, public Streamable
4399 {
4400  friend class Statement;
4401  friend class Resultset;
4402  friend class BindArray;
4403  friend class Reference;
4404  template <class TDataType>
4405  friend class Collection;
4406  friend class Message;
4407 
4408 public:
4409 
4416  {
4418  Persistent = OCI_OBJ_PERSISTENT,
4420  Transient = OCI_OBJ_TRANSIENT,
4422  Value = OCI_OBJ_VALUE
4423  };
4424 
4433 
4439  Object();
4440 
4448  Object(const TypeInfo &typeInfo);
4449 
4457  bool IsAttributeNull(const ostring& name) const;
4458 
4466  void SetAttributeNull(const ostring& name);
4467 
4473  TypeInfo GetTypeInfo() const;
4474 
4480  Reference GetReference() const;
4481 
4487  ObjectType GetType() const;
4488 
4501  template<class TDataType>
4502  TDataType Get(const ostring& name) const;
4503 
4517  template<class TDataType>
4518  void Get(const ostring& name, TDataType &value) const;
4519 
4533  template<class TDataType>
4534  void Get(const ostring& name, Collection<TDataType> &value) const;
4535 
4549  template<class TDataType>
4550  void Set(const ostring& name, const TDataType &value);
4551 
4557  Object Clone() const;
4558 
4564  ostring ToString() const;
4565 
4566 private:
4567 
4568  Object(OCI_Object *pObject, Handle *parent = 0);
4569 };
4570 
4578 class Reference : public HandleHolder<OCI_Ref *>, public Streamable
4579 {
4580  friend class Statement;
4581  friend class Resultset;
4582  friend class BindArray;
4583  friend class Object;
4584  template <class TDataType>
4585  friend class Collection;
4586 
4587 public:
4588 
4594  Reference();
4595 
4603  Reference(const TypeInfo &typeInfo);
4604 
4610  TypeInfo GetTypeInfo() const;
4611 
4620  Object GetObject() const;
4621 
4627  bool IsReferenceNull() const;
4628 
4637  void SetReferenceNull();
4638 
4644  Reference Clone() const;
4645 
4651  ostring ToString() const;
4652 
4653 private:
4654 
4655  Reference(OCI_Ref *pRef, Handle *parent = 0);
4656 };
4657 
4665 template <class TDataType>
4666 class Collection : public HandleHolder<OCI_Coll *>, public Streamable
4667 {
4668  friend class Statement;
4669  friend class Resultset;
4670  friend class BindArray;
4671  friend class Object;
4672  template <class TOtherDataType>
4673  friend class CollectionIterator;
4674 
4675  template <class TOtherDataType>
4676  friend class Collection;
4677 public:
4678 
4679  class Element;
4680  class Iterator;
4681 
4688  {
4690  Varray = OCI_COLL_VARRAY,
4692  NestedTable = OCI_COLL_NESTED_TABLE
4693  };
4694 
4703 
4709  Collection();
4710 
4718  Collection(const TypeInfo &typeInfo);
4719 
4725  CollectionType GetType() const;
4726 
4732  unsigned int GetMax() const;
4733 
4739  unsigned int GetSize() const;
4740 
4751  unsigned int GetCount() const;
4752 
4760  void Truncate(unsigned int size);
4761 
4768  void Clear();
4769 
4780  bool IsElementNull(unsigned int index) const;
4781 
4792  void SetElementNull(unsigned int index);
4793 
4811  bool Delete(unsigned int index) const;
4812 
4820  TDataType Get(unsigned int index) const;
4821 
4830  void Set(unsigned int index, const TDataType &value);
4831 
4840  void Append(const TDataType &data);
4841 
4847  TypeInfo GetTypeInfo() const;
4848 
4854  Collection Clone() const;
4855 
4861  ostring ToString() const;
4862 
4872  class Element
4873  {
4874  friend class Collection<TDataType>::Iterator;
4875 
4876  public:
4877  Element(Collection &coll, unsigned int pos);
4878  operator TDataType() const;
4879  Element& operator = (TDataType value);
4880  bool IsNull() const;
4881  void SetNull();
4882 
4883  private:
4884  Collection & _coll;
4885  unsigned int _pos;
4886  };
4887 
4893  class Iterator : public std::iterator<std::bidirectional_iterator_tag, TDataType>
4894  {
4895 
4896  public:
4897 
4898  Iterator(Collection &collection, unsigned int pos);
4899  Iterator(const Iterator& other);
4900 
4901  bool operator== (const Iterator& other);
4902  bool operator!= (const Iterator& other);
4903 
4904  Element& operator*();
4905 
4906  Iterator &operator--();
4907  Iterator operator--(int);
4908 
4909  Iterator &operator++();
4910  Iterator operator++(int);
4911 
4912  private:
4913 
4914  Element _elem;
4915  };
4916 
4923 
4929  Iterator begin();
4930 
4936  Iterator end();
4937 
4943  Element operator [] (unsigned int index);
4944 
4945 private:
4946 
4947  TDataType GetElem(OCI_Elem *elem, Handle *parent) const;
4948 
4949  void SetElem(OCI_Elem *elem, const TDataType &value);
4950 
4951  Collection(OCI_Coll *pColl, Handle *parent = 0);
4952 };
4953 
4961 template<class TLongObjectType, int TLongOracleType>
4962 class Long : public HandleHolder<OCI_Long *>
4963 {
4964  friend class Statement;
4965  friend class Resultset;
4966  friend class BindArray;
4967 
4968 public:
4969 
4970 
4976  Long();
4977 
4985  Long(const Statement &statement);
4986 
4997  unsigned int Write(const TLongObjectType& content);
4998 
5004  unsigned int GetLength() const;
5005 
5011  TLongObjectType GetContent() const;
5012 
5013 private:
5014 
5015  Long(OCI_Long *pLong, Handle *parent = 0);
5016 };
5017 
5025 class BindInfo : public HandleHolder<OCI_Bind *>
5026 {
5027  friend class Statement;
5028 
5029 public:
5030 
5037  {
5039  In = OCI_BDM_IN,
5041  Out = OCI_BDM_OUT,
5043  InOut = OCI_BDM_IN_OUT
5044  };
5045 
5054 
5060  ostring GetName() const;
5061 
5067  DataType GetType() const;
5068 
5088  unsigned int GetSubType() const;
5089 
5099  unsigned int GetDataCount() const;
5100 
5106  Statement GetStatement() const;
5107 
5128  void SetDataNull(bool value, unsigned int index = 1);
5129 
5144  bool IsDataNull(unsigned int index = 1) const;
5145 
5159  void SetCharsetForm(CharsetForm value);
5160 
5166  BindDirection GetDirection() const;
5167 
5168 private:
5169 
5170  BindInfo(OCI_Bind *pBind, Handle *parent);
5171 };
5172 
5180 class Statement : public HandleHolder<OCI_Statement *>
5181 {
5182  friend class Exception;
5183  friend class Resultset;
5184  template<class TLongObjectType, int TLongOracleType>
5185  friend class Long;
5186  friend class BindInfo;
5187  friend class BindObject;
5188 
5189 public:
5190 
5197  {
5199  TypeSelect = OCI_CST_SELECT,
5201  TypeUpdate = OCI_CST_UPDATE,
5203  TypeDelete = OCI_CST_DELETE,
5205  TypeInsert = OCI_CST_INSERT,
5207  TypeCreate = OCI_CST_CREATE,
5209  TypeDrop = OCI_CST_DROP,
5211  TypeAlter = OCI_CST_ALTER,
5213  TypeBegin = OCI_CST_BEGIN,
5215  TypeDeclare = OCI_CST_DECLARE,
5217  TypeCall = OCI_CST_CALL
5218  };
5219 
5228 
5235  {
5237  FetchForward = OCI_SFM_DEFAULT,
5239  FetchScrollable = OCI_SFM_SCROLLABLE
5240  };
5241 
5250 
5257  {
5259  BindByPosition = OCI_BIND_BY_POS,
5261  BindByName = OCI_BIND_BY_NAME
5262  };
5263 
5272 
5279  {
5281  LongExplicit = OCI_LONG_EXPLICIT,
5283  LongImplicit = OCI_LONG_IMPLICIT
5284  };
5285 
5294 
5300  Statement();
5301 
5312  Statement(const Connection &connection);
5313  ~Statement();
5319 
5325  Connection GetConnection() const;
5326 
5353  void Describe(const ostring& sql);
5354 
5378  void Parse(const ostring& sql);
5379 
5390  void Prepare(const ostring& sql);
5391 
5397  void ExecutePrepared();
5398 
5406  void Execute(const ostring& sql);
5407 
5425  template<class TFetchCallback>
5426  unsigned int ExecutePrepared(TFetchCallback callback);
5427 
5448  template<class TAdapter, class TFetchCallback>
5449  unsigned int ExecutePrepared(TFetchCallback callback, TAdapter adapter);
5450 
5469  template<class TFetchCallback>
5470  unsigned int Execute(const ostring& sql, TFetchCallback callback);
5471 
5493  template<class TAdapter, class TFetchCallback>
5494  unsigned int Execute(const ostring& sql, TFetchCallback callback, TAdapter adapter);
5495 
5510  unsigned int GetAffectedRows() const;
5511 
5517  ostring GetSql() const;
5518 
5530  Resultset GetResultset();
5531 
5553  Resultset GetNextResultset();
5554 
5579  void SetBindArraySize(unsigned int size);
5580 
5586  unsigned int GetBindArraySize() const;
5587 
5603  void AllowRebinding(bool value);
5604 
5613  bool IsRebindingAllowed() const;
5614 
5631  unsigned int GetBindIndex(const ostring& name) const;
5632 
5638  unsigned int GetBindCount() const;
5639 
5654  BindInfo GetBind(unsigned int index) const;
5655 
5666  BindInfo GetBind(const ostring& name) const;
5667 
5687  template <class TDataType>
5688  void Bind(const ostring& name, TDataType &value, BindInfo::BindDirection mode);
5689 
5711  template <class TDataType, class TExtraInfo>
5712  void Bind(const ostring& name, TDataType &value, TExtraInfo extraInfo, BindInfo::BindDirection mode);
5713 
5725  template <class TDataType>
5726  void Bind(const ostring& name, Collection<TDataType> &value, BindInfo::BindDirection mode);
5727 
5747  template <class TDataType>
5748  void Bind(const ostring& name, std::vector<TDataType> &values, BindInfo::BindDirection mode);
5749 
5769  template <class TDataType>
5770  void Bind(const ostring& name, std::vector<TDataType> &values, TypeInfo &typeInfo, BindInfo::BindDirection mode);
5771 
5784  template <class TDataType>
5785  void Bind(const ostring& name, std::vector<Collection<TDataType> > &values, TypeInfo &typeInfo, BindInfo::BindDirection mode);
5786 
5809  template <class TDataType, class TExtraInfo>
5810  void Bind(const ostring& name, std::vector<TDataType> &values, TExtraInfo extraInfo, BindInfo::BindDirection mode);
5811 
5832  template <class TDataType>
5833  void Register(const ostring& name);
5834 
5852  template <class TDataType, class TExtraInfo>
5853  void Register(const ostring& name, TExtraInfo& extraInfo);
5854 
5873  template <class TDataType, class TExtraInfo>
5874  void Register(const ostring& name, TExtraInfo extraInfo);
5875 
5881  StatementType GetStatementType() const;
5882 
5892  unsigned int GetSqlErrorPos() const;
5893 
5904  void SetFetchMode(FetchMode value);
5905 
5914  FetchMode GetFetchMode() const;
5915 
5923  void SetBindMode(BindMode value);
5924 
5933  BindMode GetBindMode() const;
5934 
5942  void SetFetchSize(unsigned int value);
5943 
5952  unsigned int GetFetchSize() const;
5953 
5964  void SetPrefetchSize(unsigned int value);
5965 
5974  unsigned int GetPrefetchSize() const;
5975 
5994  void SetPrefetchMemory(unsigned int value);
5995 
6004  unsigned int GetPrefetchMemory() const;
6005 
6013  void SetLongMaxSize(unsigned int value);
6014 
6023  unsigned int GetLongMaxSize() const;
6024 
6035  void SetLongMode(LongMode value);
6036 
6042  LongMode GetLongMode() const;
6043 
6056  unsigned int GetSQLCommand() const;
6057 
6070  ostring GetSQLVerb() const;
6071 
6077  void GetBatchErrors(std::vector<Exception> &exceptions);
6078 
6079 private:
6080 
6081  static bool IsResultsetHandle(Handle *handle);
6082 
6083  Statement(OCI_Statement *stmt, Handle *parent = 0);
6084 
6085  BindsHolder *GetBindsHolder(bool allocate);
6086 
6087  void ReleaseResultsets();
6088 
6089  void SetLastBindMode(BindInfo::BindDirection mode);
6090 
6091  void SetInData();
6092  void SetOutData();
6093  void ClearBinds();
6094 
6095  template <typename TBindMethod, class TDataType>
6096  void Bind (TBindMethod &method, const ostring& name, TDataType& value, BindInfo::BindDirection mode);
6097 
6098  template <typename TBindMethod, class TObjectType, class TDataType>
6099  void Bind (TBindMethod &method, const ostring& name, TObjectType &value, BindValue<TDataType> datatype, BindInfo::BindDirection mode);
6100 
6101  template <typename TBindMethod, class TObjectType, class TDataType>
6102  void Bind (TBindMethod &method, const ostring& name, std::vector<TObjectType> &values, BindValue<TDataType> datatype, BindInfo::BindDirection mode);
6103 
6104  template <typename TBindMethod, class TObjectType, class TDataType, class TElemType>
6105  void Bind (TBindMethod &method, const ostring& name, std::vector<TObjectType> &values, BindValue<TDataType> datatype, BindInfo::BindDirection mode, TElemType type);
6106 
6107  template<typename TFetchCallback>
6108  unsigned int Fetch(TFetchCallback callback);
6109 
6110  template<typename TAdapter, typename TFetchCallback>
6111  unsigned int Fetch(TFetchCallback callback, TAdapter adapter);
6112 };
6113 
6121 class Resultset : public HandleHolder<OCI_Resultset *>
6122 {
6123  friend class Statement;
6124 public:
6125 
6132  {
6134  SeekAbsolute = OCI_SFD_ABSOLUTE,
6136  SeekRelative = OCI_SFD_RELATIVE
6137  };
6138 
6147 
6160  template<class TDataType>
6161  TDataType Get(unsigned int index) const;
6162 
6176  template<class TDataType>
6177  void Get(unsigned int index, TDataType &value) const;
6178 
6191  template<class TDataType>
6192  TDataType Get(const ostring& name) const;
6193 
6204  template<class TDataType>
6205  void Get(const ostring &name, TDataType &value) const;
6206 
6221  template<class TDataType, class TAdapter>
6222  bool Get(TDataType& value, TAdapter adapter) const;
6223 
6239  template<typename TCallback>
6240  unsigned int ForEach(TCallback callback);
6241 
6264  template<typename TAdapter, typename TCallback>
6265  unsigned int ForEach(TCallback callback, TAdapter adapter);
6266 
6280  bool Next();
6281 
6295  bool Prev();
6296 
6308  bool First();
6309 
6321  bool Last();
6322 
6343  bool Seek(SeekMode mode, int offset);
6344 
6350  unsigned int GetCount() const;
6351 
6362  unsigned int GetCurrentRow() const;
6363 
6377  unsigned int GetColumnIndex(const ostring& name) const;
6378 
6384  unsigned int GetColumnCount() const;
6385 
6396  Column GetColumn(unsigned int index) const;
6397 
6408  Column GetColumn(const ostring& name) const;
6409 
6420  bool IsColumnNull(unsigned int index) const;
6421 
6429  bool IsColumnNull(const ostring& name) const;
6430 
6436  Statement GetStatement() const;
6437 
6443  bool operator ++ (int);
6444 
6450  bool operator -- (int);
6451 
6458  bool operator += (int offset);
6459 
6466  bool operator -= (int offset);
6467 
6468 private:
6469 
6470  Resultset(OCI_Resultset *resultset, Handle *parent);
6471 };
6472 
6480 class Column : public HandleHolder<OCI_Column *>
6481 {
6482  friend class TypeInfo;
6483  friend class Resultset;
6484 
6485 public:
6486 
6493  {
6495  NoFlags = OCI_CPF_NONE,
6498  IsIdentity = OCI_CPF_IS_IDENTITY,
6502  IsGeneratedAlways = OCI_CPF_IS_GEN_ALWAYS,
6505  IsGeneratedByDefaultOnNull = OCI_CPF_IS_GEN_BY_DEFAULT_ON_NULL
6506  };
6507 
6516 
6517  ostring GetName() const;
6518 
6527  ostring GetSQLType() const;
6528 
6538  ostring GetFullSQLType() const;
6539 
6545  DataType GetType() const;
6546 
6564  unsigned int GetSubType() const;
6565 
6571  CharsetForm GetCharsetForm() const;
6572 
6582  unsigned int GetSize() const;
6583 
6589  int GetScale() const;
6590 
6596  int GetPrecision() const;
6597 
6603  int GetFractionalPrecision() const;
6604 
6610  int GetLeadingPrecision() const;
6611 
6622  PropertyFlags GetPropertyFlags() const;
6623 
6629  bool IsNullable() const;
6630 
6640  bool IsCharSemanticUsed() const;
6641 
6651  TypeInfo GetTypeInfo() const;
6652 
6653 private:
6654 
6655  Column(OCI_Column *pColumn, Handle *parent);
6656 };
6657 
6668 class Subscription : public HandleHolder<OCI_Subscription *>
6669 {
6670  friend class Event;
6671 
6672 public:
6673 
6681  typedef void (*NotifyHandlerProc) (Event &evt);
6682 
6683 
6690  {
6692  ObjectChanges = OCI_CNT_OBJECTS,
6694  RowChanges = OCI_CNT_ROWS,
6696  DatabaseChanges = OCI_CNT_DATABASES,
6698  AllChanges = OCI_CNT_ALL
6699  };
6700 
6709 
6715  Subscription();
6716 
6732  void Register(const Connection &connection, const ostring& name, ChangeTypes changeTypes, NotifyHandlerProc handler, unsigned int port = 0, unsigned int timeout = 0);
6733 
6748  void Unregister();
6749 
6755  void Watch(const ostring& sql);
6756 
6762  ostring GetName() const;
6763 
6769  unsigned int GetTimeout() const;
6770 
6776  unsigned int GetPort() const;
6777 
6786  Connection GetConnection() const;
6787 
6788 private:
6789 
6790  Subscription(OCI_Subscription *pSubcription);
6791 };
6792 
6803 class Event : public HandleHolder<OCI_Event *>
6804 {
6805  friend class Subscription;
6806  friend class Environment;
6807 
6808 public:
6809 
6816  {
6818  DatabaseStart = OCI_ENT_STARTUP,
6820  DatabaseShutdown = OCI_ENT_SHUTDOWN,
6822  DatabaseShutdownAny = OCI_ENT_SHUTDOWN_ANY,
6824  DatabaseDrop = OCI_ENT_DROP_DATABASE,
6826  Unregister = OCI_ENT_DEREGISTER,
6828  ObjectChanged = OCI_ENT_OBJECT_CHANGED
6829  };
6830 
6839 
6846  {
6848  ObjectInserted = OCI_ONT_INSERT,
6850  ObjectUpdated = OCI_ONT_UPDATE,
6852  ObjectDeleted = OCI_ONT_DELETE,
6854  ObjectAltered = OCI_ONT_ALTER,
6856  ObjectDropped = OCI_ONT_DROP,
6858  ObjectGeneric = OCI_ONT_GENERIC
6859  };
6860 
6869 
6875  EventType GetType() const;
6876 
6885  ObjectEvent GetObjectEvent() const;
6886 
6892  ostring GetDatabaseName() const;
6893 
6902  ostring GetObjectName() const;
6903 
6909  ostring GetRowID() const;
6910 
6916  Subscription GetSubscription() const;
6917 
6918 private:
6919 
6920  Event(OCI_Event *pEvent);
6921 };
6922 
6923 
6931 class Agent : public HandleHolder<OCI_Agent *>
6932 {
6933  friend class Message;
6934  friend class Dequeue;
6935 
6936 public:
6937 
6960  Agent(const Connection &connection, const ostring& name = OTEXT(""), const ostring& address = OTEXT(""));
6961 
6967  ostring GetName() const;
6968 
6982  void SetName(const ostring& value);
6983 
6992  ostring GetAddress() const;
6993 
7007  void SetAddress(const ostring& value);
7008 
7009 private:
7010 
7011  Agent(OCI_Agent *pAgent, Handle *parent);
7012 };
7013 
7021 class Message : public HandleHolder<OCI_Msg *>
7022 {
7023  friend class Dequeue;
7024 
7025 public:
7026 
7033  {
7035  Ready = OCI_AMS_READY,
7037  Waiting = OCI_AMS_WAITING,
7039  Processed = OCI_AMS_PROCESSED,
7041  Expired = OCI_AMS_EXPIRED
7042  };
7043 
7052 
7082  Message(const TypeInfo &typeInfo);
7083 
7092  void Reset();
7093 
7099  template <class TPayloadType>
7100  TPayloadType GetPayload();
7101 
7109  template <class TPayloadType>
7110  void SetPayload(const TPayloadType &value);
7111 
7120  Date GetEnqueueTime() const;
7121 
7127  int GetAttemptCount() const;
7128 
7134  MessageState GetState() const;
7135 
7146  Raw GetID() const;
7147 
7156  int GetExpiration() const;
7157 
7177  void SetExpiration(int value);
7178 
7187  int GetEnqueueDelay() const;
7188 
7211  void SetEnqueueDelay(int value);
7212 
7221  int GetPriority() const;
7222 
7235  void SetPriority(int value);
7236 
7246  Raw GetOriginalID() const;
7247 
7259  void SetOriginalID(const Raw &value);
7260 
7269  ostring GetCorrelation() const;
7270 
7281  void SetCorrelation(const ostring& value);
7282 
7296  ostring GetExceptionQueue() const;
7297 
7324  void SetExceptionQueue(const ostring& value);
7325 
7334  Agent GetSender() const;
7335 
7343  void SetSender(const Agent &agent);
7344 
7356  void SetConsumers(std::vector<Agent> &agents);
7357 
7358 private:
7359 
7360  Message(OCI_Msg *pMessage, Handle *parent);
7361 };
7362 
7370 class Enqueue : public HandleHolder<OCI_Enqueue *>
7371 {
7372 public:
7373 
7380  {
7382  Before = OCI_ASD_BEFORE,
7384  OnTop = OCI_ASD_TOP
7385  };
7386 
7395 
7402  {
7404  Immediate = OCI_AMV_IMMEDIATE,
7406  OnCommit = OCI_AMV_ON_COMMIT
7407  };
7408 
7417 
7439  Enqueue(const TypeInfo &typeInfo, const ostring& queueName);
7440 
7448  void Put(const Message &message);
7449 
7458  EnqueueVisibility GetVisibility() const;
7459 
7470  void SetVisibility(EnqueueVisibility value);
7471 
7480  EnqueueMode GetMode() const;
7481 
7500  void SetMode(EnqueueMode value);
7501 
7512  Raw GetRelativeMsgID() const;
7513 
7527  void SetRelativeMsgID(const Raw &value);
7528 };
7529 
7537 class Dequeue : public HandleHolder<OCI_Dequeue *>
7538 {
7539  friend class Environment;
7540 
7541 public:
7542 
7550  typedef void (*NotifyAQHandlerProc) (Dequeue &dequeue);
7551 
7558  {
7560  Browse = OCI_ADM_BROWSE,
7562  Locked = OCI_ADM_LOCKED,
7564  Remove = OCI_ADM_REMOVE,
7566  Confirm = OCI_ADM_REMOVE_NODATA
7567  };
7568 
7577 
7584  {
7586  Immediate = OCI_AMV_IMMEDIATE,
7588  OnCommit = OCI_AMV_ON_COMMIT
7589  };
7590 
7599 
7606  {
7608  FirstMessage = OCI_ADN_FIRST_MSG,
7610  NextMessage = OCI_ADN_NEXT_MSG,
7613  NextTransaction = OCI_ADN_NEXT_TRANSACTION
7614  };
7615 
7624 
7633  Dequeue(const TypeInfo &typeInfo, const ostring& queueName);
7634 
7648  Message Get();
7649 
7665  Agent Listen(int timeout);
7666 
7675  ostring GetConsumer() const;
7676 
7688  void SetConsumer(const ostring& value);
7689 
7698  ostring GetCorrelation() const;
7699 
7711  void SetCorrelation(const ostring& value);
7712 
7721  Raw GetRelativeMsgID() const;
7722 
7730  void SetRelativeMsgID(const Raw &value);
7731 
7740  DequeueVisibility GetVisibility() const;
7741 
7756  void SetVisibility(DequeueVisibility value);
7757 
7766  DequeueMode GetMode() const;
7767 
7778  void SetMode(DequeueMode value);
7779 
7788  NavigationMode GetNavigation() const;
7789 
7809  void SetNavigation(NavigationMode value);
7810 
7819  int GetWaitTime() const;
7820 
7838  void SetWaitTime(int value);
7839 
7847  void SetAgents(std::vector<Agent> &agents);
7848 
7865  void Subscribe(unsigned int port, unsigned int timeout, NotifyAQHandlerProc handler);
7866 
7875  void Unsubscribe();
7876 
7877 private:
7878 
7879  Dequeue(OCI_Dequeue *pDequeue);
7880 };
7881 
7887 class Queue
7888 {
7889 public:
7890 
7897  {
7899  NormalQueue = OCI_AQT_NORMAL,
7901  ExceptionQueue = OCI_AQT_EXCEPTION,
7903  NonPersistentQueue = OCI_AQT_NON_PERSISTENT
7904  };
7905 
7914 
7939  static void Create(const Connection &connection, const ostring& queue, const ostring& table, QueueType type = NormalQueue,
7940  unsigned int maxRetries = 0, unsigned int retryDelay = 0, unsigned int retentionTime = 0,
7941  bool dependencyTracking = false, const ostring& comment = OTEXT(""));
7942 
7963  static void Alter(const Connection &connection, const ostring& queue,
7964  unsigned int maxRetries= 0, unsigned int retryDelay= 0,
7965  unsigned int retentionTime= 0, const ostring& comment = OTEXT(""));
7966 
7982  static void Drop(const Connection &connection, const ostring& queue);
7983 
8001  static void Start(const Connection &connection, const ostring& queue, bool enableEnqueue = true, bool enableDequeue = true);
8002 
8021  static void Stop(const Connection &connection, const ostring& queue, bool stopEnqueue = true, bool stopDequeue = true, bool wait = true);
8022 };
8023 
8030 {
8031 public:
8032 
8040  {
8042  None = OCI_AGM_NONE,
8045  Transactionnal = OCI_AGM_TRANSACTIONNAL
8046  };
8047 
8056 
8064  {
8066  Buffered = OCI_APM_BUFFERED,
8068  Persistent = OCI_APM_PERSISTENT,
8070  All = OCI_APM_ALL
8071  };
8072 
8081 
8116  static void Create(const Connection &connection, const ostring& table, const ostring& payloadType, bool multipleConsumers,
8117  const ostring& storageClause = OTEXT(""), const ostring& sortList = OTEXT(""),
8118  GroupingMode groupingMode = None, const ostring& comment = OTEXT(""),
8119  unsigned int primaryInstance = 0, unsigned int secondaryInstance = 0,
8120  const ostring& compatible = OTEXT(""));
8121 
8140  static void Alter(const Connection &connection, const ostring& table, const ostring& comment, unsigned int primaryInstance = 0, unsigned int secondaryInstance = 0);
8141 
8162  static void Drop(const Connection &connection, const ostring& table, bool force = true);
8163 
8187  static void Purge(const Connection &connection, const ostring& table, PurgeMode mode, const ostring& condition = OTEXT(""), bool block = true);
8188 
8206  static void Migrate(const Connection &connection, const ostring& table, const ostring& compatible = OTEXT(""));
8207 };
8208 
8216 class DirectPath : public HandleHolder<OCI_DirPath *>
8217 {
8218 public:
8219 
8226  {
8228  Default = OCI_DCM_DEFAULT,
8230  Force = OCI_DCM_FORCE
8231  };
8232 
8241 
8248  {
8250  ResultComplete = OCI_DPR_COMPLETE,
8252  ResultError = OCI_DPR_ERROR,
8254  ResultFull = OCI_DPR_FULL ,
8256  ResultPartial = OCI_DPR_PARTIAL,
8258  ResultEmpty = OCI_DPR_EMPTY
8259  };
8260 
8269 
8291  DirectPath(const TypeInfo &typeInfo, unsigned int nbCols, unsigned int nbRows, const ostring& partition = OTEXT(""));
8292 
8309  void SetColumn(unsigned int colIndex, const ostring& name, unsigned int maxSize, const ostring& format = OTEXT(""));
8310 
8341  template <class TDataType>
8342  void SetEntry(unsigned int rowIndex, unsigned int colIndex, const TDataType& value, bool complete = true);
8343 
8354  void Reset();
8355 
8361  void Prepare();
8362 
8381  DirectPath::Result Convert();
8382 
8394  DirectPath::Result Load();
8395 
8404  void Finish();
8405 
8418  void Abort();
8419 
8428  void Save();
8429 
8435  void FlushRow();
8436 
8448  void SetCurrentRows(unsigned int value);
8449 
8458  unsigned int GetCurrentRows() const;
8459 
8468  unsigned int GetMaxRows() const;
8469 
8478  unsigned int GetRowCount() const;
8479 
8492  unsigned int GetAffectedRows() const;
8493 
8507  void SetDateFormat(const ostring& format);
8508 
8535  void SetParallel(bool value);
8536 
8551  void SetNoLog(bool value);
8552 
8566  void SetCacheSize(unsigned int value);
8567 
8578  void SetBufferSize(unsigned int value);
8579 
8593  void SetConversionMode(ConversionMode value);
8594 
8623  unsigned int GetErrorColumn();
8624 
8658  unsigned int GetErrorRow();
8659 };
8660 
8661 }
8662 
8663 #include "ocilib_impl.hpp"
8664 
8665 
8666 #endif
8667 
struct OCI_Mutex OCI_Mutex
OCILIB encapsulation of OCI mutexes.
Definition: ocilib.h:710
struct OCI_Agent OCI_Agent
OCILIB encapsulation of A/Q Agent.
Definition: ocilib.h:770
CharsetModeValues
Charset mode enumerated values.
Definition: ocilib.hpp:739
Encapsulate a Resultset column or object member properties.
Definition: ocilib.hpp:6480
Lob< Raw, LobBinary > Blob
Class handling BLOB oracle type.
Definition: ocilib.hpp:4092
DequeueVisibilityValues
Message visibility enumerated values.
Definition: ocilib.hpp:7583
Flags< SessionFlagsValues > SessionFlags
Sessions flags.
Definition: ocilib.hpp:780
struct OCI_Connection OCI_Connection
Oracle physical connection.
Definition: ocilib.h:443
Static class allowing to set/get thread local storage (TLS) values for a given unique key...
Definition: ocilib.hpp:1360
Exception class handling all OCILIB errors.
Definition: ocilib.hpp:497
int GetOracleErrorCode() const
Return the Oracle error code.
Provides SQL bind informations.
Definition: ocilib.hpp:5025
TypeInfoTypeValues
Type of object information enumerated values.
Definition: ocilib.hpp:4305
EventTypeValues
Event type enumerated values.
Definition: ocilib.hpp:6815
LobTypeValues
Lob types enumerated values.
Definition: ocilib.hpp:418
Enum< BindModeValues > BindMode
Bind Modes.
Definition: ocilib.hpp:5271
HAEventSourceValues
HA Event sources enumerated values.
Definition: ocilib.hpp:639
int GetInternalErrorCode() const
Return the OCILIB error code.
Enum< DequeueModeValues > DequeueMode
Dequeue mode.
Definition: ocilib.hpp:7576
Enum< PoolTypeValues > PoolType
Type of Pool.
Definition: ocilib.hpp:1440
Enum< CharsetFormValues > CharsetForm
Type of charsetForm.
Definition: ocilib.hpp:364
FetchModeValues
Fetch Modes enumerated values.
Definition: ocilib.hpp:5234
HAEventTypeValues
HA Event types enumerated values.
Definition: ocilib.hpp:671
Class allowing the administration of Oracle Queues.
Definition: ocilib.hpp:7887
SessionTraceValues
Session trace enumerated values.
Definition: ocilib.hpp:1741
Enum< GroupingModeValues > GroupingMode
Grouping Mode.
Definition: ocilib.hpp:8055
Subscription Event.
Definition: ocilib.hpp:6803
StatementTypeValues
Statement Type enumerated values.
Definition: ocilib.hpp:5196
Enum< LobTypeValues > LobType
Type of Lob.
Definition: ocilib.hpp:435
Statement GetStatement() const
Return the statement within the error occurred.
Enum< DataTypeValues > DataType
Column data type.
Definition: ocilib.hpp:309
OCI_Mutex * MutexHandle
Alias for an OCI_Mutex pointer.
Definition: ocilib.hpp:200
struct OCI_XID OCI_XID
Global transaction identifier.
Object used for executing SQL or PL/SQL statement and returning the produced results.
Definition: ocilib.hpp:5180
A connection or session with a specific database.
Definition: ocilib.hpp:1644
Flags< PropertyFlagsValues > PropertyFlags
Column properties flags.
Definition: ocilib.hpp:6515
static class allowing to manipulate threads
Definition: ocilib.hpp:1235
PoolTypeValues
Pool type enumerated values.
Definition: ocilib.hpp:1425
struct OCI_Interval OCI_Interval
Oracle internal interval representation.
Definition: ocilib.h:609
Object identifying the SQL data type LONG.
Definition: ocilib.hpp:4962
friend TResultType Check(TResultType result)
Internal usage. Checks if the last OCILIB function call has raised an error. If so, it raises a C++ exception using the retrieved error handle.
Definition: ocilib_impl.hpp:53
struct OCI_Dequeue OCI_Dequeue
OCILIB encapsulation of A/Q dequeuing operations.
Definition: ocilib.h:780
Oracle Transaction object.
Definition: ocilib.hpp:2347
FailoverResultValues
Failover callback results enumerated values.
Definition: ocilib.hpp:1719
struct OCI_Statement OCI_Statement
Oracle SQL or PL/SQL statement.
Definition: ocilib.h:455
struct OCI_Bind OCI_Bind
Internal bind representation.
Definition: ocilib.h:467
Enum< ObjectTypeValues > ObjectType
Object Type.
Definition: ocilib.hpp:4432
LongTypeValues
Long types enumerated values.
Definition: ocilib.hpp:443
struct OCI_Subscription OCI_Subscription
OCILIB encapsulation of Oracle DCN notification.
Definition: ocilib.h:740
TimestampTypeValues
Interval types enumerated values.
Definition: ocilib.hpp:3297
StartFlagsValues
Oracle instance start flags enumerated values.
Definition: ocilib.hpp:813
Flags< ShutdownFlagsValues > ShutdownFlags
Oracle instance shutdown flags.
Definition: ocilib.hpp:893
AQ identified agent for messages delivery.
Definition: ocilib.hpp:6931
Static class allowing managing mutexes.
Definition: ocilib.hpp:1308
Enum< DequeueVisibilityValues > DequeueVisibility
Message visibility after begin dequeued.
Definition: ocilib.hpp:7598
Enum< OracleVersionValues > OracleVersion
Oracle Version.
Definition: ocilib.hpp:265
Oracle Direct path loading encapsulation.
Definition: ocilib.hpp:8216
Enum< EnqueueVisibilityValues > EnqueueVisibility
Message visibility after begin queued.
Definition: ocilib.hpp:7416
Class used for handling transient collection value. it is used internally by:
Definition: ocilib.hpp:4872
Enum< NavigationModeValues > NavigationMode
Navigation Mode.
Definition: ocilib.hpp:7623
struct OCI_Timestamp OCI_Timestamp
Oracle internal timestamp representation.
Definition: ocilib.h:599
Enum< EventTypeValues > EventType
Event type.
Definition: ocilib.hpp:6838
EnqueueModeValues
Message enqueuing mode enumerated values.
Definition: ocilib.hpp:7379
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:6708
Enum< ExceptionTypeValues > ExceptionType
Type of Exception.
Definition: ocilib.hpp:527
ConversionModeValues
Conversion mode enumerated values.
Definition: ocilib.hpp:8225
Flags< ShutdownModeValues > ShutdownMode
Oracle instance shutdown modes.
Definition: ocilib.hpp:856
Flags< EnvironmentFlagsValues > EnvironmentFlags
Environment Flags.
Definition: ocilib.hpp:710
ostring GetMessage() const
Retrieve the error message.
ShutdownModeValues
Oracle instance shutdown modes enumerated values.
Definition: ocilib.hpp:837
struct OCI_Msg OCI_Msg
OCILIB encapsulation of A/Q message.
Definition: ocilib.h:760
const void * ThreadId
Thread Unique ID.
Definition: ocilib.hpp:218
Object identifying the SQL data type REF.
Definition: ocilib.hpp:4578
Enum< IntervalTypeValues > IntervalType
Interval types.
Definition: ocilib.hpp:2912
SeekModeValues
Seek Modes enumerated values.
Definition: ocilib.hpp:372
Enum< StatementTypeValues > StatementType
Statement Type.
Definition: ocilib.hpp:5227
PurgeModeValues
Purge mode enumerated values.
Definition: ocilib.hpp:8063
Static class in charge of library initialization / cleanup.
Definition: ocilib.hpp:622
FailoverRequestValues
Failover request enumerated values.
Definition: ocilib.hpp:1669
Enum< ObjectEventValues > ObjectEvent
Object events.
Definition: ocilib.hpp:6868
FailoverEventValues
Failover events enumerated values.
Definition: ocilib.hpp:1691
struct OCI_Ref OCI_Ref
Oracle REF type representation.
Definition: ocilib.h:666
ChangeTypesValues
Subscription changes flags values.
Definition: ocilib.hpp:6689
Enum< SeekModeValues > SeekMode
Seek Modes.
Definition: ocilib.hpp:6146
Connection GetConnection() const
Return the connection within the error occurred.
void * AnyPointer
Alias for the generic void pointer.
Definition: ocilib.hpp:182
ExceptionType GetType() const
Return the Exception type.
Object identifying the SQL data type BFILE.
Definition: ocilib.hpp:4102
Object identifying the SQL data types VARRAY and NESTED TABLE.
Definition: ocilib.hpp:4666
Enum< MessageStateValues > MessageState
Message state.
Definition: ocilib.hpp:7051
struct OCI_Date OCI_Date
Oracle internal date representation.
Definition: ocilib.h:589
ResultValues
Direct Operation Result enumerated values.
Definition: ocilib.hpp:8247
Flags< StartFlagsValues > StartFlags
Oracle instance start flags.
Definition: ocilib.hpp:830
Object identifying the SQL data type INTERVAL.
Definition: ocilib.hpp:2880
Enum< FormatTypeValues > FormatType
Format type.
Definition: ocilib.hpp:487
CollectionTypeValues
Collection type enumerated values.
Definition: ocilib.hpp:4687
Enum< EnqueueModeValues > EnqueueMode
Message enqueuing mode.
Definition: ocilib.hpp:7394
struct OCI_Transaction OCI_Transaction
Oracle Transaction.
Definition: ocilib.h:557
POCI_THREADKEYDEST ThreadKeyFreeProc
Thread Key callback for freeing resources.
Definition: ocilib.hpp:1370
GroupingModeValues
Grouping mode enumerated values.
Definition: ocilib.hpp:8039
Class allowing the administration of Oracle Queue tables.
Definition: ocilib.hpp:8029
virtual const char * what() const
Override the std::exception::what() method.
Enum< LongModeValues > LongMode
LONG data type mapping modes.
Definition: ocilib.hpp:5293
Enum< TimestampTypeValues > TimestampType
Type of timestamp.
Definition: ocilib.hpp:3314
Enqueue object for queuing messages into an Oracle Queue.
Definition: ocilib.hpp:7370
struct OCI_Resultset OCI_Resultset
Collection of output columns from a select statement.
Definition: ocilib.h:482
SessionFlagsValues
Session flags enumerated values.
Definition: ocilib.hpp:761
TransactionFlagsValues
Transaction flags enumerated values.
Definition: ocilib.hpp:2358
Enum< FailoverEventValues > FailoverEvent
Failover events.
Definition: ocilib.hpp:1712
OpenModeValues
Open Modes enumerated values.
Definition: ocilib.hpp:396
Enum< FetchModeValues > FetchMode
Fetch Modes.
Definition: ocilib.hpp:5249
Enum< CollectionTypeValues > CollectionType
Collection type.
Definition: ocilib.hpp:4702
A connection or session Pool.
Definition: ocilib.hpp:1416
BindModeValues
Bind Modes enumerated values.
Definition: ocilib.hpp:5256
Enum< PurgeModeValues > PurgeMode
Purge mode.
Definition: ocilib.hpp:8080
Enum< HAEventSourceValues > HAEventSource
Source of HA events.
Definition: ocilib.hpp:664
BindDirectionValues
Bind direction enumerated values.
Definition: ocilib.hpp:5036
Enum< FailoverResultValues > FailoverResult
Failover callback results.
Definition: ocilib.hpp:1734
Iterator iterator
common iterator declaration
Definition: ocilib.hpp:4922
Enum< LongTypeValues > LongType
Type of Long.
Definition: ocilib.hpp:458
struct OCI_File OCI_File
Oracle External Large objects:
Definition: ocilib.h:542
struct OCI_Thread OCI_Thread
OCILIB encapsulation of OCI Threads.
Definition: ocilib.h:720
Enum< HAEventTypeValues > HAEventType
Type of HA events.
Definition: ocilib.hpp:686
ObjectEventValues
Object events enumerated values.
Definition: ocilib.hpp:6845
LongModeValues
LONG data type mapping modes enumerated values.
Definition: ocilib.hpp:5278
Abstract class allowing derived classes to be compatible with any type supporting the operator << oci...
Flags< StartModeValues > StartMode
Oracle instance start modes.
Definition: ocilib.hpp:806
ObjectTypeValues
Object Type enumerated values.
Definition: ocilib.hpp:4415
Enum< ConversionModeValues > ConversionMode
Conversion Mode.
Definition: ocilib.hpp:8240
STL compliant bi-directional iterator class.
Definition: ocilib.hpp:4893
Enum< NumericTypeValues > NumericType
Numeric data type.
Definition: ocilib.hpp:343
void * CallbackPointer
Alias used for storing user callback method pointers.
Definition: ocilib.hpp:227
Enum< CharsetModeValues > CharsetMode
Environment charset mode.
Definition: ocilib.hpp:754
Template class providing OCILIB handles auto memory, life cycle and scope management.
NumericTypeValues
Numeric type enumerated values.
Definition: ocilib.hpp:316
Enum< TypeInfoTypeValues > TypeInfoType
Type of object information.
Definition: ocilib.hpp:4322
OCI_Thread * ThreadHandle
Alias for an OCI_Thread pointer.
Definition: ocilib.hpp:209
Enum< ImportModeValues > ImportMode
OCI libraries import mode.
Definition: ocilib.hpp:732
CharsetFormValues
Charset form enumerated values.
Definition: ocilib.hpp:350
void(* POCI_THREADKEYDEST)(void *data)
Thread key destructor prototype.
Definition: ocilib.h:835
std::vector< unsigned char > Raw
C++ counterpart of SQL RAW data type.
Definition: ocilib.hpp:191
struct OCI_Long OCI_Long
Oracle Long data type.
Definition: ocilib.h:579
Provides type information on Oracle Database objects.
Definition: ocilib.hpp:4291
EnqueueVisibilityValues
Message visibility enumerated values.
Definition: ocilib.hpp:7401
struct OCI_TypeInfo OCI_TypeInfo
Type info metadata handle.
Definition: ocilib.h:676
NavigationModeValues
Navigation Mode enumerated values.
Definition: ocilib.hpp:7605
IntervalTypeValues
Interval types enumerated values.
Definition: ocilib.hpp:2897
POCI_THREAD ThreadProc
Thread callback.
Definition: ocilib.hpp:1245
ShutdownFlagsValues
Oracle instance shutdown flags enumerated values.
Definition: ocilib.hpp:863
DequeueModeValues
Dequeue mode enumerated values.
Definition: ocilib.hpp:7557
DataTypeValues
Data type enumerated values.
Definition: ocilib.hpp:272
ImportModeValues
OCI libraries import mode enumerated values.
Definition: ocilib.hpp:717
Enum< FailoverRequestValues > FailoverRequest
Failover requests.
Definition: ocilib.hpp:1684
Lob< ostring, LobNationalCharacter > NClob
Class handling NCLOB oracle type.
Definition: ocilib.hpp:4081
MessageStateValues
Message state enumerated values.
Definition: ocilib.hpp:7032
OracleVersionValues
Oracle Version enumerated values.
Definition: ocilib.hpp:245
Enum< SeekModeValues > SeekMode
Seek Modes.
Definition: ocilib.hpp:389
Object identifying the SQL data type LOB (CLOB, NCLOB and BLOB)
Definition: ocilib.hpp:3787
SeekModeValues
Seek Modes enumerated values.
Definition: ocilib.hpp:6131
Enum< ResultValues > Result
Direct Operation Result.
Definition: ocilib.hpp:8268
QueueTypeValues
Queue Type enumerated values.
Definition: ocilib.hpp:7896
unsigned int GetRow() const
Return the row index which caused an error during statement execution.
ExceptionTypeValues
Exception type enumerated values.
Definition: ocilib.hpp:510
Lob< ostring, LobCharacter > Clob
Class handling CLOB oracle type.
Definition: ocilib.hpp:4070
Enum< BindDirectionValues > BindDirection
Bind direction.
Definition: ocilib.hpp:5053
struct OCI_Coll OCI_Coll
Oracle Collections (VARRAYs and Nested Tables) representation.
Definition: ocilib.h:629
PropertyFlagsValues
Column properties flags values.
Definition: ocilib.hpp:6492
Enum< SessionTraceValues > SessionTrace
Session traces.
Definition: ocilib.hpp:1760
struct OCI_Elem OCI_Elem
Oracle Collection item representation.
Definition: ocilib.h:639
FormatTypeValues
Format type enumerated values.
Definition: ocilib.hpp:466
AQ message.
Definition: ocilib.hpp:7021
Database resultset.
Definition: ocilib.hpp:6121
Flags< TransactionFlagsValues > TransactionFlags
Transaction flags.
Definition: ocilib.hpp:2382
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:173
struct OCI_Object OCI_Object
Oracle Named types representation.
Definition: ocilib.h:619
StartModeValues
Oracle instance start modes enumerated values.
Definition: ocilib.hpp:787
struct OCI_Column OCI_Column
Oracle SQL Column and Type member representation.
Definition: ocilib.h:494
struct OCI_Error OCI_Error
Encapsulates an Oracle or OCILIB exception.
Definition: ocilib.h:700
Object identifying the SQL data type TIMESTAMP.
Definition: ocilib.hpp:3279
Enum< QueueTypeValues > QueueType
Queue Type.
Definition: ocilib.hpp:7913
Dequeue object for dequeuing messages into an Oracle Queue.
Definition: ocilib.hpp:7537
Object identifying the SQL data type OBJECT.
Definition: ocilib.hpp:4398
EnvironmentFlagsValues
Environment Flags enumerated values.
Definition: ocilib.hpp:693
struct OCI_Event OCI_Event
OCILIB encapsulation of Oracle DCN event.
Definition: ocilib.h:750
Subscription to database or objects changes.
Definition: ocilib.hpp:6668
struct OCI_Lob OCI_Lob
Oracle Internal Large objects:
Definition: ocilib.h:517
Object identifying the SQL data type DATE.
Definition: ocilib.hpp:2463
Enum< OpenModeValues > OpenMode
Open Modes.
Definition: ocilib.hpp:411