ocilib.hpp
/*
* OCILIB - C Driver for Oracle (C Wrapper for Oracle OCI)
*
* Website: http://www.ocilib.net
*
* Copyright (c) 2007-2017 Vincent ROGIER <vince.rogier@ocilib.net>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* IMPORTANT NOTICE
*
* This C++ header defines C++ wrapper classes around the OCILIB C API
* It requires a compatible version of OCILIB
*
*/
#ifndef OCILIBCPP_H_INCLUDED
#define OCILIBCPP_H_INCLUDED
/* includes */
#include <string>
#include <list>
#include <vector>
#include <iterator>
#include <cstddef>
extern "C"{
#include "ocilib.h"
}
namespace ocilib
{
typedef std::basic_string<otext, std::char_traits<otext>, std::allocator<otext> > ostring;
typedef void * AnyPointer;
typedef std::vector<unsigned char> Raw;
typedef OCI_Mutex * MutexHandle;
typedef OCI_Thread * ThreadHandle;
typedef const void * ThreadId;
typedef void * CallbackPointer;
}
/* Including core classes */
#include "ocilib_core.hpp"
/* Defining public classes */
namespace ocilib
{
enum OracleVersionValues
{
Oracle80 = OCI_8_0,
Oracle8i = OCI_8_1,
Oracle9iR1 = OCI_9_0,
Oracle9iR2 = OCI_9_2,
Oracle10gR1 = OCI_10_1,
Oracle10gR2 = OCI_10_2,
Oracle11gR1 = OCI_11_1,
Oracle11gR2 = OCI_11_2,
Oracle12cR1 = OCI_12_1
};
typedef Enum<OracleVersionValues> OracleVersion;
enum DataTypeValues
{
TypeNumeric = OCI_CDT_NUMERIC,
TypeDate = OCI_CDT_DATETIME,
TypeString = OCI_CDT_TEXT,
TypeLong = OCI_CDT_LONG,
TypeStatement = OCI_CDT_CURSOR,
TypeLob = OCI_CDT_LOB,
TypeFile = OCI_CDT_FILE,
TypeTimestamp = OCI_CDT_TIMESTAMP,
TypeInterval = OCI_CDT_INTERVAL,
TypeRaw = OCI_CDT_RAW,
TypeObject = OCI_CDT_OBJECT,
TypeCollection = OCI_CDT_COLLECTION,
TypeReference = OCI_CDT_REF,
TypeBoolean = OCI_CDT_BOOLEAN
};
typedef Enum<DataTypeValues> DataType;
enum NumericTypeValues
{
NumericShort = OCI_NUM_SHORT,
NumericInt = OCI_NUM_INT,
NumericBigInt = OCI_NUM_BIGINT,
NumericUnsignedShort = OCI_NUM_USHORT,
NumericUnsignedInt = OCI_NUM_UINT,
NumericUnsignedBigInt = OCI_NUM_BIGUINT,
NumericDouble = OCI_NUM_DOUBLE,
NumericFloat = OCI_NUM_FLOAT,
NumericNumber = OCI_NUM_NUMBER
};
typedef Enum<NumericTypeValues> NumericType;
enum CharsetFormValues
{
CharsetFormDefault = OCI_CSF_DEFAULT,
CharsetFormNational = OCI_CSF_NATIONAL
};
typedef Enum<CharsetFormValues> CharsetForm;
enum SeekModeValues
{
SeekSet = OCI_SEEK_SET,
SeekEnd = OCI_SEEK_END,
SeekOffset = OCI_SEEK_CUR
};
typedef Enum<SeekModeValues> SeekMode;
enum OpenModeValues
{
ReadOnly = OCI_LOB_READONLY,
ReadWrite = OCI_LOB_READWRITE
};
typedef Enum<OpenModeValues> OpenMode;
enum LobTypeValues
{
LobBinary = OCI_BLOB,
LobCharacter = OCI_CLOB,
LobNationalCharacter = OCI_NCLOB
};
typedef Enum<LobTypeValues> LobType;
enum LongTypeValues
{
LongBinary = OCI_BLONG,
LongCharacter = OCI_CLONG
};
typedef Enum<LongTypeValues> LongType;
enum FormatTypeValues
{
FormatDate = OCI_FMT_DATE,
FormatTimestamp = OCI_FMT_TIMESTAMP,
FormatNumeric = OCI_FMT_NUMERIC,
FormatBinaryDouble = OCI_FMT_BINARY_DOUBLE,
FormatBinaryFloat = OCI_FMT_BINARY_FLOAT
};
typedef Enum<FormatTypeValues> FormatType;
class Exception : public std::exception
{
template<class T>
friend T Check(T result);
friend class Statement;
public:
enum ExceptionTypeValues
{
OracleError = OCI_ERR_ORACLE,
OcilibError = OCI_ERR_OCILIB,
OracleWarning = OCI_ERR_WARNING
};
typedef Enum<ExceptionTypeValues> ExceptionType;
ostring GetMessage() const;
ExceptionType GetType() const;
int GetOracleErrorCode() const;
int GetInternalErrorCode() const;
Statement GetStatement() const;
Connection GetConnection() const;
unsigned int GetRow() const;
const char *what() const throw() override;
virtual ~Exception() throw ();
private:
Exception();
Exception(OCI_Error *err);
std::string _what;
OCI_Statement *_pStatement;
OCI_Connection *_pConnnection;
unsigned int _row;
ExceptionType _type;
int _errLib;
int _errOracle;
};
class Environment
{
friend class Mutex;
friend class Connection;
friend class Pool;
friend class Subscription;
friend class Dequeue;
template<class>
friend class HandleHolder;
public:
enum HAEventSourceValues
{
SourceInstance = OCI_HES_INSTANCE,
SourceDatabase = OCI_HES_DATABASE,
SourceNode = OCI_HES_NODE,
SourceService = OCI_HES_SERVICE,
SourceServiceMember = OCI_HES_SERVICE_MEMBER,
SourceASMInstance = OCI_HES_ASM_INSTANCE,
SourcePreConnect = OCI_HES_PRECONNECT
};
typedef Enum<HAEventSourceValues> HAEventSource;
enum HAEventTypeValues
{
EventDown = OCI_HET_DOWN,
EventUp = OCI_HET_UP
};
typedef Enum<HAEventTypeValues> HAEventType;
enum EnvironmentFlagsValues
{
Default = OCI_ENV_DEFAULT,
Threaded = OCI_ENV_THREADED,
Events = OCI_ENV_EVENTS
};
typedef Flags<EnvironmentFlagsValues> EnvironmentFlags;
enum ImportModeValues
{
ImportLinkage = OCI_IMPORT_MODE_LINKAGE,
ImportRuntime = OCI_IMPORT_MODE_RUNTIME
};
typedef Enum<ImportModeValues> ImportMode;
enum CharsetModeValues
{
CharsetAnsi = OCI_CHAR_ANSI,
CharsetWide = OCI_CHAR_WIDE
};
typedef Enum<CharsetModeValues> CharsetMode;
enum SessionFlagsValues
{
SessionDefault = OCI_SESSION_DEFAULT,
SessionXa = OCI_SESSION_XA,
SessionSysDba = OCI_SESSION_SYSDBA,
SessionSysOper = OCI_SESSION_SYSOPER
};
typedef Flags<SessionFlagsValues> SessionFlags;
enum StartModeValues
{
StartOnly = OCI_DB_SPM_START,
StartMount = OCI_DB_SPM_MOUNT,
StartOpen = OCI_DB_SPM_OPEN,
StartFull = OCI_DB_SPM_FULL
};
typedef Flags<StartModeValues> StartMode;
enum StartFlagsValues
{
StartDefault = OCI_DB_SPF_DEFAULT,
StartForce = OCI_DB_SPF_FORCE,
StartRestrict = OCI_DB_SPF_RESTRICT
};
typedef Flags<StartFlagsValues> StartFlags;
enum ShutdownModeValues
{
ShutdownOnly = OCI_DB_SDM_SHUTDOWN,
ShutdownClose = OCI_DB_SDM_CLOSE,
ShutdownDismount = OCI_DB_SDM_DISMOUNT,
ShutdownFull = OCI_DB_SDM_FULL
};
typedef Flags<ShutdownModeValues> ShutdownMode;
enum ShutdownFlagsValues
{
ShutdowntDefault = OCI_DB_SDF_DEFAULT,
ShutdowTrans = OCI_DB_SDF_TRANS,
ShutdownTransLocal = OCI_DB_SDF_TRANS_LOCAL,
ShutdownImmediate = OCI_DB_SDF_IMMEDIATE,
ShutdownAbort = OCI_DB_SDF_ABORT
};
typedef Flags<ShutdownFlagsValues> ShutdownFlags;
enum AllocatedBytesValues
{
OracleClientBytes = OCI_MEM_ORACLE,
OcilibBytes = OCI_MEM_OCILIB,
AllBytes = OCI_MEM_ALL
};
typedef Flags<AllocatedBytesValues> AllocatedBytesFlags;
typedef void(*HAHandlerProc) (Connection &con, HAEventSource eventSource, HAEventType eventType, Timestamp &time);
static void Initialize(EnvironmentFlags mode = Environment::Default, const ostring& libpath = OTEXT(""));
static void Cleanup();
static Environment::EnvironmentFlags GetMode();
static Environment::ImportMode GetImportMode();
static Environment::CharsetMode GetCharset();
static big_uint GetAllocatedBytes(AllocatedBytesFlags type);
static bool Initialized();
static OracleVersion GetCompileVersion();
static unsigned int GetCompileMajorVersion();
static unsigned int GetCompileMinorVersion();
static unsigned int GetCompileRevisionVersion();
static OracleVersion GetRuntimeVersion();
static unsigned int GetRuntimeMajorVersion();
static unsigned int GetRuntimeMinorVersion();
static unsigned int GetRuntimeRevisionVersion();
static void EnableWarnings(bool value);
static bool SetFormat(FormatType formatType, const ostring& format);
static ostring GetFormat(FormatType formatType);
static void StartDatabase(const ostring &db, const ostring &user, const ostring& pwd,
Environment::StartFlags startFlags,
Environment::StartMode startMode,
Environment::SessionFlags sessionFlags = SessionSysDba,
const ostring& spfile = OTEXT(""));
static void ShutdownDatabase(const ostring& db, const ostring& user, const ostring& pwd,
Environment::ShutdownFlags shutdownFlags,
Environment::ShutdownMode shutdownMode,
Environment::SessionFlags sessionFlags = SessionSysDba);
static void ChangeUserPassword(const ostring& db, const ostring& user, const ostring& pwd, const ostring& newPwd);
static void SetHAHandler(HAHandlerProc handler);
private:
class EnvironmentHandle : HandleHolder < AnyPointer >
{
friend class Environment;
};
static void HAHandler(OCI_Connection *pConnection, unsigned int source, unsigned int event, OCI_Timestamp *pTimestamp);
static unsigned int TAFHandler(OCI_Connection *pConnection, unsigned int type, unsigned int event);
static void NotifyHandler(OCI_Event *pEvent);
static void NotifyHandlerAQ(OCI_Dequeue *pDequeue);
template<class T>
static T GetUserCallback(AnyPointer ptr);
template<class T>
static void SetUserCallback(AnyPointer ptr, T callback);
template<class T>
static void SetSmartHandle(AnyPointer ptr, T handle);
template<class T>
static T GetSmartHandle(AnyPointer ptr);
static Handle * GetEnvironmentHandle();
static Environment& GetInstance();
Environment();
void SelfInitialize(EnvironmentFlags mode, const ostring& libpath);
void SelfCleanup();
Locker _locker;
EnvironmentHandle _handle;
ConcurrentMap<AnyPointer, Handle *> _handles;
ConcurrentMap<AnyPointer, CallbackPointer> _callbacks;
EnvironmentFlags _mode;
bool _initialized;
};
class Thread
{
public:
typedef POCI_THREAD ThreadProc;
static ThreadHandle Create();
static void Destroy(ThreadHandle handle);
static void Run(ThreadHandle handle, ThreadProc func, void *args);
static void Join(ThreadHandle handle);
static ThreadId GetThreadId(ThreadHandle handle);
};
class Mutex
{
public:
static MutexHandle Create();
static void Destroy(MutexHandle handle);
static void Acquire(MutexHandle handle);
static void Release(MutexHandle handle);
};
class ThreadKey
{
public:
typedef POCI_THREADKEYDEST ThreadKeyFreeProc;
static void Create(const ostring& name, ThreadKeyFreeProc freeProc = nullptr);
static void SetValue(const ostring& name, AnyPointer value);
static AnyPointer GetValue(const ostring& name);
};
class Pool : public HandleHolder<OCI_Pool *>
{
public:
enum PoolTypeValues
{
ConnectionPool = OCI_POOL_CONNECTION,
SessionPool = OCI_POOL_SESSION
};
typedef Enum<PoolTypeValues> PoolType;
Pool();
Pool(const ostring& db, const ostring& user, const ostring& pwd, Pool::PoolType poolType,
unsigned int minSize, unsigned int maxSize, unsigned int increment = 1,
Environment::SessionFlags sessionFlags = Environment::SessionDefault);
void Open(const ostring& db, const ostring& user, const ostring& pwd, Pool::PoolType poolType,
unsigned int minSize, unsigned int maxSize, unsigned int increment = 1,
Environment::SessionFlags sessionFlags = Environment::SessionDefault);
void Close();
Connection GetConnection(const ostring& sessionTag = OTEXT(""));
unsigned int GetTimeout() const;
void SetTimeout(unsigned int value);
bool GetNoWait() const;
void SetNoWait(bool value);
unsigned int GetBusyConnectionsCount() const;
unsigned int GetOpenedConnectionsCount() const;
unsigned int GetMinSize() const;
unsigned int GetMaxSize() const;
unsigned int GetIncrement() const;
unsigned int GetStatementCacheSize() const;
void SetStatementCacheSize(unsigned int value);
};
class Connection : public HandleHolder<OCI_Connection *>
{
friend class Environment;
friend class Exception;
friend class Statement;
friend class File;
friend class Timestamp;
friend class Pool;
friend class Object;
friend class TypeInfo;
friend class Reference;
friend class Resultset;
friend class Subscription;
template<class, int>
friend class Lob;
template<class>
friend class Collection;
public:
enum FailoverRequestValues
{
FailoverRequestSession = OCI_FOT_SESSION,
FailoverRequestSelect = OCI_FOT_SELECT
};
typedef Enum<FailoverRequestValues> FailoverRequest;
enum FailoverEventValues
{
FailoverEventEnd = OCI_FOE_END,
FailoverEventAbort = OCI_FOE_ABORT,
FailoverEventReauthentificate = OCI_FOE_REAUTH,
FailoverEventBegin = OCI_FOE_BEGIN,
FailoverEventError = OCI_FOE_ERROR
};
typedef Enum<FailoverEventValues> FailoverEvent;
enum FailoverResultValues
{
FailoverOk = OCI_FOC_OK,
FailoverRetry = OCI_FOC_RETRY
};
typedef Enum<FailoverResultValues> FailoverResult;
enum SessionTraceValues
{
TraceIdentity = OCI_TRC_IDENTITY,
TraceModule = OCI_TRC_MODULE,
TraceAction = OCI_TRC_ACTION,
TraceDetail = OCI_TRC_DETAIL
};
typedef Enum<SessionTraceValues> SessionTrace;
typedef FailoverResult(*TAFHandlerProc) (Connection &con, FailoverRequest failoverRequest, FailoverEvent failoverEvent);
Connection();
Connection(const ostring& db, const ostring& user, const ostring& pwd, Environment::SessionFlags sessionFlags = Environment::SessionDefault);
void Open(const ostring& db, const ostring& user, const ostring& pwd, Environment::SessionFlags sessionFlags = Environment::SessionDefault);
void Close();
void Commit();
void Rollback();
void Break();
void SetAutoCommit(bool enabled);
bool GetAutoCommit() const;
bool IsServerAlive() const;
bool PingServer() const;
ostring GetConnectionString() const;
ostring GetUserName() const;
ostring GetPassword() const;
ostring GetServerVersion() const;
OracleVersion GetVersion() const;
unsigned int GetServerMajorVersion() const;
unsigned int GetServerMinorVersion() const;
unsigned int GetServerRevisionVersion() const;
void ChangePassword(const ostring& newPwd);
ostring GetSessionTag() const;
void SetSessionTag(const ostring& tag);
Transaction GetTransaction() const;
void SetTransaction(const Transaction &transaction);
bool SetFormat(FormatType formatType, const ostring& format);
ostring GetFormat(FormatType formatType);
void EnableServerOutput(unsigned int bufsize, unsigned int arrsize, unsigned int lnsize);
void DisableServerOutput();
bool GetServerOutput(ostring &line) const;
void GetServerOutput(std::vector<ostring> &lines) const;
void SetTrace(SessionTrace trace, const ostring& value);
ostring GetTrace(SessionTrace trace) const;
ostring GetDatabase() const;
ostring GetInstance() const;
ostring GetService() const;
ostring GetServer() const;
ostring GetDomain() const;
Timestamp GetInstanceStartTime() const;
unsigned int GetStatementCacheSize() const;
void SetStatementCacheSize(unsigned int value);
unsigned int GetDefaultLobPrefetchSize() const;
void SetDefaultLobPrefetchSize(unsigned int value);
unsigned int GetMaxCursors() const;
bool IsTAFCapable() const;
void SetTAFHandler(TAFHandlerProc handler);
AnyPointer GetUserData();
void SetUserData(AnyPointer value);
private:
Connection(OCI_Connection *con, Handle *parent);
};
class Transaction : public HandleHolder<OCI_Transaction *>
{
friend class Connection;
public:
enum TransactionFlagsValues
{
Unknown = OCI_UNKNOWN,
New = OCI_TRS_NEW,
Tight = OCI_TRS_TIGHT,
Loose = OCI_TRS_LOOSE,
ReadOnly = OCI_TRS_READONLY,
ReadWrite = OCI_TRS_READWRITE,
Serializable = OCI_TRS_SERIALIZABLE
};
typedef Flags<TransactionFlagsValues> TransactionFlags;
Transaction(const Connection &connection, unsigned int timeout, TransactionFlags flags, OCI_XID *pxid = nullptr);
void Prepare();
void Start();
void Stop();
void Resume();
void Forget();
TransactionFlags GetFlags() const;
unsigned int GetTimeout() const;
private:
Transaction(OCI_Transaction *trans);
};
class Number : public HandleHolder<OCI_Number *>, public Streamable
{
friend class Statement;
friend class Resultset;
friend class BindArray;
friend class Object;
template<class>
friend class Collection;
public:
Number(bool create = false);
Number(const otext* str, const otext* format = OTEXT(""));
Number(const ostring& str, const ostring& format = OTEXT(""));
void FromString(const ostring& str, const ostring& format = OTEXT("")) const;
ostring ToString(const ostring& format) const;
ostring ToString() const override;
Number Clone() const;
Number& operator ++ ();
Number& operator -- ();
Number operator ++ (int);
Number operator -- (int);
bool operator == (const Number& other) const;
bool operator != (const Number& other) const;
bool operator > (const Number& other) const;
bool operator < (const Number& other) const;
bool operator >= (const Number& other) const;
bool operator <= (const Number& other) const;
template<class T>
Number& operator = (const T &lhs);
template<class T>
operator T() const;
template<class T>
Number operator - (const T &value);
template<class T>
Number operator + (const T &value);
template<class T>
Number operator * (const T &value);
template<class T>
Number operator / (const T &value);
template<class T>
Number& operator += (const T &value);
template<class T>
Number& operator -= (const T &value);
template<class T>
Number& operator *= (const T &value);
template<class T>
Number& operator /= (const T &value);
private:
Number(OCI_Number *pNumber, Handle *parent = nullptr);
void Allocate();
int Compare(const Number& other) const;
template<class T>
inline T GetValue() const;
template<class T>
Number& SetValue(const T &value);
template<class T>
void Add(const T &value);
template<class T>
void Sub(const T &value);
template<class T>
void Multiply(const T &value);
template<class T>
void Divide(const T &value);
Number& operator = (OCI_Number * &lhs);
};
class Date : public HandleHolder<OCI_Date *>, public Streamable
{
friend class Statement;
friend class Resultset;
friend class BindArray;
friend class Object;
template<class>
friend class Collection;
friend class Message;
public:
static Date SysDate();
Date(bool create = false);
Date(const otext* str, const otext* format = OTEXT(""));
Date(const ostring& str, const ostring& format = OTEXT(""));
bool IsValid() const;
int GetYear() const;
void SetYear(int value);
int GetMonth() const;
void SetMonth(int value);
int GetDay() const;
void SetDay(int value);
int GetHours() const;
void SetHours(int value);
int GetMinutes() const;
void SetMinutes(int value);
int GetSeconds() const;
void SetSeconds(int value);
int DaysBetween(const Date& other) const;
void SetDate(int year, int month, int day);
void SetTime(int hour, int min, int sec);
void SetDateTime(int year, int month, int day, int hour, int min, int sec);
void GetDate(int &year, int &month, int &day) const;
void GetTime(int &hour, int &min, int &sec) const;
void GetDateTime(int &year, int &month, int &day, int &hour, int &min, int &sec) const;
void AddDays(int days);
void AddMonths(int months);
Date NextDay(const ostring& day) const;
Date LastDay() const;
void ChangeTimeZone(const ostring& tzSrc, const ostring& tzDst);
void FromString(const ostring& str, const ostring& format = OTEXT(""));
ostring ToString(const ostring& format) const;
ostring ToString() const override;
Date Clone() const;
Date& operator ++ ();
Date operator ++ (int);
Date& operator -- ();
Date operator -- (int);
Date operator + (int value) const;
Date operator - (int value) const;
Date& operator += (int value);
Date& operator -= (int value);
bool operator == (const Date& other) const;
bool operator != (const Date& other) const;
bool operator > (const Date& other) const;
bool operator < (const Date& other) const;
bool operator >= (const Date& other) const;
bool operator <= (const Date& other) const;
private:
int Compare(const Date& other) const;
Date(OCI_Date *pDate, Handle *parent = nullptr);
void Allocate();
};
class Interval : public HandleHolder<OCI_Interval *>, public Streamable
{
friend class Environment;
friend class Statement;
friend class Resultset;
friend class BindArray;
friend class Object;
template<class>
friend class Collection;
public:
enum IntervalTypeValues
{
YearMonth = OCI_INTERVAL_YM,
DaySecond = OCI_INTERVAL_DS
};
typedef Enum<IntervalTypeValues> IntervalType;
Interval();
Interval(IntervalType type);
Interval(IntervalType type, const ostring& data);
IntervalType GetType() const;
bool IsValid() const;
int GetYear() const;
void SetYear(int value);
int GetMonth() const;
void SetMonth(int value);
int GetDay() const;
void SetDay(int value);
int GetHours() const;
void SetHours(int value);
int GetMinutes() const;
void SetMinutes(int value);
int GetSeconds() const;
void SetSeconds(int value);
int GetMilliSeconds() const;
void SetMilliSeconds(int value);
void GetDaySecond(int &day, int &hour, int &min, int &sec, int &fsec) const;
void SetDaySecond(int day, int hour, int min, int sec, int fsec);
void GetYearMonth(int &year, int &month) const;
void SetYearMonth(int year, int month);
void UpdateTimeZone(const ostring& timeZone);
void FromString(const ostring& data);
ostring ToString(int leadingPrecision, int fractionPrecision) const;
ostring ToString() const override;
Interval Clone() const;
Interval operator + (const Interval& other) const;
Interval operator - (const Interval& other) const;
Interval& operator += (const Interval& other);
Interval& operator -= (const Interval& other);
bool operator == (const Interval& other) const;
bool operator != (const Interval& other) const;
bool operator > (const Interval& other) const;
bool operator < (const Interval& other) const;
bool operator >= (const Interval& other) const;
bool operator <= (const Interval& other) const;
private:
int Compare(const Interval& other) const;
Interval(OCI_Interval *pInterval, Handle *parent = nullptr);
};
class Timestamp : public HandleHolder<OCI_Timestamp *>, public Streamable
{
friend class Environment;
friend class Statement;
friend class Resultset;
friend class BindArray;
friend class Object;
friend class Connection;
template<class>
friend class Collection;
public:
enum TimestampTypeValues
{
NoTimeZone = OCI_TIMESTAMP,
WithTimeZone = OCI_TIMESTAMP_TZ,
WithLocalTimeZone = OCI_TIMESTAMP_LTZ
};
typedef Enum<TimestampTypeValues> TimestampType;
static Timestamp SysTimestamp(TimestampType type = NoTimeZone);
Timestamp();
Timestamp(TimestampType type);
Timestamp(TimestampType type, const ostring& data, const ostring& format = OTEXT(""));
TimestampType GetType() const;
void Convert(const Timestamp& other);
bool IsValid() const;
int GetYear() const;
void SetYear(int value);
int GetMonth() const;
void SetMonth(int value);
int GetDay() const;
void SetDay(int value);
int GetHours() const;
void SetHours(int value);
int GetMinutes() const;
void SetMinutes(int value);
int GetSeconds() const;
void SetSeconds(int value);
int GetMilliSeconds() const;
void SetMilliSeconds(int value);
void GetDate(int &year, int &month, int &day) const;
void GetTime(int &hour, int &min, int &sec, int &fsec) const;
void SetDate(int year, int month, int day);
void SetTime(int hour, int min, int sec, int fsec);
void GetDateTime(int &year, int &month, int &day, int &hour, int &min, int &sec, int &fsec) const;
void SetDateTime(int year, int month, int day, int hour, int min, int sec, int fsec, const ostring& timeZone = OTEXT(""));
ostring GetTimeZone() const;
void SetTimeZone(const ostring& timeZone);
void GetTimeZoneOffset(int &hour, int &min) const;
static void Substract(const Timestamp &lsh, const Timestamp &rsh, Interval &result);
void FromString(const ostring& data, const ostring& format = OCI_STRING_FORMAT_DATE);
ostring ToString(const ostring& format, int precision) const;
ostring ToString() const override;
Timestamp Clone() const;
Timestamp& operator ++ ();
Timestamp operator ++ (int);
Timestamp& operator -- ();
Timestamp operator -- (int);
Timestamp operator + (int value) const;
Timestamp operator - (int value) const;
Interval operator - (const Timestamp& other);
Timestamp& operator += (int value);
Timestamp& operator -= (int value);
Timestamp operator + (const Interval& other) const;
Timestamp operator - (const Interval& other) const;
Timestamp& operator += (const Interval& other);
Timestamp& operator -= (const Interval& other);
bool operator == (const Timestamp& other) const;
bool operator != (const Timestamp& other) const;
bool operator > (const Timestamp& other) const;
bool operator < (const Timestamp& other) const;
bool operator >= (const Timestamp& other) const;
bool operator <= (const Timestamp& other) const;
private:
int Compare(const Timestamp& other) const;
Timestamp(OCI_Timestamp *pTimestamp, Handle *parent = nullptr);
};
template<class T, int U>
class Lob : public HandleHolder<OCI_Lob *>
{
friend class Statement;
friend class Resultset;
friend class BindArray;
friend class Object;
template<class>
friend class Collection;
public:
Lob();
Lob(const Connection &connection);
T Read(unsigned int length);
unsigned int Write(const T &content);
unsigned int Append(const T& content);
void Append(const Lob& other);
bool Seek(SeekMode seekMode, big_uint offset);
LobType GetType() const;
big_uint GetOffset() const;
big_uint GetLength() const;
big_uint GetMaxSize() const;
big_uint GetChunkSize() const;
Connection GetConnection() const;
void Truncate(big_uint length);
big_uint Erase(big_uint offset, big_uint length);
void Copy(Lob &dest, big_uint offset, big_uint offsetDest, big_uint length) const;
bool IsTemporary() const;
void Open(OpenMode mode);
void Flush();
void Close();
void EnableBuffering(bool value);
Lob Clone() const;
Lob& operator += (const Lob& other);
bool operator == (const Lob& other) const;
bool operator != (const Lob& other) const;
private:
bool Equals(const Lob &other) const;
Lob(OCI_Lob *pLob, Handle *parent = nullptr);
};
typedef Lob<ostring, LobCharacter> Clob;
typedef Lob<ostring, LobNationalCharacter> NClob;
typedef Lob<Raw, LobBinary> Blob;
class File : public HandleHolder<OCI_File *>
{
friend class Statement;
friend class Resultset;
friend class BindArray;
friend class Object;
template<class>
friend class Collection;
public:
File();
File(const Connection &connection);
File(const Connection &connection, const ostring& directory, const ostring& name);
Raw Read(unsigned int size);
bool Seek(SeekMode seekMode, big_uint offset);
bool Exists() const;
big_uint GetOffset() const;
big_uint GetLength() const;
Connection GetConnection() const;
void SetInfos(const ostring& directory, const ostring& name);
ostring GetName() const;
ostring GetDirectory() const;
void Open();
void Close();
bool IsOpened() const;
File Clone() const;
bool operator == (const File& other) const;
bool operator != (const File& other) const;
private:
bool Equals(const File &other) const;
File(OCI_File *pFile, Handle *parent = nullptr);
};
class TypeInfo : public HandleHolder<OCI_TypeInfo *>
{
friend class Object;
friend class Reference;
template<class>
friend class Collection;
friend class Column;
public:
enum TypeInfoTypeValues
{
Table = OCI_TIF_TABLE,
View = OCI_TIF_VIEW,
Type = OCI_TIF_TYPE
};
typedef Enum<TypeInfoTypeValues> TypeInfoType;
TypeInfo(const Connection &connection, const ostring& name, TypeInfoType type);
TypeInfoType GetType() const;
ostring GetName() const;
Connection GetConnection() const;
unsigned int GetColumnCount() const;
Column GetColumn(unsigned int index) const;
private:
TypeInfo(OCI_TypeInfo *pTypeInfo);
};
class Object : public HandleHolder<OCI_Object *>, public Streamable
{
friend class Statement;
friend class Resultset;
friend class BindArray;
friend class Reference;
template<class>
friend class Collection;
friend class Message;
public:
enum ObjectTypeValues
{
Persistent = OCI_OBJ_PERSISTENT,
Transient = OCI_OBJ_TRANSIENT,
Value = OCI_OBJ_VALUE
};
typedef Enum<ObjectTypeValues> ObjectType;
Object();
Object(const TypeInfo &typeInfo);
bool IsAttributeNull(const ostring& name) const;
void SetAttributeNull(const ostring& name);
TypeInfo GetTypeInfo() const;
Reference GetReference() const;
ObjectType GetType() const;
template<class T>
T Get(const ostring& name) const;
template<class T>
void Get(const ostring& name, T &value) const;
template<class T>
void Get(const ostring& name, Collection<T> &value) const;
template<class T>
void Set(const ostring& name, const T &value);
Object Clone() const;
ostring ToString() const;
private:
Object(OCI_Object *pObject, Handle *parent = nullptr);
};
class Reference : public HandleHolder<OCI_Ref *>, public Streamable
{
friend class Statement;
friend class Resultset;
friend class BindArray;
friend class Object;
template<class>
friend class Collection;
public:
Reference();
Reference(const TypeInfo &typeInfo);
TypeInfo GetTypeInfo() const;
Object GetObject() const;
bool IsReferenceNull() const;
void SetReferenceNull();
Reference Clone() const;
ostring ToString() const override;
private:
Reference(OCI_Ref *pRef, Handle *parent = nullptr);
};
template<class T>
class CollectionElement
{
template<class>
friend class CollectionIterator;
public:
typedef T ValueType;
typedef Collection<ValueType> CollectionType;
CollectionElement();
CollectionElement(CollectionType *coll, unsigned int pos);
operator T() const;
CollectionElement& operator = (const ValueType& value);
CollectionElement& operator = (const CollectionElement& other);
bool IsNull() const;
void SetNull();
private:
CollectionType* _coll;
unsigned int _pos;
};
template<class T>
class CollectionIterator
{
public:
template<class>
friend class Collection;
typedef typename T::ValueType value_type;
typedef Collection<value_type> CollectionType;
typedef std::random_access_iterator_tag iterator_category;
typedef ptrdiff_t difference_type;
typedef ptrdiff_t distance_type;
typedef value_type* pointer;
typedef value_type& reference;
CollectionIterator();
CollectionIterator(const CollectionIterator& other);
CollectionIterator& operator = (const CollectionIterator& other);
CollectionIterator& operator += (difference_type value);
CollectionIterator& operator -= (difference_type value);
T& operator*();
T* operator->();
CollectionIterator& operator++();
CollectionIterator& operator--();
CollectionIterator operator++(int);
CollectionIterator operator--(int);
CollectionIterator operator + (difference_type value);
CollectionIterator operator - (difference_type value);
difference_type operator - (const CollectionIterator &other);
bool operator == (const CollectionIterator& other);
bool operator != (const CollectionIterator& other);
bool operator > (const CollectionIterator& other);
bool operator < (const CollectionIterator& other);
bool operator >= (const CollectionIterator& other);
bool operator <= (const CollectionIterator& other);
protected:
CollectionIterator(CollectionType *collection, unsigned int pos);
T _elem;
};
template<class T>
class Collection : public HandleHolder<OCI_Coll *>, public Streamable
{
friend class Statement;
friend class Resultset;
friend class BindArray;
friend class Object;
template<class>
friend class CollectionIterator;
template<class>
friend class Collection;
public:
enum CollectionTypeValues
{
Varray = OCI_COLL_VARRAY,
NestedTable = OCI_COLL_NESTED_TABLE,
IndexedTable = OCI_COLL_INDEXED_TABLE
};
typedef Enum<CollectionTypeValues> CollectionType;
Collection();
Collection(const TypeInfo &typeInfo);
CollectionType GetType() const;
unsigned int GetMax() const;
unsigned int GetSize() const;
unsigned int GetCount() const;
void Truncate(unsigned int size);
void Clear();
bool IsElementNull(unsigned int index) const;
void SetElementNull(unsigned int index);
bool Delete(unsigned int index) const;
T Get(unsigned int index) const;
void Set(unsigned int index, const T &value);
void Append(const T &data);
TypeInfo GetTypeInfo() const;
Collection Clone() const;
ostring ToString() const override;
typedef CollectionIterator<CollectionElement<T> > iterator;
typedef CollectionIterator<const CollectionElement<T> > const_iterator;
iterator begin();
const_iterator begin() const;
iterator end();
const_iterator end() const;
CollectionElement<T> operator [] (unsigned int index);
const CollectionElement<T> operator [] (unsigned int index) const;
private:
static T GetElem(OCI_Elem *elem, Handle *parent);
static void SetElem(OCI_Elem *elem, const T &value);
Collection(OCI_Coll *pColl, Handle *parent = nullptr);
};
template<class T, int U>
class Long : public HandleHolder<OCI_Long *>
{
friend class Statement;
friend class Resultset;
friend class BindArray;
public:
Long();
Long(const Statement &statement);
unsigned int Write(const T& content);
unsigned int GetLength() const;
T GetContent() const;
private:
Long(OCI_Long *pLong, Handle *parent = nullptr);
};
class BindInfo : public HandleHolder<OCI_Bind *>
{
friend class Statement;
public:
enum BindDirectionValues
{
In = OCI_BDM_IN,
Out = OCI_BDM_OUT,
InOut = OCI_BDM_IN_OUT
};
typedef Enum<BindDirectionValues> BindDirection;
ostring GetName() const;
DataType GetType() const;
unsigned int GetSubType() const;
unsigned int GetDataCount() const;
Statement GetStatement() const;
void SetDataNull(bool value, unsigned int index = 1);
bool IsDataNull(unsigned int index = 1) const;
void SetCharsetForm(CharsetForm value);
BindDirection GetDirection() const;
private:
BindInfo(OCI_Bind *pBind, Handle *parent);
};
class Statement : public HandleHolder<OCI_Statement *>
{
friend class Exception;
friend class Resultset;
template<class, int>
friend class Long;
friend class BindInfo;
friend class BindObject;
public:
enum StatementTypeValues
{
TypeSelect = OCI_CST_SELECT,
TypeUpdate = OCI_CST_UPDATE,
TypeDelete = OCI_CST_DELETE,
TypeInsert = OCI_CST_INSERT,
TypeCreate = OCI_CST_CREATE,
TypeDrop = OCI_CST_DROP,
TypeAlter = OCI_CST_ALTER,
TypeBegin = OCI_CST_BEGIN,
TypeDeclare = OCI_CST_DECLARE,
TypeCall = OCI_CST_CALL
};
typedef Enum<StatementTypeValues> StatementType;
enum FetchModeValues
{
FetchForward = OCI_SFM_DEFAULT,
FetchScrollable = OCI_SFM_SCROLLABLE
};
typedef Enum<FetchModeValues> FetchMode;
enum BindModeValues
{
BindByPosition = OCI_BIND_BY_POS,
BindByName = OCI_BIND_BY_NAME
};
typedef Enum<BindModeValues> BindMode;
enum LongModeValues
{
LongExplicit = OCI_LONG_EXPLICIT,
LongImplicit = OCI_LONG_IMPLICIT
};
typedef Enum<LongModeValues> LongMode;
Statement();
Statement(const Connection &connection);
Connection GetConnection() const;
void Describe(const ostring& sql);
void Parse(const ostring& sql);
void Prepare(const ostring& sql);
void ExecutePrepared();
void Execute(const ostring& sql);
template<class T>
unsigned int ExecutePrepared(T callback);
template<class T, class U>
unsigned int ExecutePrepared(T callback, U adapter);
template<class T>
unsigned int Execute(const ostring& sql, T callback);
template<class T, class U>
unsigned int Execute(const ostring& sql, T callback, U adapter);
unsigned int GetAffectedRows() const;
ostring GetSql() const;
Resultset GetResultset();
Resultset GetNextResultset();
void SetBindArraySize(unsigned int size);
unsigned int GetBindArraySize() const;
void AllowRebinding(bool value);
bool IsRebindingAllowed() const;
unsigned int GetBindIndex(const ostring& name) const;
unsigned int GetBindCount() const;
BindInfo GetBind(unsigned int index) const;
BindInfo GetBind(const ostring& name) const;
template<class T>
void Bind(const ostring& name, T &value, BindInfo::BindDirection mode);
template<class T, class U>
void Bind(const ostring& name, T &value,U extraInfo, BindInfo::BindDirection mode);
template<class T>
void Bind(const ostring& name, Collection<T> &value, BindInfo::BindDirection mode);
template<class T>
void Bind(const ostring& name, std::vector<T> &values, BindInfo::BindDirection mode);
template<class T>
void Bind(const ostring& name, std::vector<T> &values, TypeInfo &typeInfo, BindInfo::BindDirection mode);
template<class T>
void Bind(const ostring& name, std::vector<Collection<T> > &values, TypeInfo &typeInfo, BindInfo::BindDirection mode);
template<class T, class U>
void Bind(const ostring& name, std::vector<T> &values, U extraInfo, BindInfo::BindDirection mode);
template<class T>
void Register(const ostring& name);
template<class T, class U>
void Register(const ostring& name, U& extraInfo);
template<class T, class U>
void Register(const ostring& name, U extraInfo);
StatementType GetStatementType() const;
unsigned int GetSqlErrorPos() const;
void SetFetchMode(FetchMode value);
FetchMode GetFetchMode() const;
void SetBindMode(BindMode value);
BindMode GetBindMode() const;
void SetFetchSize(unsigned int value);
unsigned int GetFetchSize() const;
void SetPrefetchSize(unsigned int value);
unsigned int GetPrefetchSize() const;
void SetPrefetchMemory(unsigned int value);
unsigned int GetPrefetchMemory() const;
void SetLongMaxSize(unsigned int value);
unsigned int GetLongMaxSize() const;
void SetLongMode(LongMode value);
LongMode GetLongMode() const;
unsigned int GetSQLCommand() const;
ostring GetSQLVerb() const;
void GetBatchErrors(std::vector<Exception> &exceptions);
private:
static bool IsResultsetHandle(Handle *handle);
static void OnFreeSmartHandle(SmartHandle *smartHandle);
Statement(OCI_Statement *stmt, Handle *parent = nullptr);
BindsHolder *GetBindsHolder(bool allocate) const;
void ReleaseResultsets() const;
void SetLastBindMode(BindInfo::BindDirection mode);
void SetInData() const;
void SetOutData() const;
void ClearBinds() const;
template<typename M, class T>
void Bind1 (M &method, const ostring& name, T& value, BindInfo::BindDirection mode);
template<typename M, class T>
void Bind2 (M &method, const ostring& name, T &value, BindInfo::BindDirection mode);
template<typename M, class T>
void BindVector1(M &method, const ostring& name, std::vector<T> &values, BindInfo::BindDirection mode);
template<typename M, class T, class U>
void BindVector2(M &method, const ostring& name, std::vector<T> &values, BindInfo::BindDirection mode, U type);
template<typename T>
unsigned int Fetch(T callback);
template<typename T, typename U>
unsigned int Fetch(T callback, U adapter);
};
class Resultset : public HandleHolder<OCI_Resultset *>
{
friend class Statement;
public:
enum SeekModeValues
{
SeekAbsolute = OCI_SFD_ABSOLUTE,
SeekRelative = OCI_SFD_RELATIVE
};
typedef Enum<SeekModeValues> SeekMode;
template<class T>
T Get(unsigned int index) const;
template<class T>
void Get(unsigned int index, T &value) const;
template<class T>
T Get(const ostring& name) const;
template<class T>
void Get(const ostring &name, T &value) const;
template<class T, class U>
bool Get(T& value, U adapter) const;
template<typename T>
unsigned int ForEach(T callback);
template<typename T, typename U>
unsigned int ForEach(T callback, U adapter);
bool Next();
bool Prev();
bool First();
bool Last();
bool Seek(SeekMode mode, int offset);
unsigned int GetCount() const;
unsigned int GetCurrentRow() const;
unsigned int GetColumnIndex(const ostring& name) const;
unsigned int GetColumnCount() const;
Column GetColumn(unsigned int index) const;
Column GetColumn(const ostring& name) const;
bool IsColumnNull(unsigned int index) const;
bool IsColumnNull(const ostring& name) const;
Statement GetStatement() const;
bool operator ++ (int);
bool operator -- (int);
bool operator += (int offset);
bool operator -= (int offset);
private:
Resultset(OCI_Resultset *resultset, Handle *parent);
};
class Column : public HandleHolder<OCI_Column *>
{
friend class TypeInfo;
friend class Resultset;
public:
enum PropertyFlagsValues
{
NoFlags = OCI_CPF_NONE,
IsIdentity = OCI_CPF_IS_IDENTITY,
IsGeneratedAlways = OCI_CPF_IS_GEN_ALWAYS,
IsGeneratedByDefaultOnNull = OCI_CPF_IS_GEN_BY_DEFAULT_ON_NULL
};
typedef Flags<PropertyFlagsValues> PropertyFlags;
ostring GetName() const;
ostring GetSQLType() const;
ostring GetFullSQLType() const;
DataType GetType() const;
unsigned int GetSubType() const;
CharsetForm GetCharsetForm() const;
unsigned int GetSize() const;
int GetScale() const;
int GetPrecision() const;
int GetFractionalPrecision() const;
int GetLeadingPrecision() const;
PropertyFlags GetPropertyFlags() const;
bool IsNullable() const;
bool IsCharSemanticUsed() const;
TypeInfo GetTypeInfo() const;
private:
Column(OCI_Column *pColumn, Handle *parent);
};
class Subscription : public HandleHolder<OCI_Subscription *>
{
friend class Event;
public:
typedef void (*NotifyHandlerProc) (Event &evt);
enum ChangeTypesValues
{
ObjectChanges = OCI_CNT_OBJECTS,
RowChanges = OCI_CNT_ROWS,
DatabaseChanges = OCI_CNT_DATABASES,
AllChanges = OCI_CNT_ALL
};
typedef Flags<ChangeTypesValues> ChangeTypes;
Subscription();
void Register(const Connection &connection, const ostring& name, ChangeTypes changeTypes, NotifyHandlerProc handler, unsigned int port = 0, unsigned int timeout = 0);
void Unregister();
void Watch(const ostring& sql);
ostring GetName() const;
unsigned int GetTimeout() const;
unsigned int GetPort() const;
Connection GetConnection() const;
private:
Subscription(OCI_Subscription *pSubcription);
};
class Event : public HandleHolder<OCI_Event *>
{
friend class Subscription;
friend class Environment;
public:
enum EventTypeValues
{
DatabaseStart = OCI_ENT_STARTUP,
DatabaseShutdown = OCI_ENT_SHUTDOWN,
DatabaseShutdownAny = OCI_ENT_SHUTDOWN_ANY,
DatabaseDrop = OCI_ENT_DROP_DATABASE,
Unregister = OCI_ENT_DEREGISTER,
ObjectChanged = OCI_ENT_OBJECT_CHANGED
};
typedef Enum<EventTypeValues> EventType;
enum ObjectEventValues
{
ObjectInserted = OCI_ONT_INSERT,
ObjectUpdated = OCI_ONT_UPDATE,
ObjectDeleted = OCI_ONT_DELETE,
ObjectAltered = OCI_ONT_ALTER,
ObjectDropped = OCI_ONT_DROP,
ObjectGeneric = OCI_ONT_GENERIC
};
typedef Enum<ObjectEventValues> ObjectEvent;
EventType GetType() const;
ObjectEvent GetObjectEvent() const;
ostring GetDatabaseName() const;
ostring GetObjectName() const;
ostring GetRowID() const;
Subscription GetSubscription() const;
private:
Event(OCI_Event *pEvent);
};
class Agent : public HandleHolder<OCI_Agent *>
{
friend class Message;
friend class Dequeue;
public:
Agent(const Connection &connection, const ostring& name = OTEXT(""), const ostring& address = OTEXT(""));
ostring GetName() const;
void SetName(const ostring& value);
ostring GetAddress() const;
void SetAddress(const ostring& value);
private:
Agent(OCI_Agent *pAgent, Handle *parent);
};
class Message : public HandleHolder<OCI_Msg *>
{
friend class Dequeue;
public:
enum MessageStateValues
{
Ready = OCI_AMS_READY,
Waiting = OCI_AMS_WAITING,
Processed = OCI_AMS_PROCESSED,
Expired = OCI_AMS_EXPIRED
};
typedef Enum<MessageStateValues> MessageState;
Message(const TypeInfo &typeInfo);
void Reset();
template<class T>
T GetPayload();
template<class T>
void SetPayload(const T &value);
Date GetEnqueueTime() const;
int GetAttemptCount() const;
MessageState GetState() const;
Raw GetID() const;
int GetExpiration() const;
void SetExpiration(int value);
int GetEnqueueDelay() const;
void SetEnqueueDelay(int value);
int GetPriority() const;
void SetPriority(int value);
Raw GetOriginalID() const;
void SetOriginalID(const Raw &value);
ostring GetCorrelation() const;
void SetCorrelation(const ostring& value);
ostring GetExceptionQueue() const;
void SetExceptionQueue(const ostring& value);
Agent GetSender() const;
void SetSender(const Agent &agent);
void SetConsumers(std::vector<Agent> &agents);
private:
Message(OCI_Msg *pMessage, Handle *parent);
};
class Enqueue : public HandleHolder<OCI_Enqueue *>
{
public:
enum EnqueueModeValues
{
Before = OCI_ASD_BEFORE,
OnTop = OCI_ASD_TOP
};
typedef Enum<EnqueueModeValues> EnqueueMode;
enum EnqueueVisibilityValues
{
Immediate = OCI_AMV_IMMEDIATE,
OnCommit = OCI_AMV_ON_COMMIT
};
typedef Enum<EnqueueVisibilityValues> EnqueueVisibility;
Enqueue(const TypeInfo &typeInfo, const ostring& queueName);
void Put(const Message &message);
EnqueueVisibility GetVisibility() const;
void SetVisibility(EnqueueVisibility value);
EnqueueMode GetMode() const;
void SetMode(EnqueueMode value);
Raw GetRelativeMsgID() const;
void SetRelativeMsgID(const Raw &value);
};
class Dequeue : public HandleHolder<OCI_Dequeue *>
{
friend class Environment;
public:
typedef void (*NotifyAQHandlerProc) (Dequeue &dequeue);
enum DequeueModeValues
{
Browse = OCI_ADM_BROWSE,
Locked = OCI_ADM_LOCKED,
Remove = OCI_ADM_REMOVE,
Confirm = OCI_ADM_REMOVE_NODATA
};
typedef Enum<DequeueModeValues> DequeueMode;
enum DequeueVisibilityValues
{
Immediate = OCI_AMV_IMMEDIATE,
OnCommit = OCI_AMV_ON_COMMIT
};
typedef Enum<DequeueVisibilityValues> DequeueVisibility;
enum NavigationModeValues
{
FirstMessage = OCI_ADN_FIRST_MSG,
NextMessage = OCI_ADN_NEXT_MSG,
NextTransaction = OCI_ADN_NEXT_TRANSACTION
};
typedef Enum<NavigationModeValues> NavigationMode;
Dequeue(const TypeInfo &typeInfo, const ostring& queueName);
Message Get();
Agent Listen(int timeout);
ostring GetConsumer() const;
void SetConsumer(const ostring& value);
ostring GetCorrelation() const;
void SetCorrelation(const ostring& value);
Raw GetRelativeMsgID() const;
void SetRelativeMsgID(const Raw &value);
DequeueVisibility GetVisibility() const;
void SetVisibility(DequeueVisibility value);
DequeueMode GetMode() const;
void SetMode(DequeueMode value);
NavigationMode GetNavigation() const;
void SetNavigation(NavigationMode value);
int GetWaitTime() const;
void SetWaitTime(int value);
void SetAgents(std::vector<Agent> &agents);
void Subscribe(unsigned int port, unsigned int timeout, NotifyAQHandlerProc handler);
void Unsubscribe();
private:
Dequeue(OCI_Dequeue *pDequeue);
};
class Queue
{
public:
enum QueueTypeValues
{
NormalQueue = OCI_AQT_NORMAL,
ExceptionQueue = OCI_AQT_EXCEPTION,
NonPersistentQueue = OCI_AQT_NON_PERSISTENT
};
typedef Enum<QueueTypeValues> QueueType;
static void Create(const Connection &connection, const ostring& queue, const ostring& table, QueueType type = NormalQueue,
unsigned int maxRetries = 0, unsigned int retryDelay = 0, unsigned int retentionTime = 0,
bool dependencyTracking = false, const ostring& comment = OTEXT(""));
static void Alter(const Connection &connection, const ostring& queue,
unsigned int maxRetries= 0, unsigned int retryDelay= 0,
unsigned int retentionTime= 0, const ostring& comment = OTEXT(""));
static void Drop(const Connection &connection, const ostring& queue);
static void Start(const Connection &connection, const ostring& queue, bool enableEnqueue = true, bool enableDequeue = true);
static void Stop(const Connection &connection, const ostring& queue, bool stopEnqueue = true, bool stopDequeue = true, bool wait = true);
};
class QueueTable
{
public:
enum GroupingModeValues
{
None = OCI_AGM_NONE,
Transactionnal = OCI_AGM_TRANSACTIONNAL
};
typedef Enum<GroupingModeValues> GroupingMode;
enum PurgeModeValues
{
Buffered = OCI_APM_BUFFERED,
Persistent = OCI_APM_PERSISTENT,
All = OCI_APM_ALL
};
typedef Enum<PurgeModeValues> PurgeMode;
static void Create(const Connection &connection, const ostring& table, const ostring& payloadType, bool multipleConsumers,
const ostring& storageClause = OTEXT(""), const ostring& sortList = OTEXT(""),
GroupingMode groupingMode = None, const ostring& comment = OTEXT(""),
unsigned int primaryInstance = 0, unsigned int secondaryInstance = 0,
const ostring& compatible = OTEXT(""));
static void Alter(const Connection &connection, const ostring& table, const ostring& comment, unsigned int primaryInstance = 0, unsigned int secondaryInstance = 0);
static void Drop(const Connection &connection, const ostring& table, bool force = true);
static void Purge(const Connection &connection, const ostring& table, PurgeMode mode, const ostring& condition = OTEXT(""), bool block = true);
static void Migrate(const Connection &connection, const ostring& table, const ostring& compatible = OTEXT(""));
};
class DirectPath : public HandleHolder<OCI_DirPath *>
{
public:
enum ConversionModeValues
{
Default = OCI_DCM_DEFAULT,
Force = OCI_DCM_FORCE
};
typedef Enum<ConversionModeValues> ConversionMode;
enum ResultValues
{
ResultComplete = OCI_DPR_COMPLETE,
ResultError = OCI_DPR_ERROR,
ResultFull = OCI_DPR_FULL ,
ResultPartial = OCI_DPR_PARTIAL,
ResultEmpty = OCI_DPR_EMPTY
};
typedef Enum<ResultValues> Result;
DirectPath(const TypeInfo &typeInfo, unsigned int nbCols, unsigned int nbRows, const ostring& partition = OTEXT(""));
void SetColumn(unsigned int colIndex, const ostring& name, unsigned int maxSize, const ostring& format = OTEXT(""));
template<class T>
void SetEntry(unsigned int rowIndex, unsigned int colIndex, const T& value, bool complete = true);
void Reset();
void Prepare();
DirectPath::Result Convert();
DirectPath::Result Load();
void Finish();
void Abort();
void Save();
void FlushRow();
void SetCurrentRows(unsigned int value);
unsigned int GetCurrentRows() const;
unsigned int GetMaxRows() const;
unsigned int GetRowCount() const;
unsigned int GetAffectedRows() const;
void SetDateFormat(const ostring& format);
void SetParallel(bool value);
void SetNoLog(bool value);
void SetCacheSize(unsigned int value);
void SetBufferSize(unsigned int value);
void SetConversionMode(ConversionMode value);
unsigned int GetErrorColumn();
unsigned int GetErrorRow();
};
}
#include "ocilib_impl.hpp"
#endif
OCI_Mutex
struct OCI_Mutex OCI_Mutex
OCILIB encapsulation of OCI mutexes.
Definition: ocilib.h:699
OCI_Agent
struct OCI_Agent OCI_Agent
OCILIB encapsulation of A/Q Agent.
Definition: ocilib.h:759
ocilib::Environment::CharsetModeValues
CharsetModeValues
Charset mode enumerated values.
Definition: ocilib.hpp:727
ocilib::Column
Encapsulate a Resultset column or object member properties.
Definition: ocilib.hpp:6771
ocilib::SeekEnd
Definition: ocilib.hpp:367
ocilib::Blob
Lob< Raw, LobBinary > Blob
Class handling BLOB oracle type.
Definition: ocilib.hpp:4324
ocilib::NumericUnsignedInt
Definition: ocilib.hpp:316
ocilib::Dequeue::DequeueVisibilityValues
DequeueVisibilityValues
Message visibility enumerated values.
Definition: ocilib.hpp:7872
ocilib::CollectionIterator
STL compliant Collection Random iterator class.
Definition: ocilib.hpp:4931
ocilib::Exception::OracleWarning
Definition: ocilib.hpp:505
ocilib::Environment::SessionFlags
Flags< SessionFlagsValues > SessionFlags
Sessions flags.
Definition: ocilib.hpp:768
ocilib::TypeTimestamp
Definition: ocilib.hpp:276
OCI_Connection
struct OCI_Connection OCI_Connection
Oracle physical connection.
Definition: ocilib.h:423
ocilib::ThreadKey
Static class allowing to set/get thread local storage (TLS) values for a given unique key...
Definition: ocilib.hpp:1381
ocilib::Exception
Exception class handling all OCILIB errors.
Definition: ocilib.hpp:485
ocilib::BindInfo
Provides SQL bind informations.
Definition: ocilib.hpp:5321
ocilib::TypeInfo::TypeInfoTypeValues
TypeInfoTypeValues
Type of object information enumerated values.
Definition: ocilib.hpp:4537
ocilib::SeekOffset
Definition: ocilib.hpp:369
ocilib::Exception::OracleError
Definition: ocilib.hpp:501
ocilib::Event::EventTypeValues
EventTypeValues
Event type enumerated values.
Definition: ocilib.hpp:7105
ocilib::LobTypeValues
LobTypeValues
Lob types enumerated values.
Definition: ocilib.hpp:408
ocilib::Collection::const_iterator
CollectionIterator< const CollectionElement< T > > const_iterator
Common const iterator declaration.
Definition: ocilib.hpp:5198
ocilib::Exception::OcilibError
Definition: ocilib.hpp:503
ocilib::Statement::BindMode
Enum< BindModeValues > BindMode
Bind Modes.
Definition: ocilib.hpp:5567
ocilib
OCILIB ++ Namespace.
ocilib::Environment::HAEventSourceValues
HAEventSourceValues
HA Event sources enumerated values.
Definition: ocilib.hpp:627
ocilib::FormatTimestamp
Definition: ocilib.hpp:459
ocilib::Dequeue::DequeueMode
Enum< DequeueModeValues > DequeueMode
Dequeue mode.
Definition: ocilib.hpp:7865
ocilib::Pool::PoolType
Enum< PoolTypeValues > PoolType
Type of Pool.
Definition: ocilib.hpp:1461
ocilib::CharsetForm
Enum< CharsetFormValues > CharsetForm
Type of charsetForm.
Definition: ocilib.hpp:355
ocilib::Statement::FetchModeValues
FetchModeValues
Fetch Modes enumerated values.
Definition: ocilib.hpp:5530
ocilib::Environment::HAEventTypeValues
HAEventTypeValues
HA Event types enumerated values.
Definition: ocilib.hpp:659
ocilib::TypeString
Definition: ocilib.hpp:266
ocilib::Exception::GetRow
unsigned int GetRow() const
Return the row index which caused an error during statement execution.
Definition: ocilib_impl.hpp:967
ocilib::Queue
Class allowing the administration of Oracle Queues.
Definition: ocilib.hpp:8176
ocilib::Connection::SessionTraceValues
SessionTraceValues
Session trace enumerated values.
Definition: ocilib.hpp:1762
ocilib::QueueTable::GroupingMode
Enum< GroupingModeValues > GroupingMode
Grouping Mode.
Definition: ocilib.hpp:8344
ocilib::Event
Subscription Event.
Definition: ocilib.hpp:7093
ocilib::Statement::StatementTypeValues
StatementTypeValues
Statement Type enumerated values.
Definition: ocilib.hpp:5492
ocilib::FormatDate
Definition: ocilib.hpp:457
ocilib::ReadOnly
Definition: ocilib.hpp:389
ocilib::LobType
Enum< LobTypeValues > LobType
Type of Lob.
Definition: ocilib.hpp:425
ocilib::DataType
Enum< DataTypeValues > DataType
Column data type.
Definition: ocilib.hpp:298
ocilib::MutexHandle
OCI_Mutex * MutexHandle
Alias for an OCI_Mutex pointer.
Definition: ocilib.hpp:187
OCI_XID
struct OCI_XID OCI_XID
Global transaction identifier.
ocilib::Exception::GetMessage
ostring GetMessage() const
Retrieve the error message.
Definition: ocilib_impl.hpp:925
ocilib::Statement
Object used for executing SQL or PL/SQL statement and returning the produced results.
Definition: ocilib.hpp:5476
ocilib::Connection
A connection or session with a specific database.
Definition: ocilib.hpp:1665
ocilib::Column::PropertyFlags
Flags< PropertyFlagsValues > PropertyFlags
Column properties flags.
Definition: ocilib.hpp:6806
ocilib::Thread
static class allowing to manipulate threads
Definition: ocilib.hpp:1256
ocilib::CharsetFormDefault
Definition: ocilib.hpp:344
ocilib::FormatNumeric
Definition: ocilib.hpp:461
ocilib::TypeLob
Definition: ocilib.hpp:272
ocilib::Pool::PoolTypeValues
PoolTypeValues
Pool type enumerated values.
Definition: ocilib.hpp:1446
OCI_Interval
struct OCI_Interval OCI_Interval
Oracle internal interval representation.
Definition: ocilib.h:598
ocilib::Long
Object identifying the SQL data type LONG.
Definition: ocilib.hpp:5259
OCI_Dequeue
struct OCI_Dequeue OCI_Dequeue
OCILIB encapsulation of A/Q dequeuing operations.
Definition: ocilib.h:769
ocilib::Exception::GetOracleErrorCode
int GetOracleErrorCode() const
Return the Oracle error code.
Definition: ocilib_impl.hpp:947
ocilib::Transaction
Oracle Transaction object.
Definition: ocilib.hpp:2383
ocilib::Connection::FailoverResultValues
FailoverResultValues
Failover callback results enumerated values.
Definition: ocilib.hpp:1740
OCI_Statement
struct OCI_Statement OCI_Statement
Oracle SQL or PL/SQL statement.
Definition: ocilib.h:435
OCI_Bind
struct OCI_Bind OCI_Bind
Internal bind representation.
Definition: ocilib.h:447
std
STL namespace.
ocilib::TypeDate
Definition: ocilib.hpp:264
ocilib::Object::ObjectType
Enum< ObjectTypeValues > ObjectType
Object Type.
Definition: ocilib.hpp:4664
ocilib::LongTypeValues
LongTypeValues
Long types enumerated values.
Definition: ocilib.hpp:432
OCI_Subscription
struct OCI_Subscription OCI_Subscription
OCILIB encapsulation of Oracle DCN notification.
Definition: ocilib.h:729
ocilib::Timestamp::TimestampTypeValues
TimestampTypeValues
Interval types enumerated values.
Definition: ocilib.hpp:3530
ocilib::Environment::StartFlagsValues
StartFlagsValues
Oracle instance start flags enumerated values.
Definition: ocilib.hpp:801
ocilib::Environment::ShutdownFlags
Flags< ShutdownFlagsValues > ShutdownFlags
Oracle instance shutdown flags.
Definition: ocilib.hpp:881
ocilib::Agent
AQ identified agent for messages delivery.
Definition: ocilib.hpp:7220
ocilib::Mutex
Static class allowing managing mutexes.
Definition: ocilib.hpp:1329
ocilib::Dequeue::DequeueVisibility
Enum< DequeueVisibilityValues > DequeueVisibility
Message visibility after begin dequeued.
Definition: ocilib.hpp:7887
ocilib::OracleVersion
Enum< OracleVersionValues > OracleVersion
Oracle Version.
Definition: ocilib.hpp:252
ocilib::DirectPath
Oracle Direct path loading encapsulation.
Definition: ocilib.hpp:8505
ocilib::CharsetFormNational
Definition: ocilib.hpp:346
ocilib::Enqueue::EnqueueVisibility
Enum< EnqueueVisibilityValues > EnqueueVisibility
Message visibility after begin queued.
Definition: ocilib.hpp:7705
ocilib::Dequeue::NavigationMode
Enum< NavigationModeValues > NavigationMode
Navigation Mode.
Definition: ocilib.hpp:7912
OCI_Timestamp
struct OCI_Timestamp OCI_Timestamp
Oracle internal timestamp representation.
Definition: ocilib.h:588
ocilib::Event::EventType
Enum< EventTypeValues > EventType
Event type.
Definition: ocilib.hpp:7128
ocilib::Enqueue::EnqueueModeValues
EnqueueModeValues
Message enqueuing mode enumerated values.
Definition: ocilib.hpp:7668
POCI_THREAD
void(* POCI_THREAD)(OCI_Thread *thread, void *arg)
Thread procedure prototype.
Definition: ocilib.h:808
ocilib::Enum
Template Enumeration template class providing some type safety to some extends for manipulating enume...
Definition: ocilib_core.hpp:151
ocilib::Subscription::ChangeTypes
Flags< ChangeTypesValues > ChangeTypes
Subscription changes flags.
Definition: ocilib.hpp:6998
ocilib::Exception::ExceptionType
Enum< ExceptionTypeValues > ExceptionType
Type of Exception.
Definition: ocilib.hpp:515
ocilib::DirectPath::ConversionModeValues
ConversionModeValues
Conversion mode enumerated values.
Definition: ocilib.hpp:8514
ocilib::Environment::ShutdownMode
Flags< ShutdownModeValues > ShutdownMode
Oracle instance shutdown modes.
Definition: ocilib.hpp:844
ocilib::Environment::SessionDefault
Definition: ocilib.hpp:752
ocilib::Environment::EnvironmentFlags
Flags< EnvironmentFlagsValues > EnvironmentFlags
Environment Flags.
Definition: ocilib.hpp:698
ocilib::Environment::ShutdownModeValues
ShutdownModeValues
Oracle instance shutdown modes enumerated values.
Definition: ocilib.hpp:825
ocilib::NumericFloat
Definition: ocilib.hpp:322
OCI_Msg
struct OCI_Msg OCI_Msg
OCILIB encapsulation of A/Q message.
Definition: ocilib.h:749
ocilib::NumericUnsignedShort
Definition: ocilib.hpp:314
ocilib::ThreadId
const void * ThreadId
Thread Unique ID.
Definition: ocilib.hpp:205
ocilib::Reference
Object identifying the SQL data type REF.
Definition: ocilib.hpp:4810
ocilib::Interval::IntervalType
Enum< IntervalTypeValues > IntervalType
Interval types.
Definition: ocilib.hpp:3145
ocilib::SeekModeValues
SeekModeValues
Seek Modes enumerated values.
Definition: ocilib.hpp:362
ocilib::Statement::StatementType
Enum< StatementTypeValues > StatementType
Statement Type.
Definition: ocilib.hpp:5523
ocilib::QueueTable::PurgeModeValues
PurgeModeValues
Purge mode enumerated values.
Definition: ocilib.hpp:8352
ocilib::Environment
Static class in charge of library initialization / cleanup.
Definition: ocilib.hpp:610
ocilib::Connection::FailoverRequestValues
FailoverRequestValues
Failover request enumerated values.
Definition: ocilib.hpp:1690
ocilib::CollectionElement
Class used for handling transient collection value. it is used internally by the Collection<T> class:...
Definition: ocilib.hpp:4899
ocilib::Environment::AllocatedBytesValues
AllocatedBytesValues
Allocated Bytes enumerated values.
Definition: ocilib.hpp:888
ocilib::Event::ObjectEvent
Enum< ObjectEventValues > ObjectEvent
Object events.
Definition: ocilib.hpp:7158
ocilib::Connection::FailoverEventValues
FailoverEventValues
Failover events enumerated values.
Definition: ocilib.hpp:1712
OCI_Ref
struct OCI_Ref OCI_Ref
Oracle REF type representation.
Definition: ocilib.h:655
ocilib::NumericNumber
Definition: ocilib.hpp:324
ocilib::Subscription::ChangeTypesValues
ChangeTypesValues
Subscription changes flags values.
Definition: ocilib.hpp:6979
ocilib::Resultset::SeekMode
Enum< SeekModeValues > SeekMode
Seek Modes.
Definition: ocilib.hpp:6437
ocilib::AnyPointer
void * AnyPointer
Alias for the generic void pointer.
Definition: ocilib.hpp:169
ocilib::Exception::what
const char * what() const override
Override the std::exception::what() method.
Definition: ocilib_impl.hpp:920
ocilib::Exception::GetType
ExceptionType GetType() const
Return the Exception type.
Definition: ocilib_impl.hpp:942
ocilib::Exception::GetConnection
Connection GetConnection() const
Return the connection within the error occurred.
Definition: ocilib_impl.hpp:962
ocilib::File
Object identifying the SQL data type BFILE.
Definition: ocilib.hpp:4334
ocilib::Collection
Object identifying the SQL data types VARRAY and NESTED TABLE.
Definition: ocilib.hpp:4990
ocilib::Message::MessageState
Enum< MessageStateValues > MessageState
Message state.
Definition: ocilib.hpp:7340
ocilib::TypeRaw
Definition: ocilib.hpp:280
OCI_Date
struct OCI_Date OCI_Date
Oracle internal date representation.
Definition: ocilib.h:578
ocilib::Environment::AllocatedBytesFlags
Flags< AllocatedBytesValues > AllocatedBytesFlags
Allocated Bytes.
Definition: ocilib.hpp:905
ocilib::DirectPath::ResultValues
ResultValues
Direct Operation Result enumerated values.
Definition: ocilib.hpp:8536
ocilib::Exception::Check
friend T Check(T 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:124
ocilib::Environment::StartFlags
Flags< StartFlagsValues > StartFlags
Oracle instance start flags.
Definition: ocilib.hpp:818
ocilib::Interval
Object identifying the SQL data type INTERVAL.
Definition: ocilib.hpp:3113
ocilib::FormatType
Enum< FormatTypeValues > FormatType
Format type.
Definition: ocilib.hpp:475
ocilib::Exception::GetInternalErrorCode
int GetInternalErrorCode() const
Return the OCILIB error code.
Definition: ocilib_impl.hpp:952
ocilib::Collection::CollectionTypeValues
CollectionTypeValues
Collection type enumerated values.
Definition: ocilib.hpp:5008
ocilib::Enqueue::EnqueueMode
Enum< EnqueueModeValues > EnqueueMode
Message enqueuing mode.
Definition: ocilib.hpp:7683
OCI_Transaction
struct OCI_Transaction OCI_Transaction
Oracle Transaction.
Definition: ocilib.h:537
ocilib::ThreadKey::ThreadKeyFreeProc
POCI_THREADKEYDEST ThreadKeyFreeProc
Thread Key callback for freeing resources.
Definition: ocilib.hpp:1391
ocilib::QueueTable::GroupingModeValues
GroupingModeValues
Grouping mode enumerated values.
Definition: ocilib.hpp:8328
ocilib::NumericInt
Definition: ocilib.hpp:310
ocilib::QueueTable
Class allowing the administration of Oracle Queue tables.
Definition: ocilib.hpp:8318
ocilib::Statement::LongMode
Enum< LongModeValues > LongMode
LONG data type mapping modes.
Definition: ocilib.hpp:5589
ocilib::Timestamp::TimestampType
Enum< TimestampTypeValues > TimestampType
Type of timestamp.
Definition: ocilib.hpp:3547
ocilib::Enqueue
Enqueue object for queuing messages into an Oracle Queue.
Definition: ocilib.hpp:7659
OCI_Resultset
struct OCI_Resultset OCI_Resultset
Collection of output columns from a select statement.
Definition: ocilib.h:462
ocilib::Environment::SessionFlagsValues
SessionFlagsValues
Session flags enumerated values.
Definition: ocilib.hpp:749
ocilib::Transaction::TransactionFlagsValues
TransactionFlagsValues
Transaction flags enumerated values.
Definition: ocilib.hpp:2394
ocilib::Connection::FailoverEvent
Enum< FailoverEventValues > FailoverEvent
Failover events.
Definition: ocilib.hpp:1733
ocilib::OpenModeValues
OpenModeValues
Open Modes enumerated values.
Definition: ocilib.hpp:386
ocilib::Statement::FetchMode
Enum< FetchModeValues > FetchMode
Fetch Modes.
Definition: ocilib.hpp:5545
ocilib::Environment::Default
Definition: ocilib.hpp:684
ocilib::Pool
A connection or session Pool.
Definition: ocilib.hpp:1437
ocilib::Statement::BindModeValues
BindModeValues
Bind Modes enumerated values.
Definition: ocilib.hpp:5552
ocilib::QueueTable::PurgeMode
Enum< PurgeModeValues > PurgeMode
Purge mode.
Definition: ocilib.hpp:8369
ocilib::Environment::HAEventSource
Enum< HAEventSourceValues > HAEventSource
Source of HA events.
Definition: ocilib.hpp:652
ocilib::SeekSet
Definition: ocilib.hpp:365
ocilib::BindInfo::BindDirectionValues
BindDirectionValues
Bind direction enumerated values.
Definition: ocilib.hpp:5332
ocilib::Connection::FailoverResult
Enum< FailoverResultValues > FailoverResult
Failover callback results.
Definition: ocilib.hpp:1755
ocilib::LongType
Enum< LongTypeValues > LongType
Type of Long.
Definition: ocilib.hpp:447
OCI_File
struct OCI_File OCI_File
Oracle External Large objects:
Definition: ocilib.h:522
OCI_Thread
struct OCI_Thread OCI_Thread
OCILIB encapsulation of OCI Threads.
Definition: ocilib.h:709
ocilib::Environment::HAEventType
Enum< HAEventTypeValues > HAEventType
Type of HA events.
Definition: ocilib.hpp:674
ocilib::Event::ObjectEventValues
ObjectEventValues
Object events enumerated values.
Definition: ocilib.hpp:7135
ocilib::Statement::LongModeValues
LongModeValues
LONG data type mapping modes enumerated values.
Definition: ocilib.hpp:5574
ocilib::Streamable
Abstract class allowing derived classes to be compatible with any type supporting the operator << oci...
Definition: ocilib_core.hpp:413
ocilib::Environment::StartMode
Flags< StartModeValues > StartMode
Oracle instance start modes.
Definition: ocilib.hpp:794
ocilib::NumericBigInt
Definition: ocilib.hpp:312
ocilib::Object::ObjectTypeValues
ObjectTypeValues
Object Type enumerated values.
Definition: ocilib.hpp:4647
ocilib::DirectPath::ConversionMode
Enum< ConversionModeValues > ConversionMode
Conversion Mode.
Definition: ocilib.hpp:8529
ocilib::TypeCollection
Definition: ocilib.hpp:284
OCI_Number
struct OCI_Number OCI_Number
Oracle NUMBER representation.
Definition: ocilib.h:568
ocilib::NumericDouble
Definition: ocilib.hpp:320
ocilib::NumericType
Enum< NumericTypeValues > NumericType
Numeric data type.
Definition: ocilib.hpp:334
ocilib::CallbackPointer
void * CallbackPointer
Alias used for storing user callback method pointers.
Definition: ocilib.hpp:214
ocilib::Collection::iterator
CollectionIterator< CollectionElement< T > > iterator
Common iterator declaration.
Definition: ocilib.hpp:5191
ocilib::TypeNumeric
Definition: ocilib.hpp:262
ocilib::Environment::CharsetMode
Enum< CharsetModeValues > CharsetMode
Environment charset mode.
Definition: ocilib.hpp:742
ocilib::HandleHolder
Template class providing OCILIB handles auto memory, life cycle and scope management.
Definition: ocilib_core.hpp:144
ocilib::NumericTypeValues
NumericTypeValues
Numeric type enumerated values.
Definition: ocilib.hpp:305
ocilib::Flags< EnvironmentFlagsValues >
ocilib::TypeInfo::TypeInfoType
Enum< TypeInfoTypeValues > TypeInfoType
Type of object information.
Definition: ocilib.hpp:4554
ocilib::ThreadHandle
OCI_Thread * ThreadHandle
Alias for an OCI_Thread pointer.
Definition: ocilib.hpp:196
ocilib::Environment::ImportMode
Enum< ImportModeValues > ImportMode
OCI libraries import mode.
Definition: ocilib.hpp:720
ocilib::CharsetFormValues
CharsetFormValues
Charset form enumerated values.
Definition: ocilib.hpp:341
POCI_THREADKEYDEST
void(* POCI_THREADKEYDEST)(void *data)
Thread key destructor prototype.
Definition: ocilib.h:824
ocilib::Raw
std::vector< unsigned char > Raw
C++ counterpart of SQL RAW data type.
Definition: ocilib.hpp:178
ocilib::TypeObject
Definition: ocilib.hpp:282
OCI_Long
struct OCI_Long OCI_Long
Oracle Long data type.
Definition: ocilib.h:559
ocilib::TypeInfo
Provides type information on Oracle Database objects.
Definition: ocilib.hpp:4523
ocilib::Enqueue::EnqueueVisibilityValues
EnqueueVisibilityValues
Message visibility enumerated values.
Definition: ocilib.hpp:7690
OCI_TypeInfo
struct OCI_TypeInfo OCI_TypeInfo
Type info metadata handle.
Definition: ocilib.h:665
ocilib::Dequeue::NavigationModeValues
NavigationModeValues
Navigation Mode enumerated values.
Definition: ocilib.hpp:7894
ocilib::Number
Object identifying the SQL data type NUMBER.
Definition: ocilib.hpp:2502
ocilib::Interval::IntervalTypeValues
IntervalTypeValues
Interval types enumerated values.
Definition: ocilib.hpp:3130
ocilib::NumericShort
Definition: ocilib.hpp:308
ocilib::Thread::ThreadProc
POCI_THREAD ThreadProc
Thread callback.
Definition: ocilib.hpp:1266
ocilib::Environment::ShutdownFlagsValues
ShutdownFlagsValues
Oracle instance shutdown flags enumerated values.
Definition: ocilib.hpp:851
ocilib::Dequeue::DequeueModeValues
DequeueModeValues
Dequeue mode enumerated values.
Definition: ocilib.hpp:7846
ocilib::Exception::GetStatement
Statement GetStatement() const
Return the statement within the error occurred.
Definition: ocilib_impl.hpp:957
ocilib::DataTypeValues
DataTypeValues
Data type enumerated values.
Definition: ocilib.hpp:259
ocilib::Environment::ImportModeValues
ImportModeValues
OCI libraries import mode enumerated values.
Definition: ocilib.hpp:705
ocilib::Connection::FailoverRequest
Enum< FailoverRequestValues > FailoverRequest
Failover requests.
Definition: ocilib.hpp:1705
ocilib::NClob
Lob< ostring, LobNationalCharacter > NClob
Class handling NCLOB oracle type.
Definition: ocilib.hpp:4313
ocilib::TypeLong
Definition: ocilib.hpp:268
ocilib::TypeInterval
Definition: ocilib.hpp:278
ocilib::Message::MessageStateValues
MessageStateValues
Message state enumerated values.
Definition: ocilib.hpp:7321
ocilib::OracleVersionValues
OracleVersionValues
Oracle Version enumerated values.
Definition: ocilib.hpp:232
ocilib::SeekMode
Enum< SeekModeValues > SeekMode
Seek Modes.
Definition: ocilib.hpp:379
ocilib::ReadWrite
Definition: ocilib.hpp:391
ocilib::FormatBinaryFloat
Definition: ocilib.hpp:465
ocilib::Lob
Object identifying the SQL data type LOB (CLOB, NCLOB and BLOB)
Definition: ocilib.hpp:4019
ocilib::FormatBinaryDouble
Definition: ocilib.hpp:463
ocilib::TypeStatement
Definition: ocilib.hpp:270
ocilib::Resultset::SeekModeValues
SeekModeValues
Seek Modes enumerated values.
Definition: ocilib.hpp:6422
ocilib::DirectPath::Result
Enum< ResultValues > Result
Direct Operation Result.
Definition: ocilib.hpp:8557
ocilib::Queue::QueueTypeValues
QueueTypeValues
Queue Type enumerated values.
Definition: ocilib.hpp:8185
ocilib::Exception::ExceptionTypeValues
ExceptionTypeValues
Exception type enumerated values.
Definition: ocilib.hpp:498
ocilib::Clob
Lob< ostring, LobCharacter > Clob
Class handling CLOB oracle type.
Definition: ocilib.hpp:4302
ocilib::BindInfo::BindDirection
Enum< BindDirectionValues > BindDirection
Bind direction.
Definition: ocilib.hpp:5349
OCI_Coll
struct OCI_Coll OCI_Coll
Oracle Collections (VARRAYs and Nested Tables) representation.
Definition: ocilib.h:618
ocilib::Column::PropertyFlagsValues
PropertyFlagsValues
Column properties flags values.
Definition: ocilib.hpp:6783
ocilib::Connection::SessionTrace
Enum< SessionTraceValues > SessionTrace
Session traces.
Definition: ocilib.hpp:1781
OCI_Elem
struct OCI_Elem OCI_Elem
Oracle Collection item representation.
Definition: ocilib.h:628
ocilib::FormatTypeValues
FormatTypeValues
Format type enumerated values.
Definition: ocilib.hpp:454
ocilib::Message
AQ message.
Definition: ocilib.hpp:7310
ocilib::Resultset
Database resultset.
Definition: ocilib.hpp:6412
ocilib::Transaction::TransactionFlags
Flags< TransactionFlagsValues > TransactionFlags
Transaction flags.
Definition: ocilib.hpp:2418
ocilib::ostring
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:160
OCI_Object
struct OCI_Object OCI_Object
Oracle Named types representation.
Definition: ocilib.h:608
ocilib::Environment::StartModeValues
StartModeValues
Oracle instance start modes enumerated values.
Definition: ocilib.hpp:775
ocilib::TypeReference
Definition: ocilib.hpp:286
ocilib::TypeFile
Definition: ocilib.hpp:274
OCI_Column
struct OCI_Column OCI_Column
Oracle SQL Column and Type member representation.
Definition: ocilib.h:474
OCI_Error
struct OCI_Error OCI_Error
Encapsulates an Oracle or OCILIB exception.
Definition: ocilib.h:689
ocilib::Timestamp
Object identifying the SQL data type TIMESTAMP.
Definition: ocilib.hpp:3512
ocilib::Queue::QueueType
Enum< QueueTypeValues > QueueType
Queue Type.
Definition: ocilib.hpp:8202
ocilib::Dequeue
Dequeue object for dequeuing messages into an Oracle Queue.
Definition: ocilib.hpp:7826
ocilib::Object
Object identifying the SQL data type OBJECT.
Definition: ocilib.hpp:4630
ocilib::Environment::EnvironmentFlagsValues
EnvironmentFlagsValues
Environment Flags enumerated values.
Definition: ocilib.hpp:681
OCI_Event
struct OCI_Event OCI_Event
OCILIB encapsulation of Oracle DCN event.
Definition: ocilib.h:739
ocilib::Subscription
Subscription to database or objects changes.
Definition: ocilib.hpp:6959
OCI_Lob
struct OCI_Lob OCI_Lob
Oracle Internal Large objects:
Definition: ocilib.h:497
ocilib::NumericUnsignedBigInt
Definition: ocilib.hpp:318
ocilib::TypeBoolean
Definition: ocilib.hpp:288
ocilib::Collection::CollectionType
Enum< CollectionTypeValues > CollectionType
Collection type.
Definition: ocilib.hpp:5025
ocilib::Date
Object identifying the SQL data type DATE.
Definition: ocilib.hpp:2677
ocilib::OpenMode
Enum< OpenModeValues > OpenMode
Open Modes.
Definition: ocilib.hpp:401