OCILIB (C and C++ Driver for Oracle)  4.7.7
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
Loading...
Searching...
No Matches
config.hpp
1/*
2 * OCILIB - C Driver for Oracle (C Wrapper for Oracle OCI)
3 *
4 * Website: http://www.ocilib.net
5 *
6 * Copyright (c) 2007-2025 Vincent ROGIER <vince.rogier@ocilib.net>
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21#pragma once
22
23#include <string>
24#include <vector>
25
26// ReSharper disable CppClangTidyCppcoreguidelinesMacroUsage
27
28/* Including C API declarations */
29
30extern "C" {
31#include "ocilib.h"
32}
33
34/* Try to guess C++ Compiler capabilities ... */
35
36#define OCILIBPP_CPP_98 199711L
37#define OCILIBPP_CPP_11 201103L
38#define OCILIBPP_CPP_14 201402L
39
40#if __cplusplus < OCILIBPP_CPP_11
41
42 // GCC
43#if defined(__GNUC__)
44#if defined(__GXX_EXPERIMENTAL_CXX0X__)
45#define OCILIBPP_HAS_CXX
46#endif
47// MSVC
48#elif defined(_MSC_VER)
49#if _MSVC_LANG >= OCILIBPP_CPP_11
50#define OCILIBPP_HAS_CXX
51#endif
52#endif
53
54#else
55
56#define OCILIBPP_HAS_CXX
57
58#endif
59
60#ifdef OCILIBPP_HAS_CXX
61
62#define OCILIBPP_HAS_ENABLEIF
63#define OCILIBPP_HAS_VARIADIC
64
65#ifdef OCILIBCPP_DEBUG_MEMORY
66
67#include <iostream>
68#define OCILIBPP_DEBUG_MEMORY_ENABLED
69
70#endif
71
72#else
73
74#define OCILIBPP_DEFINE_CXX_KEYWORDS
75
76#endif
77
78#ifdef OCILIBPP_TEST_CPP98
79
80#ifdef OCILIBPP_DEFINE_CXX_KEYWORDS
81#undef OCILIBPP_DEFINE_CXX_KEYWORDS
82#endif
83
84#ifdef OCILIBPP_HAS_ENABLEIF
85#undef OCILIBPP_HAS_ENABLEIF
86#endif
87
88#ifdef OCILIBPP_HAS_VARIADIC
89#undef OCILIBPP_HAS_VARIADIC
90#endif
91
92#ifdef OCILIBPP_DEBUG_MEMORY_ENABLED
93#undef OCILIBPP_DEBUG_MEMORY_ENABLED
94#endif
95
96#endif
97
98#ifdef OCILIBPP_DEFINE_CXX_KEYWORDS
99
100#define nullptr 0
101#define override
102#define noexcept
103
104#endif
105
106namespace ocilib
107{
108
120typedef std::basic_string<otext, std::char_traits<otext>, std::allocator<otext> > ostring;
121
129typedef void * AnyPointer;
130
138typedef std::vector<unsigned char> Raw;
139
148
157
165typedef const void * ThreadId;
166
174typedef void * CallbackPointer;
175
176/* class forward declarations */
177
178class Exception;
179class Connection;
180class Transaction;
181class Environment;
182class Statement;
183class Resultset;
184class Date;
185class Timestamp;
186class Interval;
187class Number;
188class TypeInfo;
189class Reference;
190class XmType;
191class Object;
192template<class>
193class Element;
194template<class>
195class Iterator;
196template<class>
197class Collection;
198template<class, int>
199class Lob;
200class File;
201class Pool;
202template<class, int>
203class Long;
204class Column;
205class Subscription;
206class Event;
207class Agent;
208class Message;
209class Enqueue;
210class Dequeue;
211class Queue;
212class QueueTable;
213class DirectPath;
214class Thread;
215class ThreadKey;
216class Mutex;
217class BindInfo;
218
219
225#define SILENT_CATCH(exp) try { exp; } catch (...) {}
226
227}
AQ identified agent for messages delivery.
Definition: types.hpp:7473
Provides SQL bind information.
Definition: types.hpp:5523
Object identifying the SQL data types VARRAY and NESTED TABLE.
Definition: types.hpp:5170
Encapsulate a Resultset column or object member properties.
Definition: types.hpp:7008
A connection or session with a specific database.
Definition: types.hpp:1587
Object identifying the SQL data type DATE.
Definition: types.hpp:2716
Dequeue object for dequeuing messages into an Oracle Queue.
Definition: types.hpp:8079
Oracle Direct path loading encapsulation.
Definition: types.hpp:8758
Enqueue object for queuing messages into an Oracle Queue.
Definition: types.hpp:7912
Static class in charge of library initialization / cleanup.
Definition: types.hpp:492
Subscription Event.
Definition: types.hpp:7346
Exception class handling all OCILIB errors.
Definition: types.hpp:360
Object identifying the SQL data type BFILE.
Definition: types.hpp:4458
Object identifying the SQL data type INTERVAL.
Definition: types.hpp:3172
Object identifying the SQL data type LOB (CLOB, NCLOB and BLOB)
Definition: types.hpp:4136
Object identifying the SQL data type LONG.
Definition: types.hpp:5439
AQ message.
Definition: types.hpp:7563
Static class allowing managing mutexes.
Definition: types.hpp:1248
Object identifying the SQL data type NUMBER.
Definition: types.hpp:2507
Object identifying the SQL data type OBJECT.
Definition: types.hpp:4784
A connection or session Pool.
Definition: types.hpp:1356
Class allowing the administration of Oracle Queues.
Definition: types.hpp:8429
Class allowing the administration of Oracle Queue tables.
Definition: types.hpp:8571
Object identifying the SQL data type REF.
Definition: types.hpp:4964
Database resultset.
Definition: types.hpp:6649
Object used for executing SQL or PL/SQL statement and returning the produced results.
Definition: types.hpp:5700
Subscription to database or objects changes.
Definition: types.hpp:7212
static class allowing to manipulate threads
Definition: types.hpp:1175
Static class allowing to set/get thread local storage (TLS) values for a given unique key.
Definition: types.hpp:1300
Object identifying the SQL data type TIMESTAMP.
Definition: types.hpp:3607
Oracle Transaction object.
Definition: types.hpp:2388
Provides type information on Oracle Database objects.
Definition: types.hpp:4647
struct OCI_Thread OCI_Thread
OCILIB encapsulation of OCI Threads.
Definition: types.h:420
struct OCI_Mutex OCI_Mutex
OCILIB encapsulation of OCI mutexes.
Definition: types.h:410
OCILIB ++ Namespace.
std::basic_string< otext, std::char_traits< otext >, std::allocator< otext > > ostring
string class wrapping the OCILIB otext * type and OTEXT() macros ( see Character sets )
Definition: config.hpp:120
const void * ThreadId
Thread Unique ID.
Definition: config.hpp:165
void * CallbackPointer
Alias used for storing user callback method pointers.
Definition: config.hpp:174
std::vector< unsigned char > Raw
C++ counterpart of SQL RAW data type.
Definition: config.hpp:138
OCI_Mutex * MutexHandle
Alias for an OCI_Mutex pointer.
Definition: config.hpp:147
void * AnyPointer
Alias for the generic void pointer.
Definition: config.hpp:129
OCI_Thread * ThreadHandle
Alias for an OCI_Thread pointer.
Definition: config.hpp:156