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
compat.h
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
/* IMPORTANT NOTICE
22
*
23
* This file contains explanations about Oracle and OCI technologies.
24
* OCILIB is a wrapper around OCI and thus exposes OCI features.
25
* The OCILIB documentation intends to explain Oracle / OCI concepts
26
* and is naturally based on the official Oracle OCI documentation.
27
*
28
* Some parts of OCILIB documentation may include some information
29
* taken and adapted from the following Oracle documentations :
30
* - Oracle Call Interface Programmer's Guide
31
* - Oracle Streams - Advanced Queuing User's Guide
32
*/
33
34
#ifndef OCILIB_COMPAT_H_INCLUDED
35
#define OCILIB_COMPAT_H_INCLUDED
36
37
#include "ocilibc/api.h"
38
45
/* Compatibility with sources built with older versions of OCILIB */
46
47
/* macros added in version 2.3.0 */
48
49
#define OCI_CreateConnection OCI_ConnectionCreate
50
#define OCI_FreeConnection OCI_ConnectionFree
51
#define OCI_CreateStatement OCI_StatementCreate
52
#define OCI_FreeStatement OCI_StatementFree
53
54
/* macros added in version 2.4.0 */
55
56
#define OCI_CreateTransaction OCI_TransactionCreate
57
#define OCI_FreeTransaction OCI_TransactionFree
58
#define OCI_CreateHashTable OCI_HashCreate
59
#define OCI_FreeHashTable OCI_HashFree
60
61
/* macros added in version 3.0.0 */
62
63
#define OCI_GetColumnName OCI_ColumnGetName
64
#define OCI_GetColumnType OCI_ColumnGetType
65
#define OCI_GetColumnCharsetForm OCI_ColumnGetCharsetForm
66
#define OCI_GetColumnSQLType OCI_ColumnGetSQLType
67
#define OCI_GetColumnFullSQLType OCI_ColumnGetFullSQLType
68
#define OCI_GetColumnSize OCI_ColumnGetSize
69
#define OCI_GetColumnScale OCI_ColumnGetScale
70
#define OCI_GetColumnPrecision OCI_ColumnGetPrecision
71
#define OCI_GetColumnFractionnalPrecision OCI_ColumnGetFractionnalPrecision
72
#define OCI_GetColumnLeadingPrecision OCI_ColumnGetLeadingPrecision
73
#define OCI_GetColumnNullable OCI_ColumnGetNullable
74
#define OCI_GetColumnCharUsed OCI_ColumnGetCharUsed
75
76
#define OCI_GetFormatDate(s) OCI_GetDefaultFormatDate(OCI_StatementGetConnection(s))
77
#define OCI_SetFormatDate(s, f) OCI_SetDefaultFormatDate(OCI_StatementGetConnection( \
78
s), f)
79
80
#define OCI_ERR_API OCI_ERR_ORACLE
81
82
/* macros added in version 3.2.0 */
83
84
#define OCI_ERR_NOT_SUPPORTED OCI_ERR_DATATYPE_NOT_SUPPORTED
85
#define OCI_SCHEMA_TABLE OCI_TIF_TABLE
86
#define OCI_SCHEMA_VIEW OCI_TIF_VIEW
87
#define OCI_SCHEMA_TYPE OCI_TIF_TYPE
88
89
#define OCI_Schema OCI_TypeInfo
90
91
#define OCI_SchemaGet OCI_TypeInfoGet
92
#define OCI_SchemaFree OCI_TypeInfoFree
93
#define OCI_SchemaGetColumnCount OCI_TypeInfoGetColumnCount
94
#define OCI_SchemaGetColumn OCI_TypeInfoGetColumn
95
#define OCI_SchemaGetName OCI_TypeInfoGetName
96
97
#define OCI_ColumnGetFractionnalPrecision OCI_ColumnGetFractionalPrecision
98
99
/* macro added in version 3.3.0 */
100
127
#define OCI_SetNull(stmt, index) \
128
OCI_BindSetNull(OCI_GetBind(stmt, index))
129
153
#define OCI_SetNull2(stmt, name) \
154
OCI_BindSetNull(OCI_GetBind2(stmt, name))
155
184
#define OCI_SetNullAtPos(stmt, index, position) \
185
OCI_BindSetNullAtPos(OCI_GetBind(stmt, index), position)
186
215
#define OCI_SetNullAtPos2(stmt, name, position) \
216
OCI_BindSetNullAtPos(OCI_GetBind2(stmt, name), position)
217
218
/* macro added in version 3.4.0 */
219
220
#define OCI_8 OCI_8_1
221
#define OCI_9 OCI_9_0
222
#define OCI_10 OCI_10_1
223
#define OCI_11 OCI_11_1
224
225
/* macro added in version 3.6.0 */
226
227
#define OCI_CHAR_UNICODE OCI_CHAR_WIDE
228
#define OCI_CSF_CHARSET OCI_CSF_DEFAULT
229
230
/* macro added in version 3.7.0 */
231
232
#define OCI_ConnPool OCI_Pool
233
234
#define OCI_ConnPoolCreate(db, us, pw, mo, mi, ma, in) \
235
OCI_PoolCreate(db, us, pw, OCI_POOL_CONNECTION, mo, mi, ma, in)
236
237
#define OCI_ConnPoolGetConnection(p) \
238
OCI_PoolGetConnection(p, NULL)
239
240
#define OCI_ConnPoolFree OCI_PoolFree
241
#define OCI_ConnPoolGetTimeout OCI_PoolGetConnection
242
#define OCI_ConnPoolSetTimeout OCI_PoolSetTimeout
243
#define OCI_ConnPoolGetNoWait OCI_PoolGetNoWait
244
#define OCI_ConnPoolSetNoWait OCI_PoolSetNoWait
245
#define OCI_ConnPoolGetBusyCount OCI_PoolGetBusyCount
246
#define OCI_ConnPoolGetOpenedCount OCI_PoolGetOpenedCount
247
#define OCI_ConnPoolGetMin OCI_PoolGetMin
248
#define OCI_ConnPoolGetMax OCI_PoolGetMax
249
#define OCI_ConnPoolGetIncrement OCI_PoolGetIncrement
250
251
/* macro added in version 3.8.0 */
252
253
#define OCI_ObjectGetTimeStamp OCI_ObjectGetTimestamp
254
#define OCI_ElemGetTimeStamp OCI_ElemGetTimestamp
255
#define OCI_TimestampSysTimeStamp OCI_TimestampSysTimestamp
256
257
/* macro added in version 4.0.0 */
258
259
#define OCI_CollSetAt OCI_CollSetElem
260
#define OCI_CollGetAt OCI_CollGetElem
261
#define OCI_CollGetAt2 OCI_CollGetElem2
262
263
#define OCI_GetCharsetMetaData OCI_GetCharset
264
#define OCI_GetCharsetUserData OCI_GetCharset
265
#define OCI_SIZE_TRACE_INF0 OCI_SIZE_TRACE_INFO
266
267
#define MT(x) OTEXT(x)
268
#define mtext otext
269
#define DT(x) OTEXT(x)
270
#define dtext otext
271
272
#define mtsdup ostrdup
273
#define mtscpy ostrcpy
274
#define mtsncpy ostrncpy
275
#define mtscat ostrcat
276
#define mtsncat ostrncat
277
#define mtslen ostrlen
278
#define mtscmp ostrcmp
279
#define mtscasecmp ostrcasecmp
280
#define mtsprintf osprintf
281
#define mtstol ostrtol
282
#define mtsscanf osscanf
283
284
#define dtsdup ostrdup
285
#define dtscpy ostrcpy
286
#define dtsncpy ostrncpy
287
#define dtscat ostrcat
288
#define dtsncat ostrncat
289
#define dtslen ostrlen
290
#define dtscmp ostrcmp
291
#define dtscasecmp ostrcasecmp
292
#define dtsprintf osprintf
293
#define dtstol ostrtol
294
#define dtsscanf osscanf
295
296
/* macro added in version 4.1.0 */
297
298
#define OCI_SetDefaultFormatDate(con, fmt) OCI_SetFormat(con, OCI_FMT_DATE, fmt)
299
#define OCI_SetDefaultFormatNumeric(con, fmt) OCI_SetFormat(con, OCI_FMT_NUMERIC, fmt)
300
301
#define OCI_GetDefaultFormatDate(con) OCI_GetFormat(con, OCI_FMT_DATE)
302
#define OCI_GetDefaultFormatNumeric(con) OCI_GetFormat(con, OCI_FMT_NUMERIC)
303
304
#define OCI_STRING_FORMAT_NUM_BIN OCI_STRING_FORMAT_NUM_BDOUBLE
305
310
#endif
/* OCILIB_COMPAT_H_INCLUDED */
Users
vince
source
repos
ocilib
include
ocilibc
compat.h
Generated on Mon Feb 6 2023 20:52:13 for OCILIB (C and C++ Driver for Oracle) by
1.9.6