OCILIB (C and C++ Driver for Oracle)  4.7.5
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-2023 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 Object;
191template<class>
192class Element;
193template<class>
194class Iterator;
195template<class>
196class Collection;
197template<class, int>
198class Lob;
199class File;
200class Pool;
201template<class, int>
202class Long;
203class Column;
204class Subscription;
205class Event;
206class Agent;
207class Message;
208class Enqueue;
209class Dequeue;
210class Queue;
211class QueueTable;
212class DirectPath;
213class Thread;
214class ThreadKey;
215class Mutex;
216class BindInfo;
217
218
224#define SILENT_CATCH(exp) try { exp; } catch (...) {}
225
226}
AQ identified agent for messages delivery.
Definition: types.hpp:7329
Provides SQL bind information.
Definition: types.hpp:5379
Object identifying the SQL data types VARRAY and NESTED TABLE.
Definition: types.hpp:5026
Encapsulate a Resultset column or object member properties.
Definition: types.hpp:6864
A connection or session with a specific database.
Definition: types.hpp:1577
Object identifying the SQL data type DATE.
Definition: types.hpp:2675
Dequeue object for dequeuing messages into an Oracle Queue.
Definition: types.hpp:7935
Oracle Direct path loading encapsulation.
Definition: types.hpp:8614
Enqueue object for queuing messages into an Oracle Queue.
Definition: types.hpp:7768
Static class in charge of library initialization / cleanup.
Definition: types.hpp:490
Subscription Event.
Definition: types.hpp:7202
Exception class handling all OCILIB errors.
Definition: types.hpp:358
Object identifying the SQL data type BFILE.
Definition: types.hpp:4339
Object identifying the SQL data type INTERVAL.
Definition: types.hpp:3111
Object identifying the SQL data type LOB (CLOB, NCLOB and BLOB)
Definition: types.hpp:4017
Object identifying the SQL data type LONG.
Definition: types.hpp:5295
AQ message.
Definition: types.hpp:7419
Static class allowing managing mutexes.
Definition: types.hpp:1241
Object identifying the SQL data type NUMBER.
Definition: types.hpp:2497
Object identifying the SQL data type OBJECT.
Definition: types.hpp:4665
A connection or session Pool.
Definition: types.hpp:1349
Class allowing the administration of Oracle Queues.
Definition: types.hpp:8285
Class allowing the administration of Oracle Queue tables.
Definition: types.hpp:8427
Object identifying the SQL data type REF.
Definition: types.hpp:4845
Database resultset.
Definition: types.hpp:6505
Object used for executing SQL or PL/SQL statement and returning the produced results.
Definition: types.hpp:5556
Subscription to database or objects changes.
Definition: types.hpp:7068
static class allowing to manipulate threads
Definition: types.hpp:1168
Static class allowing to set/get thread local storage (TLS) values for a given unique key.
Definition: types.hpp:1293
Object identifying the SQL data type TIMESTAMP.
Definition: types.hpp:3510
Oracle Transaction object.
Definition: types.hpp:2378
Provides type information on Oracle Database objects.
Definition: types.hpp:4528
struct OCI_Thread OCI_Thread
OCILIB encapsulation of OCI Threads.
Definition: types.h:410
struct OCI_Mutex OCI_Mutex
OCILIB encapsulation of OCI mutexes.
Definition: types.h:400
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