oracledb 3.0.0 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/CHANGELOG.md +135 -8
  2. package/README.md +6 -4
  3. package/build/Release/oracledb-abi48-darwin-x64.node +0 -0
  4. package/build/Release/oracledb-abi48-darwin-x64.node-buildinfo.txt +1 -0
  5. package/build/Release/oracledb-abi48-linux-x64.node +0 -0
  6. package/build/Release/oracledb-abi48-linux-x64.node-buildinfo.txt +1 -0
  7. package/build/Release/oracledb-abi48-win32-x64.node +0 -0
  8. package/build/Release/oracledb-abi48-win32-x64.node-buildinfo.txt +1 -0
  9. package/build/Release/oracledb-abi57-darwin-x64.node +0 -0
  10. package/build/Release/oracledb-abi57-darwin-x64.node-buildinfo.txt +1 -0
  11. package/build/Release/oracledb-abi57-linux-x64.node +0 -0
  12. package/build/Release/oracledb-abi57-linux-x64.node-buildinfo.txt +1 -0
  13. package/build/Release/oracledb-abi57-win32-x64.node +0 -0
  14. package/build/Release/oracledb-abi57-win32-x64.node-buildinfo.txt +1 -0
  15. package/build/Release/oracledb-abi64-darwin-x64.node +0 -0
  16. package/build/Release/oracledb-abi64-darwin-x64.node-buildinfo.txt +1 -0
  17. package/build/Release/oracledb-abi64-linux-x64.node +0 -0
  18. package/build/Release/oracledb-abi64-linux-x64.node-buildinfo.txt +1 -0
  19. package/build/Release/oracledb-abi64-win32-x64.node +0 -0
  20. package/build/Release/oracledb-abi64-win32-x64.node-buildinfo.txt +1 -0
  21. package/build/Release/oracledb-abi67-darwin-x64.node +0 -0
  22. package/build/Release/oracledb-abi67-darwin-x64.node-buildinfo.txt +1 -0
  23. package/build/Release/oracledb-abi67-linux-x64.node +0 -0
  24. package/build/Release/oracledb-abi67-linux-x64.node-buildinfo.txt +1 -0
  25. package/build/Release/oracledb-abi67-win32-x64.node +0 -0
  26. package/build/Release/oracledb-abi67-win32-x64.node-buildinfo.txt +1 -0
  27. package/lib/connection.js +18 -4
  28. package/lib/oracledb.js +44 -92
  29. package/lib/pool.js +36 -2
  30. package/lib/sodaCollection.js +1 -1
  31. package/lib/sodaDatabase.js +1 -1
  32. package/lib/util.js +82 -5
  33. package/package/README.md +32 -101
  34. package/package/install.js +139 -0
  35. package/package/prunebinaries.js +51 -0
  36. package/package.json +4 -11
  37. package/binding.gyp +0 -162
  38. package/lib/rel.txt +0 -1
  39. package/odpi/.npmignore +0 -4
  40. package/odpi/LICENSE.md +0 -218
  41. package/odpi/README.md +0 -61
  42. package/odpi/embed/README.md +0 -4
  43. package/odpi/embed/dpi.c +0 -50
  44. package/odpi/include/dpi.h +0 -1748
  45. package/odpi/src/dpiConn.c +0 -2089
  46. package/odpi/src/dpiContext.c +0 -296
  47. package/odpi/src/dpiData.c +0 -797
  48. package/odpi/src/dpiDebug.c +0 -184
  49. package/odpi/src/dpiDeqOptions.c +0 -370
  50. package/odpi/src/dpiEnqOptions.c +0 -174
  51. package/odpi/src/dpiEnv.c +0 -189
  52. package/odpi/src/dpiError.c +0 -204
  53. package/odpi/src/dpiErrorMessages.h +0 -86
  54. package/odpi/src/dpiGen.c +0 -303
  55. package/odpi/src/dpiGlobal.c +0 -292
  56. package/odpi/src/dpiHandleList.c +0 -117
  57. package/odpi/src/dpiHandlePool.c +0 -118
  58. package/odpi/src/dpiImpl.h +0 -1707
  59. package/odpi/src/dpiLob.c +0 -506
  60. package/odpi/src/dpiMsgProps.c +0 -386
  61. package/odpi/src/dpiObject.c +0 -897
  62. package/odpi/src/dpiObjectAttr.c +0 -115
  63. package/odpi/src/dpiObjectType.c +0 -326
  64. package/odpi/src/dpiOci.c +0 -3527
  65. package/odpi/src/dpiOracleType.c +0 -492
  66. package/odpi/src/dpiPool.c +0 -549
  67. package/odpi/src/dpiRowid.c +0 -136
  68. package/odpi/src/dpiSodaColl.c +0 -685
  69. package/odpi/src/dpiSodaCollCursor.c +0 -143
  70. package/odpi/src/dpiSodaDb.c +0 -432
  71. package/odpi/src/dpiSodaDoc.c +0 -230
  72. package/odpi/src/dpiSodaDocCursor.c +0 -143
  73. package/odpi/src/dpiStmt.c +0 -1797
  74. package/odpi/src/dpiSubscr.c +0 -674
  75. package/odpi/src/dpiUtils.c +0 -410
  76. package/odpi/src/dpiVar.c +0 -1794
  77. package/package/MAKEPKG.BAT +0 -156
  78. package/package/Makefile +0 -85
  79. package/package/createpackage.js +0 -186
  80. package/package/extractpackage.js +0 -76
  81. package/package/getversion.js +0 -37
  82. package/package/oracledbinstall.js +0 -497
  83. package/package/package.json +0 -54
  84. package/package/util.js +0 -286
  85. package/src/njsCommon.cpp +0 -1055
  86. package/src/njsCommon.h +0 -484
  87. package/src/njsConnection.cpp +0 -2926
  88. package/src/njsConnection.h +0 -227
  89. package/src/njsIntLob.cpp +0 -618
  90. package/src/njsIntLob.h +0 -179
  91. package/src/njsMessages.cpp +0 -122
  92. package/src/njsMessages.h +0 -118
  93. package/src/njsOracle.cpp +0 -1274
  94. package/src/njsOracle.h +0 -237
  95. package/src/njsPool.cpp +0 -482
  96. package/src/njsPool.h +0 -132
  97. package/src/njsResultSet.cpp +0 -478
  98. package/src/njsResultSet.h +0 -120
  99. package/src/njsSodaCollection.cpp +0 -507
  100. package/src/njsSodaCollection.h +0 -128
  101. package/src/njsSodaDatabase.cpp +0 -335
  102. package/src/njsSodaDatabase.h +0 -108
  103. package/src/njsSodaDocCursor.cpp +0 -203
  104. package/src/njsSodaDocCursor.h +0 -94
  105. package/src/njsSodaDocument.cpp +0 -412
  106. package/src/njsSodaDocument.h +0 -105
  107. package/src/njsSodaOperation.cpp +0 -557
  108. package/src/njsSodaOperation.h +0 -123
  109. package/src/njsSubscription.cpp +0 -388
  110. package/src/njsSubscription.h +0 -111
  111. package/src/njsUtils.cpp +0 -158
  112. package/src/njsUtils.h +0 -68
@@ -1,1748 +0,0 @@
1
- //-----------------------------------------------------------------------------
2
- // Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
3
- // This program is free software: you can modify it and/or redistribute it
4
- // under the terms of:
5
- //
6
- // (i) the Universal Permissive License v 1.0 or at your option, any
7
- // later version (http://oss.oracle.com/licenses/upl); and/or
8
- //
9
- // (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0)
10
- //-----------------------------------------------------------------------------
11
-
12
- //-----------------------------------------------------------------------------
13
- // dpi.h
14
- // Master include file for ODPI-C library.
15
- //-----------------------------------------------------------------------------
16
-
17
- #ifndef DPI_PUBLIC
18
- #define DPI_PUBLIC
19
-
20
- // define standard integer types for older versions of Microsoft Visual Studio
21
- #ifdef _MSC_VER
22
- #if _MSC_VER < 1600
23
- #define int8_t signed __int8
24
- #define int16_t signed __int16
25
- #define int32_t signed __int32
26
- #define int64_t signed __int64
27
- #define uint8_t unsigned __int8
28
- #define uint16_t unsigned __int16
29
- #define uint32_t unsigned __int32
30
- #define uint64_t unsigned __int64
31
- #endif
32
- #endif
33
-
34
- #ifndef int8_t
35
- #include <stdint.h>
36
- #endif
37
-
38
- // define __func__ for older versions of Microsoft Visual Studio
39
- #ifdef _MSC_VER
40
- #if _MSC_VER < 1900
41
- #define __func__ __FUNCTION__
42
- #endif
43
- #endif
44
-
45
- // define ODPI-C version information
46
- #define DPI_MAJOR_VERSION 3
47
- #define DPI_MINOR_VERSION 0
48
- #define DPI_PATCH_LEVEL 0
49
- #define DPI_VERSION_SUFFIX "-dev"
50
-
51
- #define DPI_STR_HELPER(x) #x
52
- #define DPI_STR(x) DPI_STR_HELPER(x)
53
- #define DPI_VERSION_STRING \
54
- DPI_STR(DPI_MAJOR_VERSION) "." \
55
- DPI_STR(DPI_MINOR_VERSION) "." \
56
- DPI_STR(DPI_PATCH_LEVEL) \
57
- DPI_VERSION_SUFFIX
58
- #define DPI_DEFAULT_DRIVER_NAME "ODPI-C : " DPI_VERSION_STRING
59
-
60
- #define DPI_VERSION_TO_NUMBER(major, minor, patch) \
61
- ((major * 10000) + (minor * 100) + patch)
62
- #define DPI_VERSION_NUMBER \
63
- DPI_VERSION_TO_NUMBER(DPI_MAJOR_VERSION, DPI_MINOR_VERSION, \
64
- DPI_PATCH_LEVEL)
65
-
66
- #define DPI_ORACLE_VERSION_TO_NUMBER(versionNum, releaseNum, updateNum, \
67
- portReleaseNum, portUpdateNum) \
68
- ((versionNum * 100000000) + (releaseNum * 1000000) + \
69
- (updateNum * 10000) + (portReleaseNum * 100) + (portUpdateNum))
70
-
71
- // define default array size to use
72
- #define DPI_DEFAULT_FETCH_ARRAY_SIZE 100
73
-
74
- // define ping interval (in seconds) used when getting connections
75
- #define DPI_DEFAULT_PING_INTERVAL 60
76
-
77
- // define ping timeout (in milliseconds) used when getting connections
78
- #define DPI_DEFAULT_PING_TIMEOUT 5000
79
-
80
- // define constants for dequeue wait (AQ)
81
- #define DPI_DEQ_WAIT_NO_WAIT 0
82
- #define DPI_DEQ_WAIT_FOREVER ((uint32_t) -1)
83
-
84
- // define maximum precision that can be supported by an int64_t value
85
- #define DPI_MAX_INT64_PRECISION 18
86
-
87
- // define constants for success and failure of methods
88
- #define DPI_SUCCESS 0
89
- #define DPI_FAILURE -1
90
-
91
- // set debug level (DPI_DEBUG_LEVEL) as a bitmask of desired flags
92
- // reporting is to stderr
93
- // 0x0001: reports errors during free
94
- // 0x0002: reports on reference count changes
95
- // 0x0004: reports on public function calls
96
- // 0x0008: reports on all errors
97
- // 0x0010: reports on all SQL statements
98
- // 0x0020: reports on all memory allocations/frees
99
- #define DPI_DEBUG_LEVEL_FREES 0x0001
100
- #define DPI_DEBUG_LEVEL_REFS 0x0002
101
- #define DPI_DEBUG_LEVEL_FNS 0x0004
102
- #define DPI_DEBUG_LEVEL_ERRORS 0x0008
103
- #define DPI_DEBUG_LEVEL_SQL 0x0010
104
- #define DPI_DEBUG_LEVEL_MEM 0x0020
105
-
106
-
107
- //-----------------------------------------------------------------------------
108
- // Enumerations
109
- //-----------------------------------------------------------------------------
110
-
111
-
112
- // connection/pool authorization modes
113
- typedef uint32_t dpiAuthMode;
114
- #define DPI_MODE_AUTH_DEFAULT 0x00000000
115
- #define DPI_MODE_AUTH_SYSDBA 0x00000002
116
- #define DPI_MODE_AUTH_SYSOPER 0x00000004
117
- #define DPI_MODE_AUTH_PRELIM 0x00000008
118
- #define DPI_MODE_AUTH_SYSASM 0x00008000
119
- #define DPI_MODE_AUTH_SYSBKP 0x00020000
120
- #define DPI_MODE_AUTH_SYSDGD 0x00040000
121
- #define DPI_MODE_AUTH_SYSKMT 0x00080000
122
- #define DPI_MODE_AUTH_SYSRAC 0x00100000
123
-
124
- // connection close modes
125
- typedef uint32_t dpiConnCloseMode;
126
- #define DPI_MODE_CONN_CLOSE_DEFAULT 0x0000
127
- #define DPI_MODE_CONN_CLOSE_DROP 0x0001
128
- #define DPI_MODE_CONN_CLOSE_RETAG 0x0002
129
-
130
- // connection/pool creation modes
131
- typedef uint32_t dpiCreateMode;
132
- #define DPI_MODE_CREATE_DEFAULT 0x00000000
133
- #define DPI_MODE_CREATE_THREADED 0x00000001
134
- #define DPI_MODE_CREATE_EVENTS 0x00000004
135
-
136
- // dequeue modes for advanced queuing
137
- typedef uint32_t dpiDeqMode;
138
- #define DPI_MODE_DEQ_BROWSE 1
139
- #define DPI_MODE_DEQ_LOCKED 2
140
- #define DPI_MODE_DEQ_REMOVE 3
141
- #define DPI_MODE_DEQ_REMOVE_NO_DATA 4
142
-
143
- // dequeue navigation flags for advanced queuing
144
- typedef uint32_t dpiDeqNavigation;
145
- #define DPI_DEQ_NAV_FIRST_MSG 1
146
- #define DPI_DEQ_NAV_NEXT_TRANSACTION 2
147
- #define DPI_DEQ_NAV_NEXT_MSG 3
148
-
149
- // event types
150
- typedef uint32_t dpiEventType;
151
- #define DPI_EVENT_NONE 0
152
- #define DPI_EVENT_STARTUP 1
153
- #define DPI_EVENT_SHUTDOWN 2
154
- #define DPI_EVENT_SHUTDOWN_ANY 3
155
- #define DPI_EVENT_DROP_DB 4
156
- #define DPI_EVENT_DEREG 5
157
- #define DPI_EVENT_OBJCHANGE 6
158
- #define DPI_EVENT_QUERYCHANGE 7
159
- #define DPI_EVENT_AQ 100
160
-
161
- // statement execution modes
162
- typedef uint32_t dpiExecMode;
163
- #define DPI_MODE_EXEC_DEFAULT 0x00000000
164
- #define DPI_MODE_EXEC_DESCRIBE_ONLY 0x00000010
165
- #define DPI_MODE_EXEC_COMMIT_ON_SUCCESS 0x00000020
166
- #define DPI_MODE_EXEC_BATCH_ERRORS 0x00000080
167
- #define DPI_MODE_EXEC_PARSE_ONLY 0x00000100
168
- #define DPI_MODE_EXEC_ARRAY_DML_ROWCOUNTS 0x00100000
169
-
170
- // statement fetch modes
171
- typedef uint16_t dpiFetchMode;
172
- #define DPI_MODE_FETCH_NEXT 0x0002
173
- #define DPI_MODE_FETCH_FIRST 0x0004
174
- #define DPI_MODE_FETCH_LAST 0x0008
175
- #define DPI_MODE_FETCH_PRIOR 0x0010
176
- #define DPI_MODE_FETCH_ABSOLUTE 0x0020
177
- #define DPI_MODE_FETCH_RELATIVE 0x0040
178
-
179
- // message delivery modes in advanced queuing
180
- typedef uint16_t dpiMessageDeliveryMode;
181
- #define DPI_MODE_MSG_PERSISTENT 1
182
- #define DPI_MODE_MSG_BUFFERED 2
183
- #define DPI_MODE_MSG_PERSISTENT_OR_BUFFERED 3
184
-
185
- // message states in advanced queuing
186
- typedef uint32_t dpiMessageState;
187
- #define DPI_MSG_STATE_READY 0
188
- #define DPI_MSG_STATE_WAITING 1
189
- #define DPI_MSG_STATE_PROCESSED 2
190
- #define DPI_MSG_STATE_EXPIRED 3
191
-
192
- // native C types
193
- typedef uint32_t dpiNativeTypeNum;
194
- #define DPI_NATIVE_TYPE_INT64 3000
195
- #define DPI_NATIVE_TYPE_UINT64 3001
196
- #define DPI_NATIVE_TYPE_FLOAT 3002
197
- #define DPI_NATIVE_TYPE_DOUBLE 3003
198
- #define DPI_NATIVE_TYPE_BYTES 3004
199
- #define DPI_NATIVE_TYPE_TIMESTAMP 3005
200
- #define DPI_NATIVE_TYPE_INTERVAL_DS 3006
201
- #define DPI_NATIVE_TYPE_INTERVAL_YM 3007
202
- #define DPI_NATIVE_TYPE_LOB 3008
203
- #define DPI_NATIVE_TYPE_OBJECT 3009
204
- #define DPI_NATIVE_TYPE_STMT 3010
205
- #define DPI_NATIVE_TYPE_BOOLEAN 3011
206
- #define DPI_NATIVE_TYPE_ROWID 3012
207
-
208
- // operation codes (database change and continuous query notification)
209
- typedef uint32_t dpiOpCode;
210
- #define DPI_OPCODE_ALL_OPS 0x0
211
- #define DPI_OPCODE_ALL_ROWS 0x1
212
- #define DPI_OPCODE_INSERT 0x2
213
- #define DPI_OPCODE_UPDATE 0x4
214
- #define DPI_OPCODE_DELETE 0x8
215
- #define DPI_OPCODE_ALTER 0x10
216
- #define DPI_OPCODE_DROP 0x20
217
- #define DPI_OPCODE_UNKNOWN 0x40
218
-
219
- // Oracle types
220
- typedef uint32_t dpiOracleTypeNum;
221
- #define DPI_ORACLE_TYPE_NONE 2000
222
- #define DPI_ORACLE_TYPE_VARCHAR 2001
223
- #define DPI_ORACLE_TYPE_NVARCHAR 2002
224
- #define DPI_ORACLE_TYPE_CHAR 2003
225
- #define DPI_ORACLE_TYPE_NCHAR 2004
226
- #define DPI_ORACLE_TYPE_ROWID 2005
227
- #define DPI_ORACLE_TYPE_RAW 2006
228
- #define DPI_ORACLE_TYPE_NATIVE_FLOAT 2007
229
- #define DPI_ORACLE_TYPE_NATIVE_DOUBLE 2008
230
- #define DPI_ORACLE_TYPE_NATIVE_INT 2009
231
- #define DPI_ORACLE_TYPE_NUMBER 2010
232
- #define DPI_ORACLE_TYPE_DATE 2011
233
- #define DPI_ORACLE_TYPE_TIMESTAMP 2012
234
- #define DPI_ORACLE_TYPE_TIMESTAMP_TZ 2013
235
- #define DPI_ORACLE_TYPE_TIMESTAMP_LTZ 2014
236
- #define DPI_ORACLE_TYPE_INTERVAL_DS 2015
237
- #define DPI_ORACLE_TYPE_INTERVAL_YM 2016
238
- #define DPI_ORACLE_TYPE_CLOB 2017
239
- #define DPI_ORACLE_TYPE_NCLOB 2018
240
- #define DPI_ORACLE_TYPE_BLOB 2019
241
- #define DPI_ORACLE_TYPE_BFILE 2020
242
- #define DPI_ORACLE_TYPE_STMT 2021
243
- #define DPI_ORACLE_TYPE_BOOLEAN 2022
244
- #define DPI_ORACLE_TYPE_OBJECT 2023
245
- #define DPI_ORACLE_TYPE_LONG_VARCHAR 2024
246
- #define DPI_ORACLE_TYPE_LONG_RAW 2025
247
- #define DPI_ORACLE_TYPE_NATIVE_UINT 2026
248
- #define DPI_ORACLE_TYPE_MAX 2027
249
-
250
- // session pool close modes
251
- typedef uint32_t dpiPoolCloseMode;
252
- #define DPI_MODE_POOL_CLOSE_DEFAULT 0x0000
253
- #define DPI_MODE_POOL_CLOSE_FORCE 0x0001
254
-
255
- // modes used when acquiring a connection from a session pool
256
- typedef uint8_t dpiPoolGetMode;
257
- #define DPI_MODE_POOL_GET_WAIT 0
258
- #define DPI_MODE_POOL_GET_NOWAIT 1
259
- #define DPI_MODE_POOL_GET_FORCEGET 2
260
- #define DPI_MODE_POOL_GET_TIMEDWAIT 3
261
-
262
- // purity values when acquiring a connection from a pool
263
- typedef uint32_t dpiPurity;
264
- #define DPI_PURITY_DEFAULT 0
265
- #define DPI_PURITY_NEW 1
266
- #define DPI_PURITY_SELF 2
267
-
268
- // database shutdown modes
269
- typedef uint32_t dpiShutdownMode;
270
- #define DPI_MODE_SHUTDOWN_DEFAULT 0
271
- #define DPI_MODE_SHUTDOWN_TRANSACTIONAL 1
272
- #define DPI_MODE_SHUTDOWN_TRANSACTIONAL_LOCAL 2
273
- #define DPI_MODE_SHUTDOWN_IMMEDIATE 3
274
- #define DPI_MODE_SHUTDOWN_ABORT 4
275
- #define DPI_MODE_SHUTDOWN_FINAL 5
276
-
277
- // SODA flags
278
- #define DPI_SODA_FLAGS_DEFAULT 0x00
279
- #define DPI_SODA_FLAGS_ATOMIC_COMMIT 0x01
280
- #define DPI_SODA_FLAGS_CREATE_COLL_MAP 0x02
281
- #define DPI_SODA_FLAGS_INDEX_DROP_FORCE 0x04
282
-
283
- // database startup modes
284
- typedef uint32_t dpiStartupMode;
285
- #define DPI_MODE_STARTUP_DEFAULT 0
286
- #define DPI_MODE_STARTUP_FORCE 1
287
- #define DPI_MODE_STARTUP_RESTRICT 2
288
-
289
- // statement types
290
- typedef uint16_t dpiStatementType;
291
- #define DPI_STMT_TYPE_UNKNOWN 0
292
- #define DPI_STMT_TYPE_SELECT 1
293
- #define DPI_STMT_TYPE_UPDATE 2
294
- #define DPI_STMT_TYPE_DELETE 3
295
- #define DPI_STMT_TYPE_INSERT 4
296
- #define DPI_STMT_TYPE_CREATE 5
297
- #define DPI_STMT_TYPE_DROP 6
298
- #define DPI_STMT_TYPE_ALTER 7
299
- #define DPI_STMT_TYPE_BEGIN 8
300
- #define DPI_STMT_TYPE_DECLARE 9
301
- #define DPI_STMT_TYPE_CALL 10
302
- #define DPI_STMT_TYPE_EXPLAIN_PLAN 15
303
- #define DPI_STMT_TYPE_MERGE 16
304
- #define DPI_STMT_TYPE_ROLLBACK 17
305
- #define DPI_STMT_TYPE_COMMIT 21
306
-
307
- // subscription grouping classes
308
- typedef uint8_t dpiSubscrGroupingClass;
309
- #define DPI_SUBSCR_GROUPING_CLASS_TIME 1
310
-
311
- // subscription grouping types
312
- typedef uint8_t dpiSubscrGroupingType;
313
- #define DPI_SUBSCR_GROUPING_TYPE_SUMMARY 1
314
- #define DPI_SUBSCR_GROUPING_TYPE_LAST 2
315
-
316
- // subscription namespaces
317
- typedef uint32_t dpiSubscrNamespace;
318
- #define DPI_SUBSCR_NAMESPACE_AQ 1
319
- #define DPI_SUBSCR_NAMESPACE_DBCHANGE 2
320
-
321
- // subscription protocols
322
- typedef uint32_t dpiSubscrProtocol;
323
- #define DPI_SUBSCR_PROTO_CALLBACK 0
324
- #define DPI_SUBSCR_PROTO_MAIL 1
325
- #define DPI_SUBSCR_PROTO_PLSQL 2
326
- #define DPI_SUBSCR_PROTO_HTTP 3
327
-
328
- // subscription quality of service
329
- typedef uint32_t dpiSubscrQOS;
330
- #define DPI_SUBSCR_QOS_RELIABLE 0x01
331
- #define DPI_SUBSCR_QOS_DEREG_NFY 0x02
332
- #define DPI_SUBSCR_QOS_ROWIDS 0x04
333
- #define DPI_SUBSCR_QOS_QUERY 0x08
334
- #define DPI_SUBSCR_QOS_BEST_EFFORT 0x10
335
-
336
- // visibility of messages in advanced queuing
337
- typedef uint32_t dpiVisibility;
338
- #define DPI_VISIBILITY_IMMEDIATE 1
339
- #define DPI_VISIBILITY_ON_COMMIT 2
340
-
341
-
342
- //-----------------------------------------------------------------------------
343
- // Handle Types
344
- //-----------------------------------------------------------------------------
345
- typedef struct dpiConn dpiConn;
346
- typedef struct dpiPool dpiPool;
347
- typedef struct dpiStmt dpiStmt;
348
- typedef struct dpiVar dpiVar;
349
- typedef struct dpiLob dpiLob;
350
- typedef struct dpiObject dpiObject;
351
- typedef struct dpiObjectAttr dpiObjectAttr;
352
- typedef struct dpiObjectType dpiObjectType;
353
- typedef struct dpiRowid dpiRowid;
354
- typedef struct dpiSubscr dpiSubscr;
355
- typedef struct dpiDeqOptions dpiDeqOptions;
356
- typedef struct dpiEnqOptions dpiEnqOptions;
357
- typedef struct dpiMsgProps dpiMsgProps;
358
-
359
-
360
- //-----------------------------------------------------------------------------
361
- // Complex Native Data Types (used for transferring data to/from ODPI-C)
362
- //-----------------------------------------------------------------------------
363
-
364
- // structure used for transferring byte strings to/from ODPI-C
365
- typedef struct {
366
- char *ptr;
367
- uint32_t length;
368
- const char *encoding;
369
- } dpiBytes;
370
-
371
- // structure used for transferring day/seconds intervals to/from ODPI-C
372
- typedef struct {
373
- int32_t days;
374
- int32_t hours;
375
- int32_t minutes;
376
- int32_t seconds;
377
- int32_t fseconds;
378
- } dpiIntervalDS;
379
-
380
- // structure used for transferring years/months intervals to/from ODPI-C
381
- typedef struct {
382
- int32_t years;
383
- int32_t months;
384
- } dpiIntervalYM;
385
-
386
- // structure used for transferring dates to/from ODPI-C
387
- typedef struct {
388
- int16_t year;
389
- uint8_t month;
390
- uint8_t day;
391
- uint8_t hour;
392
- uint8_t minute;
393
- uint8_t second;
394
- uint32_t fsecond;
395
- int8_t tzHourOffset;
396
- int8_t tzMinuteOffset;
397
- } dpiTimestamp;
398
-
399
-
400
- //-----------------------------------------------------------------------------
401
- // Other Types
402
- //-----------------------------------------------------------------------------
403
-
404
- // forward declarations
405
- typedef struct dpiAppContext dpiAppContext;
406
- typedef struct dpiCommonCreateParams dpiCommonCreateParams;
407
- typedef struct dpiConnCreateParams dpiConnCreateParams;
408
- typedef struct dpiContext dpiContext;
409
- typedef struct dpiData dpiData;
410
- typedef struct dpiDataTypeInfo dpiDataTypeInfo;
411
- typedef struct dpiEncodingInfo dpiEncodingInfo;
412
- typedef struct dpiErrorInfo dpiErrorInfo;
413
- typedef struct dpiObjectAttrInfo dpiObjectAttrInfo;
414
- typedef struct dpiObjectTypeInfo dpiObjectTypeInfo;
415
- typedef struct dpiPoolCreateParams dpiPoolCreateParams;
416
- typedef struct dpiQueryInfo dpiQueryInfo;
417
- typedef struct dpiShardingKeyColumn dpiShardingKeyColumn;
418
- typedef struct dpiSodaColl dpiSodaColl;
419
- typedef struct dpiSodaCollNames dpiSodaCollNames;
420
- typedef struct dpiSodaCollCursor dpiSodaCollCursor;
421
- typedef struct dpiSodaDb dpiSodaDb;
422
- typedef struct dpiSodaDoc dpiSodaDoc;
423
- typedef struct dpiSodaDocCursor dpiSodaDocCursor;
424
- typedef struct dpiSodaOperOptions dpiSodaOperOptions;
425
- typedef struct dpiStmtInfo dpiStmtInfo;
426
- typedef struct dpiSubscrCreateParams dpiSubscrCreateParams;
427
- typedef struct dpiSubscrMessage dpiSubscrMessage;
428
- typedef struct dpiSubscrMessageQuery dpiSubscrMessageQuery;
429
- typedef struct dpiSubscrMessageRow dpiSubscrMessageRow;
430
- typedef struct dpiSubscrMessageTable dpiSubscrMessageTable;
431
- typedef struct dpiVersionInfo dpiVersionInfo;
432
-
433
- // union used for providing a buffer of any data type
434
- typedef union {
435
- int asBoolean;
436
- int64_t asInt64;
437
- uint64_t asUint64;
438
- float asFloat;
439
- double asDouble;
440
- dpiBytes asBytes;
441
- dpiTimestamp asTimestamp;
442
- dpiIntervalDS asIntervalDS;
443
- dpiIntervalYM asIntervalYM;
444
- dpiLob *asLOB;
445
- dpiObject *asObject;
446
- dpiStmt *asStmt;
447
- dpiRowid *asRowid;
448
- } dpiDataBuffer;
449
-
450
- // structure used for application context
451
- struct dpiAppContext {
452
- const char *namespaceName;
453
- uint32_t namespaceNameLength;
454
- const char *name;
455
- uint32_t nameLength;
456
- const char *value;
457
- uint32_t valueLength;
458
- };
459
-
460
- // structure used for common parameters used for creating standalone
461
- // connections and session pools
462
- struct dpiCommonCreateParams {
463
- dpiCreateMode createMode;
464
- const char *encoding;
465
- const char *nencoding;
466
- const char *edition;
467
- uint32_t editionLength;
468
- const char *driverName;
469
- uint32_t driverNameLength;
470
- };
471
-
472
- // structure used for creating connections
473
- struct dpiConnCreateParams {
474
- dpiAuthMode authMode;
475
- const char *connectionClass;
476
- uint32_t connectionClassLength;
477
- dpiPurity purity;
478
- const char *newPassword;
479
- uint32_t newPasswordLength;
480
- dpiAppContext *appContext;
481
- uint32_t numAppContext;
482
- int externalAuth;
483
- void *externalHandle;
484
- dpiPool *pool;
485
- const char *tag;
486
- uint32_t tagLength;
487
- int matchAnyTag;
488
- const char *outTag;
489
- uint32_t outTagLength;
490
- int outTagFound;
491
- dpiShardingKeyColumn *shardingKeyColumns;
492
- uint8_t numShardingKeyColumns;
493
- dpiShardingKeyColumn *superShardingKeyColumns;
494
- uint8_t numSuperShardingKeyColumns;
495
- };
496
-
497
- // structure used for transferring data to/from ODPI-C
498
- struct dpiData {
499
- int isNull;
500
- dpiDataBuffer value;
501
- };
502
-
503
- // structure used for providing metadata about data types
504
- struct dpiDataTypeInfo {
505
- dpiOracleTypeNum oracleTypeNum;
506
- dpiNativeTypeNum defaultNativeTypeNum;
507
- uint16_t ociTypeCode;
508
- uint32_t dbSizeInBytes;
509
- uint32_t clientSizeInBytes;
510
- uint32_t sizeInChars;
511
- int16_t precision;
512
- int8_t scale;
513
- uint8_t fsPrecision;
514
- dpiObjectType *objectType;
515
- };
516
-
517
- // structure used for transferring encoding information from ODPI-C
518
- struct dpiEncodingInfo {
519
- const char *encoding;
520
- int32_t maxBytesPerCharacter;
521
- const char *nencoding;
522
- int32_t nmaxBytesPerCharacter;
523
- };
524
-
525
- // structure used for transferring error information from ODPI-C
526
- struct dpiErrorInfo {
527
- int32_t code;
528
- uint16_t offset;
529
- const char *message;
530
- uint32_t messageLength;
531
- const char *encoding;
532
- const char *fnName;
533
- const char *action;
534
- const char *sqlState;
535
- int isRecoverable;
536
- };
537
-
538
- // structure used for transferring object attribute information from ODPI-C
539
- struct dpiObjectAttrInfo {
540
- const char *name;
541
- uint32_t nameLength;
542
- dpiDataTypeInfo typeInfo;
543
- };
544
-
545
- // structure used for transferring object type information from ODPI-C
546
- struct dpiObjectTypeInfo {
547
- const char *schema;
548
- uint32_t schemaLength;
549
- const char *name;
550
- uint32_t nameLength;
551
- int isCollection;
552
- dpiDataTypeInfo elementTypeInfo;
553
- uint16_t numAttributes;
554
- };
555
-
556
- // structure used for creating pools
557
- struct dpiPoolCreateParams {
558
- uint32_t minSessions;
559
- uint32_t maxSessions;
560
- uint32_t sessionIncrement;
561
- int pingInterval;
562
- int pingTimeout;
563
- int homogeneous;
564
- int externalAuth;
565
- dpiPoolGetMode getMode;
566
- const char *outPoolName;
567
- uint32_t outPoolNameLength;
568
- uint32_t timeout;
569
- uint32_t waitTimeout;
570
- uint32_t maxLifetimeSession;
571
- };
572
-
573
- // structure used for transferring query metadata from ODPI-C
574
- struct dpiQueryInfo {
575
- const char *name;
576
- uint32_t nameLength;
577
- dpiDataTypeInfo typeInfo;
578
- int nullOk;
579
- };
580
-
581
- // structure used for sharding key columns
582
- struct dpiShardingKeyColumn {
583
- dpiOracleTypeNum oracleTypeNum;
584
- dpiNativeTypeNum nativeTypeNum;
585
- dpiDataBuffer value;
586
- };
587
-
588
- // structure used for getting collection names from the database
589
- struct dpiSodaCollNames {
590
- uint32_t numNames;
591
- const char **names;
592
- uint32_t *nameLengths;
593
- };
594
-
595
- // structure used for SODA operations (find/replace/remove)
596
- struct dpiSodaOperOptions {
597
- uint32_t numKeys;
598
- const char **keys;
599
- uint32_t *keyLengths;
600
- const char *key;
601
- uint32_t keyLength;
602
- const char *version;
603
- uint32_t versionLength;
604
- const char *filter;
605
- uint32_t filterLength;
606
- uint32_t skip;
607
- uint32_t limit;
608
- };
609
-
610
- // structure used for transferring statement information from ODPI-C
611
- struct dpiStmtInfo {
612
- int isQuery;
613
- int isPLSQL;
614
- int isDDL;
615
- int isDML;
616
- dpiStatementType statementType;
617
- int isReturning;
618
- };
619
-
620
- // callback for subscriptions
621
- typedef void (*dpiSubscrCallback)(void* context, dpiSubscrMessage *message);
622
-
623
- // structure used for creating subscriptions
624
- struct dpiSubscrCreateParams {
625
- dpiSubscrNamespace subscrNamespace;
626
- dpiSubscrProtocol protocol;
627
- dpiSubscrQOS qos;
628
- dpiOpCode operations;
629
- uint32_t portNumber;
630
- uint32_t timeout;
631
- const char *name;
632
- uint32_t nameLength;
633
- dpiSubscrCallback callback;
634
- void *callbackContext;
635
- const char *recipientName;
636
- uint32_t recipientNameLength;
637
- const char *ipAddress;
638
- uint32_t ipAddressLength;
639
- uint8_t groupingClass;
640
- uint32_t groupingValue;
641
- uint8_t groupingType;
642
- };
643
-
644
- // structure used for transferring messages in subscription callbacks
645
- struct dpiSubscrMessage {
646
- dpiEventType eventType;
647
- const char *dbName;
648
- uint32_t dbNameLength;
649
- dpiSubscrMessageTable *tables;
650
- uint32_t numTables;
651
- dpiSubscrMessageQuery *queries;
652
- uint32_t numQueries;
653
- dpiErrorInfo *errorInfo;
654
- const void *txId;
655
- uint32_t txIdLength;
656
- int registered;
657
- const char *queueName;
658
- uint32_t queueNameLength;
659
- const char *consumerName;
660
- uint32_t consumerNameLength;
661
- };
662
-
663
- // structure used for transferring query information in messages in
664
- // subscription callbacks (continuous query notification)
665
- struct dpiSubscrMessageQuery {
666
- uint64_t id;
667
- dpiOpCode operation;
668
- dpiSubscrMessageTable *tables;
669
- uint32_t numTables;
670
- };
671
-
672
- // structure used for transferring row information in messages in
673
- // subscription callbacks
674
- struct dpiSubscrMessageRow {
675
- dpiOpCode operation;
676
- const char *rowid;
677
- uint32_t rowidLength;
678
- };
679
-
680
- // structure used for transferring table information in messages in
681
- // subscription callbacks
682
- struct dpiSubscrMessageTable {
683
- dpiOpCode operation;
684
- const char *name;
685
- uint32_t nameLength;
686
- dpiSubscrMessageRow *rows;
687
- uint32_t numRows;
688
- };
689
-
690
- // structure used for transferring version information
691
- struct dpiVersionInfo {
692
- int versionNum;
693
- int releaseNum;
694
- int updateNum;
695
- int portReleaseNum;
696
- int portUpdateNum;
697
- uint32_t fullVersionNum;
698
- };
699
-
700
-
701
- //-----------------------------------------------------------------------------
702
- // Context Methods (dpiContext)
703
- //-----------------------------------------------------------------------------
704
-
705
- // create a context handle and validate the version information
706
- int dpiContext_create(unsigned int majorVersion, unsigned int minorVersion,
707
- dpiContext **context, dpiErrorInfo *errorInfo);
708
-
709
- // destroy context handle
710
- int dpiContext_destroy(dpiContext *context);
711
-
712
- // return the OCI client version in use
713
- int dpiContext_getClientVersion(const dpiContext *context,
714
- dpiVersionInfo *versionInfo);
715
-
716
- // get error information
717
- void dpiContext_getError(const dpiContext *context, dpiErrorInfo *errorInfo);
718
-
719
- // initialize context parameters to default values
720
- int dpiContext_initCommonCreateParams(const dpiContext *context,
721
- dpiCommonCreateParams *params);
722
-
723
- // initialize connection create parameters to default values
724
- int dpiContext_initConnCreateParams(const dpiContext *context,
725
- dpiConnCreateParams *params);
726
-
727
- // initialize pool create parameters to default values
728
- int dpiContext_initPoolCreateParams(const dpiContext *context,
729
- dpiPoolCreateParams *params);
730
-
731
- // initialize SODA operation options to default values
732
- int dpiContext_initSodaOperOptions(const dpiContext *context,
733
- dpiSodaOperOptions *options);
734
-
735
- // initialize subscription create parameters to default values
736
- int dpiContext_initSubscrCreateParams(const dpiContext *context,
737
- dpiSubscrCreateParams *params);
738
-
739
-
740
- //-----------------------------------------------------------------------------
741
- // Connection Methods (dpiConn)
742
- //-----------------------------------------------------------------------------
743
-
744
- // add a reference to a connection
745
- int dpiConn_addRef(dpiConn *conn);
746
-
747
- // begin a distributed transaction
748
- int dpiConn_beginDistribTrans(dpiConn *conn, long formatId,
749
- const char *transactionId, uint32_t transactionIdLength,
750
- const char *branchId, uint32_t branchIdLength);
751
-
752
- // break execution of the statement running on the connection
753
- int dpiConn_breakExecution(dpiConn *conn);
754
-
755
- // change the password for the specified user
756
- int dpiConn_changePassword(dpiConn *conn, const char *userName,
757
- uint32_t userNameLength, const char *oldPassword,
758
- uint32_t oldPasswordLength, const char *newPassword,
759
- uint32_t newPasswordLength);
760
-
761
- // close the connection now, not when the reference count reaches zero
762
- int dpiConn_close(dpiConn *conn, dpiConnCloseMode mode, const char *tag,
763
- uint32_t tagLength);
764
-
765
- // commits the current active transaction
766
- int dpiConn_commit(dpiConn *conn);
767
-
768
- // create a connection and return a reference to it
769
- int dpiConn_create(const dpiContext *context, const char *userName,
770
- uint32_t userNameLength, const char *password, uint32_t passwordLength,
771
- const char *connectString, uint32_t connectStringLength,
772
- const dpiCommonCreateParams *commonParams,
773
- dpiConnCreateParams *createParams, dpiConn **conn);
774
-
775
- // dequeue a message from a queue
776
- int dpiConn_deqObject(dpiConn *conn, const char *queueName,
777
- uint32_t queueNameLength, dpiDeqOptions *options, dpiMsgProps *props,
778
- dpiObject *payload, const char **msgId, uint32_t *msgIdLength);
779
-
780
- // enqueue a message to a queue
781
- int dpiConn_enqObject(dpiConn *conn, const char *queueName,
782
- uint32_t queueNameLength, dpiEnqOptions *options, dpiMsgProps *props,
783
- dpiObject *payload, const char **msgId, uint32_t *msgIdLength);
784
-
785
- // get call timeout in place for round-trips with this connection
786
- int dpiConn_getCallTimeout(dpiConn *conn, uint32_t *value);
787
-
788
- // get current schema associated with the connection
789
- int dpiConn_getCurrentSchema(dpiConn *conn, const char **value,
790
- uint32_t *valueLength);
791
-
792
- // get edition associated with the connection
793
- int dpiConn_getEdition(dpiConn *conn, const char **value,
794
- uint32_t *valueLength);
795
-
796
- // return the encoding information used by the connection
797
- int dpiConn_getEncodingInfo(dpiConn *conn, dpiEncodingInfo *info);
798
-
799
- // get external name associated with the connection
800
- int dpiConn_getExternalName(dpiConn *conn, const char **value,
801
- uint32_t *valueLength);
802
-
803
- // get the OCI service context handle associated with the connection
804
- int dpiConn_getHandle(dpiConn *conn, void **handle);
805
-
806
- // get internal name associated with the connection
807
- int dpiConn_getInternalName(dpiConn *conn, const char **value,
808
- uint32_t *valueLength);
809
-
810
- // get logical transaction id associated with the connection
811
- int dpiConn_getLTXID(dpiConn *conn, const char **value, uint32_t *valueLength);
812
-
813
- // create a new object type and return it for subsequent object creation
814
- int dpiConn_getObjectType(dpiConn *conn, const char *name, uint32_t nameLength,
815
- dpiObjectType **objType);
816
-
817
- // return information about the server version in use
818
- int dpiConn_getServerVersion(dpiConn *conn, const char **releaseString,
819
- uint32_t *releaseStringLength, dpiVersionInfo *versionInfo);
820
-
821
- // get SODA interface object
822
- int dpiConn_getSodaDb(dpiConn *conn, dpiSodaDb **db);
823
-
824
- // return the statement cache size
825
- int dpiConn_getStmtCacheSize(dpiConn *conn, uint32_t *cacheSize);
826
-
827
- // create a new dequeue options object and return it
828
- int dpiConn_newDeqOptions(dpiConn *conn, dpiDeqOptions **options);
829
-
830
- // create a new enqueue options object and return it
831
- int dpiConn_newEnqOptions(dpiConn *conn, dpiEnqOptions **options);
832
-
833
- // create a new message properties object and return it
834
- int dpiConn_newMsgProps(dpiConn *conn, dpiMsgProps **props);
835
-
836
- // create a new temporary LOB
837
- int dpiConn_newTempLob(dpiConn *conn, dpiOracleTypeNum lobType, dpiLob **lob);
838
-
839
- // create a new variable and return it for subsequent binding/defining
840
- int dpiConn_newVar(dpiConn *conn, dpiOracleTypeNum oracleTypeNum,
841
- dpiNativeTypeNum nativeTypeNum, uint32_t maxArraySize, uint32_t size,
842
- int sizeIsBytes, int isArray, dpiObjectType *objType, dpiVar **var,
843
- dpiData **data);
844
-
845
- // ping the connection to see if it is still alive
846
- int dpiConn_ping(dpiConn *conn);
847
-
848
- // prepare a distributed transaction for commit
849
- int dpiConn_prepareDistribTrans(dpiConn *conn, int *commitNeeded);
850
-
851
- // prepare a statement and return it for subsequent execution/fetching
852
- int dpiConn_prepareStmt(dpiConn *conn, int scrollable, const char *sql,
853
- uint32_t sqlLength, const char *tag, uint32_t tagLength,
854
- dpiStmt **stmt);
855
-
856
- // release a reference to the connection
857
- int dpiConn_release(dpiConn *conn);
858
-
859
- // rolls back the current active transaction
860
- int dpiConn_rollback(dpiConn *conn);
861
-
862
- // set action associated with the connection
863
- int dpiConn_setAction(dpiConn *conn, const char *value, uint32_t valueLength);
864
-
865
- // set call timeout for subsequent round-trips with this connection
866
- int dpiConn_setCallTimeout(dpiConn *conn, uint32_t value);
867
-
868
- // set client identifier associated with the connection
869
- int dpiConn_setClientIdentifier(dpiConn *conn, const char *value,
870
- uint32_t valueLength);
871
-
872
- // set client info associated with the connection
873
- int dpiConn_setClientInfo(dpiConn *conn, const char *value,
874
- uint32_t valueLength);
875
-
876
- // set current schema associated with the connection
877
- int dpiConn_setCurrentSchema(dpiConn *conn, const char *value,
878
- uint32_t valueLength);
879
-
880
- // set database operation associated with the connection
881
- int dpiConn_setDbOp(dpiConn *conn, const char *value, uint32_t valueLength);
882
-
883
- // set external name associated with the connection
884
- int dpiConn_setExternalName(dpiConn *conn, const char *value,
885
- uint32_t valueLength);
886
-
887
- // set internal name associated with the connection
888
- int dpiConn_setInternalName(dpiConn *conn, const char *value,
889
- uint32_t valueLength);
890
-
891
- // set module associated with the connection
892
- int dpiConn_setModule(dpiConn *conn, const char *value, uint32_t valueLength);
893
-
894
- // set the statement cache size
895
- int dpiConn_setStmtCacheSize(dpiConn *conn, uint32_t cacheSize);
896
-
897
- // shutdown the database
898
- int dpiConn_shutdownDatabase(dpiConn *conn, dpiShutdownMode mode);
899
-
900
- // startup the database
901
- int dpiConn_startupDatabase(dpiConn *conn, dpiStartupMode mode);
902
-
903
- // subscribe to events in the database
904
- int dpiConn_subscribe(dpiConn *conn, dpiSubscrCreateParams *params,
905
- dpiSubscr **subscr);
906
-
907
- // unsubscribe from events in the database
908
- int dpiConn_unsubscribe(dpiConn *conn, dpiSubscr *subscr);
909
-
910
-
911
- //-----------------------------------------------------------------------------
912
- // Data Methods (dpiData)
913
- //-----------------------------------------------------------------------------
914
-
915
- // return the boolean portion of the data
916
- int dpiData_getBool(dpiData *data);
917
-
918
- // return the bytes portion of the data
919
- dpiBytes *dpiData_getBytes(dpiData *data);
920
-
921
- // return the double portion of the data
922
- double dpiData_getDouble(dpiData *data);
923
-
924
- // return the float portion of the data
925
- float dpiData_getFloat(dpiData *data);
926
-
927
- // return the integer portion of the data
928
- int64_t dpiData_getInt64(dpiData *data);
929
-
930
- // return the interval (days/seconds) portion of the data
931
- dpiIntervalDS *dpiData_getIntervalDS(dpiData *data);
932
-
933
- // return the interval (years/months) portion of the data
934
- dpiIntervalYM *dpiData_getIntervalYM(dpiData *data);
935
-
936
- // return the LOB portion of the data
937
- dpiLob *dpiData_getLOB(dpiData *data);
938
-
939
- // return the object portion of the data
940
- dpiObject *dpiData_getObject(dpiData *data);
941
-
942
- // return the statement portion of the data
943
- dpiStmt *dpiData_getStmt(dpiData *data);
944
-
945
- // return the timestamp portion of the data
946
- dpiTimestamp *dpiData_getTimestamp(dpiData *data);
947
-
948
- // return the unsigned integer portion of the data
949
- uint64_t dpiData_getUint64(dpiData *data);
950
-
951
- // set the boolean portion of the data
952
- void dpiData_setBool(dpiData *data, int value);
953
-
954
- // set the bytes portion of the data
955
- void dpiData_setBytes(dpiData *data, char *ptr, uint32_t length);
956
-
957
- // set the double portion of the data
958
- void dpiData_setDouble(dpiData *data, double value);
959
-
960
- // set the float portion of the data
961
- void dpiData_setFloat(dpiData *data, float value);
962
-
963
- // set the integer portion of the data
964
- void dpiData_setInt64(dpiData *data, int64_t value);
965
-
966
- // set the interval (days/seconds) portion of the data
967
- void dpiData_setIntervalDS(dpiData *data, int32_t days, int32_t hours,
968
- int32_t minutes, int32_t seconds, int32_t fsceconds);
969
-
970
- // set the interval (years/months) portion of the data
971
- void dpiData_setIntervalYM(dpiData *data, int32_t years, int32_t months);
972
-
973
- // set the LOB portion of the data
974
- void dpiData_setLOB(dpiData *data, dpiLob *lob);
975
-
976
- // set the object portion of the data
977
- void dpiData_setObject(dpiData *data, dpiObject *obj);
978
-
979
- // set the statement portion of the data
980
- void dpiData_setStmt(dpiData *data, dpiStmt *stmt);
981
-
982
- // set the timestamp portion of the data
983
- void dpiData_setTimestamp(dpiData *data, int16_t year, uint8_t month,
984
- uint8_t day, uint8_t hour, uint8_t minute, uint8_t second,
985
- uint32_t fsecond, int8_t tzHourOffset, int8_t tzMinuteOffset);
986
-
987
- // set the unsigned integer portion of the data
988
- void dpiData_setUint64(dpiData *data, uint64_t value);
989
-
990
-
991
- //-----------------------------------------------------------------------------
992
- // Dequeue Option Methods (dpiDeqOptions)
993
- //-----------------------------------------------------------------------------
994
-
995
- // add a reference to dequeue options
996
- int dpiDeqOptions_addRef(dpiDeqOptions *options);
997
-
998
- // return condition associated with dequeue options
999
- int dpiDeqOptions_getCondition(dpiDeqOptions *options, const char **value,
1000
- uint32_t *valueLength);
1001
-
1002
- // return consumer name associated with dequeue options
1003
- int dpiDeqOptions_getConsumerName(dpiDeqOptions *options, const char **value,
1004
- uint32_t *valueLength);
1005
-
1006
- // return correlation associated with dequeue options
1007
- int dpiDeqOptions_getCorrelation(dpiDeqOptions *options, const char **value,
1008
- uint32_t *valueLength);
1009
-
1010
- // return mode associated with dequeue options
1011
- int dpiDeqOptions_getMode(dpiDeqOptions *options, dpiDeqMode *value);
1012
-
1013
- // return message id associated with dequeue options
1014
- int dpiDeqOptions_getMsgId(dpiDeqOptions *options, const char **value,
1015
- uint32_t *valueLength);
1016
-
1017
- // return navigation associated with dequeue options
1018
- int dpiDeqOptions_getNavigation(dpiDeqOptions *options,
1019
- dpiDeqNavigation *value);
1020
-
1021
- // return transformation associated with dequeue options
1022
- int dpiDeqOptions_getTransformation(dpiDeqOptions *options, const char **value,
1023
- uint32_t *valueLength);
1024
-
1025
- // return visibility associated with dequeue options
1026
- int dpiDeqOptions_getVisibility(dpiDeqOptions *options, dpiVisibility *value);
1027
-
1028
- // return wait time associated with dequeue options
1029
- int dpiDeqOptions_getWait(dpiDeqOptions *options, uint32_t *value);
1030
-
1031
- // release a reference from dequeue options
1032
- int dpiDeqOptions_release(dpiDeqOptions *options);
1033
-
1034
- // set condition associated with dequeue options
1035
- int dpiDeqOptions_setCondition(dpiDeqOptions *options, const char *value,
1036
- uint32_t valueLength);
1037
-
1038
- // set consumer name associated with dequeue options
1039
- int dpiDeqOptions_setConsumerName(dpiDeqOptions *options, const char *value,
1040
- uint32_t valueLength);
1041
-
1042
- // set correlation associated with dequeue options
1043
- int dpiDeqOptions_setCorrelation(dpiDeqOptions *options, const char *value,
1044
- uint32_t valueLength);
1045
-
1046
- // set delivery mode associated with dequeue options
1047
- int dpiDeqOptions_setDeliveryMode(dpiDeqOptions *options,
1048
- dpiMessageDeliveryMode value);
1049
-
1050
- // set mode associated with dequeue options
1051
- int dpiDeqOptions_setMode(dpiDeqOptions *options, dpiDeqMode value);
1052
-
1053
- // set message id associated with dequeue options
1054
- int dpiDeqOptions_setMsgId(dpiDeqOptions *options, const char *value,
1055
- uint32_t valueLength);
1056
-
1057
- // set navigation associated with dequeue options
1058
- int dpiDeqOptions_setNavigation(dpiDeqOptions *options,
1059
- dpiDeqNavigation value);
1060
-
1061
- // set transformation associated with dequeue options
1062
- int dpiDeqOptions_setTransformation(dpiDeqOptions *options, const char *value,
1063
- uint32_t valueLength);
1064
-
1065
- // set visibility associated with dequeue options
1066
- int dpiDeqOptions_setVisibility(dpiDeqOptions *options, dpiVisibility value);
1067
-
1068
- // set wait time associated with dequeue options
1069
- int dpiDeqOptions_setWait(dpiDeqOptions *options, uint32_t value);
1070
-
1071
-
1072
- //-----------------------------------------------------------------------------
1073
- // Enqueue Option Methods (dpiEnqOptions)
1074
- //-----------------------------------------------------------------------------
1075
-
1076
- // add a reference to enqueue options
1077
- int dpiEnqOptions_addRef(dpiEnqOptions *options);
1078
-
1079
- // return transformation associated with enqueue options
1080
- int dpiEnqOptions_getTransformation(dpiEnqOptions *options, const char **value,
1081
- uint32_t *valueLength);
1082
-
1083
- // return visibility associated with enqueue options
1084
- int dpiEnqOptions_getVisibility(dpiEnqOptions *options, dpiVisibility *value);
1085
-
1086
- // release a reference from enqueue options
1087
- int dpiEnqOptions_release(dpiEnqOptions *options);
1088
-
1089
- // set delivery mode associated with enqueue options
1090
- int dpiEnqOptions_setDeliveryMode(dpiEnqOptions *options,
1091
- dpiMessageDeliveryMode value);
1092
-
1093
- // set transformation associated with enqueue options
1094
- int dpiEnqOptions_setTransformation(dpiEnqOptions *options, const char *value,
1095
- uint32_t valueLength);
1096
-
1097
- // set visibility associated with enqueue options
1098
- int dpiEnqOptions_setVisibility(dpiEnqOptions *options, dpiVisibility value);
1099
-
1100
-
1101
- //-----------------------------------------------------------------------------
1102
- // LOB Methods (dpiLob)
1103
- //-----------------------------------------------------------------------------
1104
-
1105
- // add a reference to the LOB
1106
- int dpiLob_addRef(dpiLob *lob);
1107
-
1108
- // close the LOB
1109
- int dpiLob_close(dpiLob *lob);
1110
-
1111
- // close the LOB's resources
1112
- int dpiLob_closeResource(dpiLob *lob);
1113
-
1114
- // create a copy of the LOB
1115
- int dpiLob_copy(dpiLob *lob, dpiLob **copiedLob);
1116
-
1117
- // get buffer size in bytes for a LOB
1118
- int dpiLob_getBufferSize(dpiLob *lob, uint64_t sizeInChars,
1119
- uint64_t *sizeInBytes);
1120
-
1121
- // return the chunk size for the LOB
1122
- int dpiLob_getChunkSize(dpiLob *lob, uint32_t *size);
1123
-
1124
- // return the directory alias name and file name of a BFILE LOB
1125
- int dpiLob_getDirectoryAndFileName(dpiLob *lob, const char **directoryAlias,
1126
- uint32_t *directoryAliasLength, const char **fileName,
1127
- uint32_t *fileNameLength);
1128
-
1129
- // return if the file associated with a BFILE LOB exists
1130
- int dpiLob_getFileExists(dpiLob *lob, int *exists);
1131
-
1132
- // return if the LOB's resources are currently open
1133
- int dpiLob_getIsResourceOpen(dpiLob *lob, int *isOpen);
1134
-
1135
- // return the current size of the LOB
1136
- int dpiLob_getSize(dpiLob *lob, uint64_t *size);
1137
-
1138
- // open the LOB's resources (used to improve performance of multiple
1139
- // read/writes operations)
1140
- int dpiLob_openResource(dpiLob *lob);
1141
-
1142
- // read bytes from the LOB at the specified offset
1143
- int dpiLob_readBytes(dpiLob *lob, uint64_t offset, uint64_t amount,
1144
- char *value, uint64_t *valueLength);
1145
-
1146
- // release a reference to the LOB
1147
- int dpiLob_release(dpiLob *lob);
1148
-
1149
- // set the directory name and file name of the BFILE LOB
1150
- int dpiLob_setDirectoryAndFileName(dpiLob *lob, const char *directoryAlias,
1151
- uint32_t directoryAliasLength, const char *fileName,
1152
- uint32_t fileNameLength);
1153
-
1154
- // sets the contents of a LOB from a byte string
1155
- int dpiLob_setFromBytes(dpiLob *lob, const char *value, uint64_t valueLength);
1156
-
1157
- // trim the LOB to the specified size
1158
- int dpiLob_trim(dpiLob *lob, uint64_t newSize);
1159
-
1160
- // write bytes to the LOB at the specified offset
1161
- int dpiLob_writeBytes(dpiLob *lob, uint64_t offset, const char *value,
1162
- uint64_t valueLength);
1163
-
1164
-
1165
- //-----------------------------------------------------------------------------
1166
- // Message Properties Methods (dpiMsgProps)
1167
- //-----------------------------------------------------------------------------
1168
-
1169
- // add a reference to message properties
1170
- int dpiMsgProps_addRef(dpiMsgProps *props);
1171
-
1172
- // return the number of attempts made to deliver the message
1173
- int dpiMsgProps_getNumAttempts(dpiMsgProps *props, int32_t *value);
1174
-
1175
- // return correlation associated with the message
1176
- int dpiMsgProps_getCorrelation(dpiMsgProps *props, const char **value,
1177
- uint32_t *valueLength);
1178
-
1179
- // return the number of seconds the message was delayed
1180
- int dpiMsgProps_getDelay(dpiMsgProps *props, int32_t *value);
1181
-
1182
- // return the mode used for delivering the message
1183
- int dpiMsgProps_getDeliveryMode(dpiMsgProps *props,
1184
- dpiMessageDeliveryMode *value);
1185
-
1186
- // return the time the message was enqueued
1187
- int dpiMsgProps_getEnqTime(dpiMsgProps *props, dpiTimestamp *value);
1188
-
1189
- // return the name of the exception queue associated with the message
1190
- int dpiMsgProps_getExceptionQ(dpiMsgProps *props, const char **value,
1191
- uint32_t *valueLength);
1192
-
1193
- // return the number of seconds until the message expires
1194
- int dpiMsgProps_getExpiration(dpiMsgProps *props, int32_t *value);
1195
-
1196
- // return the original message id for the message
1197
- int dpiMsgProps_getOriginalMsgId(dpiMsgProps *props, const char **value,
1198
- uint32_t *valueLength);
1199
-
1200
- // return the priority of the message
1201
- int dpiMsgProps_getPriority(dpiMsgProps *props, int32_t *value);
1202
-
1203
- // return the state of the message
1204
- int dpiMsgProps_getState(dpiMsgProps *props, dpiMessageState *value);
1205
-
1206
- // release a reference from message properties
1207
- int dpiMsgProps_release(dpiMsgProps *props);
1208
-
1209
- // set correlation associated with the message
1210
- int dpiMsgProps_setCorrelation(dpiMsgProps *props, const char *value,
1211
- uint32_t valueLength);
1212
-
1213
- // set the number of seconds to delay the message
1214
- int dpiMsgProps_setDelay(dpiMsgProps *props, int32_t value);
1215
-
1216
- // set the name of the exception queue associated with the message
1217
- int dpiMsgProps_setExceptionQ(dpiMsgProps *props, const char *value,
1218
- uint32_t valueLength);
1219
-
1220
- // set the number of seconds until the message expires
1221
- int dpiMsgProps_setExpiration(dpiMsgProps *props, int32_t value);
1222
-
1223
- // set the original message id for the message
1224
- int dpiMsgProps_setOriginalMsgId(dpiMsgProps *props, const char *value,
1225
- uint32_t valueLength);
1226
-
1227
- // set the priority of the message
1228
- int dpiMsgProps_setPriority(dpiMsgProps *props, int32_t value);
1229
-
1230
-
1231
- //-----------------------------------------------------------------------------
1232
- // Object Methods (dpiObject)
1233
- //-----------------------------------------------------------------------------
1234
-
1235
- // add a reference to the object
1236
- int dpiObject_addRef(dpiObject *obj);
1237
-
1238
- // append an element to the collection
1239
- int dpiObject_appendElement(dpiObject *obj, dpiNativeTypeNum nativeTypeNum,
1240
- dpiData *value);
1241
-
1242
- // copy the object and return the copied object
1243
- int dpiObject_copy(dpiObject *obj, dpiObject **copiedObj);
1244
-
1245
- // delete an element from the collection
1246
- int dpiObject_deleteElementByIndex(dpiObject *obj, int32_t index);
1247
-
1248
- // get the value of the specified attribute
1249
- int dpiObject_getAttributeValue(dpiObject *obj, dpiObjectAttr *attr,
1250
- dpiNativeTypeNum nativeTypeNum, dpiData *value);
1251
-
1252
- // return whether an element exists in a collection at the specified index
1253
- int dpiObject_getElementExistsByIndex(dpiObject *obj, int32_t index,
1254
- int *exists);
1255
-
1256
- // get the value of the element in a collection at the specified index
1257
- int dpiObject_getElementValueByIndex(dpiObject *obj, int32_t index,
1258
- dpiNativeTypeNum nativeTypeNum, dpiData *value);
1259
-
1260
- // return the first index used in a collection
1261
- int dpiObject_getFirstIndex(dpiObject *obj, int32_t *index, int *exists);
1262
-
1263
- // return the last index used in a collection
1264
- int dpiObject_getLastIndex(dpiObject *obj, int32_t *index, int *exists);
1265
-
1266
- // return the next index used in a collection given an index
1267
- int dpiObject_getNextIndex(dpiObject *obj, int32_t index, int32_t *nextIndex,
1268
- int *exists);
1269
-
1270
- // return the previous index used in a collection given an index
1271
- int dpiObject_getPrevIndex(dpiObject *obj, int32_t index, int32_t *prevIndex,
1272
- int *exists);
1273
-
1274
- // return the number of elements in a collection
1275
- int dpiObject_getSize(dpiObject *obj, int32_t *size);
1276
-
1277
- // release a reference to the object
1278
- int dpiObject_release(dpiObject *obj);
1279
-
1280
- // set the value of the specified attribute
1281
- int dpiObject_setAttributeValue(dpiObject *obj, dpiObjectAttr *attr,
1282
- dpiNativeTypeNum nativeTypeNum, dpiData *value);
1283
-
1284
- // set the value of the element in a collection at the specified index
1285
- int dpiObject_setElementValueByIndex(dpiObject *obj, int32_t index,
1286
- dpiNativeTypeNum nativeTypeNum, dpiData *value);
1287
-
1288
- // trim a number of elements from the end of a collection
1289
- int dpiObject_trim(dpiObject *obj, uint32_t numToTrim);
1290
-
1291
-
1292
- //-----------------------------------------------------------------------------
1293
- // Object Type Attribute Methods (dpiObjectAttr)
1294
- //-----------------------------------------------------------------------------
1295
-
1296
- // add a reference to the attribute
1297
- int dpiObjectAttr_addRef(dpiObjectAttr *attr);
1298
-
1299
- // return the name of the attribute
1300
- int dpiObjectAttr_getInfo(dpiObjectAttr *attr, dpiObjectAttrInfo *info);
1301
-
1302
- // release a reference to the attribute
1303
- int dpiObjectAttr_release(dpiObjectAttr *attr);
1304
-
1305
-
1306
- //-----------------------------------------------------------------------------
1307
- // Object Type Methods (dpiObjectType)
1308
- //-----------------------------------------------------------------------------
1309
-
1310
- // add a reference to the object type
1311
- int dpiObjectType_addRef(dpiObjectType *objType);
1312
-
1313
- // create an object of the specified type and return it
1314
- int dpiObjectType_createObject(dpiObjectType *objType, dpiObject **obj);
1315
-
1316
- // return the attributes available on the object type
1317
- int dpiObjectType_getAttributes(dpiObjectType *objType, uint16_t numAttributes,
1318
- dpiObjectAttr **attributes);
1319
-
1320
- // return information about the object type
1321
- int dpiObjectType_getInfo(dpiObjectType *objType, dpiObjectTypeInfo *info);
1322
-
1323
- // release a reference to the object type
1324
- int dpiObjectType_release(dpiObjectType *objType);
1325
-
1326
-
1327
- //-----------------------------------------------------------------------------
1328
- // Session Pools Methods (dpiPool)
1329
- //-----------------------------------------------------------------------------
1330
-
1331
- // acquire a connection from the pool and return it
1332
- int dpiPool_acquireConnection(dpiPool *pool, const char *userName,
1333
- uint32_t userNameLength, const char *password, uint32_t passwordLength,
1334
- dpiConnCreateParams *createParams, dpiConn **conn);
1335
-
1336
- // add a reference to a pool
1337
- int dpiPool_addRef(dpiPool *pool);
1338
-
1339
- // destroy the pool now, not when its reference count reaches zero
1340
- int dpiPool_close(dpiPool *pool, dpiPoolCloseMode closeMode);
1341
-
1342
- // create a session pool and return it
1343
- int dpiPool_create(const dpiContext *context, const char *userName,
1344
- uint32_t userNameLength, const char *password, uint32_t passwordLength,
1345
- const char *connectString, uint32_t connectStringLength,
1346
- const dpiCommonCreateParams *commonParams,
1347
- dpiPoolCreateParams *createParams, dpiPool **pool);
1348
-
1349
- // get the pool's busy count
1350
- int dpiPool_getBusyCount(dpiPool *pool, uint32_t *value);
1351
-
1352
- // return the encoding information used by the session pool
1353
- int dpiPool_getEncodingInfo(dpiPool *pool, dpiEncodingInfo *info);
1354
-
1355
- // get the pool's "get" mode
1356
- int dpiPool_getGetMode(dpiPool *pool, dpiPoolGetMode *value);
1357
-
1358
- // get the pool's maximum lifetime session
1359
- int dpiPool_getMaxLifetimeSession(dpiPool *pool, uint32_t *value);
1360
-
1361
- // get the pool's open count
1362
- int dpiPool_getOpenCount(dpiPool *pool, uint32_t *value);
1363
-
1364
- // return the statement cache size
1365
- int dpiPool_getStmtCacheSize(dpiPool *pool, uint32_t *cacheSize);
1366
-
1367
- // get the pool's timeout value
1368
- int dpiPool_getTimeout(dpiPool *pool, uint32_t *value);
1369
-
1370
- // get the pool's wait timeout value
1371
- int dpiPool_getWaitTimeout(dpiPool *pool, uint32_t *value);
1372
-
1373
- // release a reference to the pool
1374
- int dpiPool_release(dpiPool *pool);
1375
-
1376
- // set the pool's "get" mode
1377
- int dpiPool_setGetMode(dpiPool *pool, dpiPoolGetMode value);
1378
-
1379
- // set the pool's maximum lifetime session
1380
- int dpiPool_setMaxLifetimeSession(dpiPool *pool, uint32_t value);
1381
-
1382
- // set the statement cache size
1383
- int dpiPool_setStmtCacheSize(dpiPool *pool, uint32_t cacheSize);
1384
-
1385
- // set the pool's timeout value
1386
- int dpiPool_setTimeout(dpiPool *pool, uint32_t value);
1387
-
1388
- // set the pool's wait timeout value
1389
- int dpiPool_setWaitTimeout(dpiPool *pool, uint32_t value);
1390
-
1391
-
1392
- //-----------------------------------------------------------------------------
1393
- // SODA Collection Methods (dpiSodaColl)
1394
- //-----------------------------------------------------------------------------
1395
-
1396
- // add a reference to the SODA collection
1397
- int dpiSodaColl_addRef(dpiSodaColl *coll);
1398
-
1399
- // create an index on the collection
1400
- int dpiSodaColl_createIndex(dpiSodaColl *coll, const char *indexSpec,
1401
- uint32_t indexSpecLength, uint32_t flags);
1402
-
1403
- // drop a SODA collection
1404
- int dpiSodaColl_drop(dpiSodaColl *coll, uint32_t flags, int *isDropped);
1405
-
1406
- // drop an index on the collection
1407
- int dpiSodaColl_dropIndex(dpiSodaColl *coll, const char *name,
1408
- uint32_t nameLength, uint32_t flags, int *isDropped);
1409
-
1410
- // find documents in a SODA collection and return a cursor
1411
- int dpiSodaColl_find(dpiSodaColl *coll, const dpiSodaOperOptions *options,
1412
- uint32_t flags, dpiSodaDocCursor **cursor);
1413
-
1414
- // find a single document in a SODA collection
1415
- int dpiSodaColl_findOne(dpiSodaColl *coll, const dpiSodaOperOptions *options,
1416
- uint32_t flags, dpiSodaDoc **doc);
1417
-
1418
- // get the data guide for the collection
1419
- int dpiSodaColl_getDataGuide(dpiSodaColl *coll, uint32_t flags,
1420
- dpiSodaDoc **doc);
1421
-
1422
- // get the count of documents that match the criteria
1423
- int dpiSodaColl_getDocCount(dpiSodaColl *coll,
1424
- const dpiSodaOperOptions *options, uint32_t flags, uint64_t *count);
1425
-
1426
- // get the metadata of the collection
1427
- int dpiSodaColl_getMetadata(dpiSodaColl *coll, const char **value,
1428
- uint32_t *valueLength);
1429
-
1430
- // get the name of the collection
1431
- int dpiSodaColl_getName(dpiSodaColl *coll, const char **value,
1432
- uint32_t *valueLength);
1433
-
1434
- // insert a document into the SODA collection
1435
- int dpiSodaColl_insertOne(dpiSodaColl *coll, dpiSodaDoc *doc, uint32_t flags,
1436
- dpiSodaDoc **insertedDoc);
1437
-
1438
- // release a reference to the SODA collection
1439
- int dpiSodaColl_release(dpiSodaColl *coll);
1440
-
1441
- // remove documents from a SODA collection (with operation options)
1442
- int dpiSodaColl_remove(dpiSodaColl *coll, const dpiSodaOperOptions *options,
1443
- uint32_t flags, uint64_t *count);
1444
-
1445
- // replace a document in a SODA collection (with operation options)
1446
- int dpiSodaColl_replaceOne(dpiSodaColl *coll,
1447
- const dpiSodaOperOptions *options, dpiSodaDoc *doc, uint32_t flags,
1448
- int *replaced, dpiSodaDoc **replacedDoc);
1449
-
1450
-
1451
- //-----------------------------------------------------------------------------
1452
- // SODA Collection Cursor Methods (dpiSodaCollCursor)
1453
- //-----------------------------------------------------------------------------
1454
-
1455
- // add a reference to the SODA collection cursor
1456
- int dpiSodaCollCursor_addRef(dpiSodaCollCursor *cursor);
1457
-
1458
- // close the SODA collection cursor
1459
- int dpiSodaCollCursor_close(dpiSodaCollCursor *cursor);
1460
-
1461
- // get the next collection from the cursor
1462
- int dpiSodaCollCursor_getNext(dpiSodaCollCursor *cursor, uint32_t flags,
1463
- dpiSodaColl **coll);
1464
-
1465
- // release a reference to the SODA collection cursor
1466
- int dpiSodaCollCursor_release(dpiSodaCollCursor *cursor);
1467
-
1468
-
1469
- //-----------------------------------------------------------------------------
1470
- // SODA Database Methods (dpiSodaDb)
1471
- //-----------------------------------------------------------------------------
1472
-
1473
- // add a reference to the SODA database
1474
- int dpiSodaDb_addRef(dpiSodaDb *db);
1475
-
1476
- // create a new SODA collection
1477
- int dpiSodaDb_createCollection(dpiSodaDb *db, const char *name,
1478
- uint32_t nameLength, const char *metadata, uint32_t metadataLength,
1479
- uint32_t flags, dpiSodaColl **coll);
1480
-
1481
- // create a new SODA document
1482
- int dpiSodaDb_createDocument(dpiSodaDb *db, const char *key,
1483
- uint32_t keyLength, const char *content, uint32_t contentLength,
1484
- const char *mediaType, uint32_t mediaTypeLength, uint32_t flags,
1485
- dpiSodaDoc **doc);
1486
-
1487
- // free the memory allocated when getting an array of SODA collection names
1488
- int dpiSodaDb_freeCollectionNames(dpiSodaDb *db, dpiSodaCollNames *names);
1489
-
1490
- // return a cursor to iterate over SODA collections
1491
- int dpiSodaDb_getCollections(dpiSodaDb *db, const char *startName,
1492
- uint32_t startNameLength, uint32_t flags, dpiSodaCollCursor **cursor);
1493
-
1494
- // return an array of SODA collection names
1495
- int dpiSodaDb_getCollectionNames(dpiSodaDb *db, const char *startName,
1496
- uint32_t startNameLength, uint32_t limit, uint32_t flags,
1497
- dpiSodaCollNames *names);
1498
-
1499
- // open an existing SODA collection
1500
- int dpiSodaDb_openCollection(dpiSodaDb *db, const char *name,
1501
- uint32_t nameLength, uint32_t flags, dpiSodaColl **coll);
1502
-
1503
- // release a reference to the SODA database
1504
- int dpiSodaDb_release(dpiSodaDb *db);
1505
-
1506
-
1507
- //-----------------------------------------------------------------------------
1508
- // SODA Document Methods (dpiSodaDoc)
1509
- //-----------------------------------------------------------------------------
1510
-
1511
- // add a reference to the SODA document
1512
- int dpiSodaDoc_addRef(dpiSodaDoc *cursor);
1513
-
1514
- // get the content of the document
1515
- int dpiSodaDoc_getContent(dpiSodaDoc *doc, const char **value,
1516
- uint32_t *valueLength, const char **encoding);
1517
-
1518
- // get the created timestamp associated with the document
1519
- int dpiSodaDoc_getCreatedOn(dpiSodaDoc *doc, const char **value,
1520
- uint32_t *valueLength);
1521
-
1522
- // get the key associated with the document
1523
- int dpiSodaDoc_getKey(dpiSodaDoc *doc, const char **value,
1524
- uint32_t *valueLength);
1525
-
1526
- // get the last modified timestamp associated with the document
1527
- int dpiSodaDoc_getLastModified(dpiSodaDoc *doc, const char **value,
1528
- uint32_t *valueLength);
1529
-
1530
- // get the media type of the document
1531
- int dpiSodaDoc_getMediaType(dpiSodaDoc *doc, const char **value,
1532
- uint32_t *valueLength);
1533
-
1534
- // get the version of the document
1535
- int dpiSodaDoc_getVersion(dpiSodaDoc *doc, const char **value,
1536
- uint32_t *valueLength);
1537
-
1538
- // release a reference to the SODA document
1539
- int dpiSodaDoc_release(dpiSodaDoc *cursor);
1540
-
1541
-
1542
- //-----------------------------------------------------------------------------
1543
- // SODA Document Cursor Methods (dpiSodaDocCursor)
1544
- //-----------------------------------------------------------------------------
1545
-
1546
- // add a reference to the SODA document cursor
1547
- int dpiSodaDocCursor_addRef(dpiSodaDocCursor *cursor);
1548
-
1549
- // close the SODA document cursor
1550
- int dpiSodaDocCursor_close(dpiSodaDocCursor *cursor);
1551
-
1552
- // get the next document from the cursor
1553
- int dpiSodaDocCursor_getNext(dpiSodaDocCursor *cursor, uint32_t flags,
1554
- dpiSodaDoc **doc);
1555
-
1556
- // release a reference to the SODA document cursor
1557
- int dpiSodaDocCursor_release(dpiSodaDocCursor *cursor);
1558
-
1559
-
1560
- //-----------------------------------------------------------------------------
1561
- // Statement Methods (dpiStmt)
1562
- //-----------------------------------------------------------------------------
1563
-
1564
- // add a reference to a statement
1565
- int dpiStmt_addRef(dpiStmt *stmt);
1566
-
1567
- // bind a variable to the statement using the given name
1568
- int dpiStmt_bindByName(dpiStmt *stmt, const char *name, uint32_t nameLength,
1569
- dpiVar *var);
1570
-
1571
- // bind a variable to the statement at the given position
1572
- // positions are determined by the order in which names are introduced
1573
- int dpiStmt_bindByPos(dpiStmt *stmt, uint32_t pos, dpiVar *var);
1574
-
1575
- // bind a value to the statement using the given name
1576
- // this creates the variable by looking at the type and then binds it
1577
- int dpiStmt_bindValueByName(dpiStmt *stmt, const char *name,
1578
- uint32_t nameLength, dpiNativeTypeNum nativeTypeNum, dpiData *data);
1579
-
1580
- // bind a value to the statement at the given position
1581
- // this creates the variable by looking at the type and then binds it
1582
- int dpiStmt_bindValueByPos(dpiStmt *stmt, uint32_t pos,
1583
- dpiNativeTypeNum nativeTypeNum, dpiData *data);
1584
-
1585
- // close the statement now, not when its reference count reaches zero
1586
- int dpiStmt_close(dpiStmt *stmt, const char *tag, uint32_t tagLength);
1587
-
1588
- // define a variable to accept the data for the specified column (1 based)
1589
- int dpiStmt_define(dpiStmt *stmt, uint32_t pos, dpiVar *var);
1590
-
1591
- // define type of data to use for the specified column (1 based)
1592
- int dpiStmt_defineValue(dpiStmt *stmt, uint32_t pos,
1593
- dpiOracleTypeNum oracleTypeNum, dpiNativeTypeNum nativeTypeNum,
1594
- uint32_t size, int sizeIsBytes, dpiObjectType *objType);
1595
-
1596
- // execute the statement and return the number of query columns
1597
- // zero implies the statement is not a query
1598
- int dpiStmt_execute(dpiStmt *stmt, dpiExecMode mode,
1599
- uint32_t *numQueryColumns);
1600
-
1601
- // execute the statement multiple times (queries not supported)
1602
- int dpiStmt_executeMany(dpiStmt *stmt, dpiExecMode mode, uint32_t numIters);
1603
-
1604
- // fetch a single row and return the index into the defined variables
1605
- // this will internally perform any execute and array fetch as needed
1606
- int dpiStmt_fetch(dpiStmt *stmt, int *found, uint32_t *bufferRowIndex);
1607
-
1608
- // return the number of rows that are available in the defined variables
1609
- // up to the maximum specified; this will internally perform execute/array
1610
- // fetch only if no rows are available in the defined variables and there are
1611
- // more rows available to fetch
1612
- int dpiStmt_fetchRows(dpiStmt *stmt, uint32_t maxRows,
1613
- uint32_t *bufferRowIndex, uint32_t *numRowsFetched, int *moreRows);
1614
-
1615
- // get the number of batch errors that took place in the previous execution
1616
- int dpiStmt_getBatchErrorCount(dpiStmt *stmt, uint32_t *count);
1617
-
1618
- // get the batch errors that took place in the previous execution
1619
- int dpiStmt_getBatchErrors(dpiStmt *stmt, uint32_t numErrors,
1620
- dpiErrorInfo *errors);
1621
-
1622
- // get the number of bind variables that are in the prepared statement
1623
- int dpiStmt_getBindCount(dpiStmt *stmt, uint32_t *count);
1624
-
1625
- // get the names of the bind variables that are in the prepared statement
1626
- int dpiStmt_getBindNames(dpiStmt *stmt, uint32_t *numBindNames,
1627
- const char **bindNames, uint32_t *bindNameLengths);
1628
-
1629
- // get the number of rows to (internally) fetch at one time
1630
- int dpiStmt_getFetchArraySize(dpiStmt *stmt, uint32_t *arraySize);
1631
-
1632
- // get next implicit result from previous execution; NULL if no more exist
1633
- int dpiStmt_getImplicitResult(dpiStmt *stmt, dpiStmt **implicitResult);
1634
-
1635
- // return information about the statement
1636
- int dpiStmt_getInfo(dpiStmt *stmt, dpiStmtInfo *info);
1637
-
1638
- // get the number of query columns (zero implies the statement is not a query)
1639
- int dpiStmt_getNumQueryColumns(dpiStmt *stmt, uint32_t *numQueryColumns);
1640
-
1641
- // return metadata about the column at the specified position (1 based)
1642
- int dpiStmt_getQueryInfo(dpiStmt *stmt, uint32_t pos, dpiQueryInfo *info);
1643
-
1644
- // get the value for the specified column of the current row fetched
1645
- int dpiStmt_getQueryValue(dpiStmt *stmt, uint32_t pos,
1646
- dpiNativeTypeNum *nativeTypeNum, dpiData **data);
1647
-
1648
- // get the row count for the statement
1649
- // for queries, this is the number of rows that have been fetched so far
1650
- // for non-queries, this is the number of rows affected by the last execution
1651
- int dpiStmt_getRowCount(dpiStmt *stmt, uint64_t *count);
1652
-
1653
- // get the number of rows affected for each DML operation just executed
1654
- // using the mode DPI_MODE_EXEC_ARRAY_DML_ROWCOUNTS
1655
- int dpiStmt_getRowCounts(dpiStmt *stmt, uint32_t *numRowCounts,
1656
- uint64_t **rowCounts);
1657
-
1658
- // get subscription query id for continuous query notification
1659
- int dpiStmt_getSubscrQueryId(dpiStmt *stmt, uint64_t *queryId);
1660
-
1661
- // release a reference to the statement
1662
- int dpiStmt_release(dpiStmt *stmt);
1663
-
1664
- // scroll the statement to the desired row
1665
- // this is only valid for scrollable statements
1666
- int dpiStmt_scroll(dpiStmt *stmt, dpiFetchMode mode, int32_t offset,
1667
- int32_t rowCountOffset);
1668
-
1669
- // set the number of rows to (internally) fetch at one time
1670
- int dpiStmt_setFetchArraySize(dpiStmt *stmt, uint32_t arraySize);
1671
-
1672
-
1673
- //-----------------------------------------------------------------------------
1674
- // Rowid Methods (dpiRowid)
1675
- //-----------------------------------------------------------------------------
1676
-
1677
- // add a reference to the rowid
1678
- int dpiRowid_addRef(dpiRowid *rowid);
1679
-
1680
- // get string representation from rowid
1681
- int dpiRowid_getStringValue(dpiRowid *rowid, const char **value,
1682
- uint32_t *valueLength);
1683
-
1684
- // release a reference to the rowid
1685
- int dpiRowid_release(dpiRowid *subscr);
1686
-
1687
-
1688
- //-----------------------------------------------------------------------------
1689
- // Subscription Methods (dpiSubscr)
1690
- //-----------------------------------------------------------------------------
1691
-
1692
- // add a reference to the subscription
1693
- int dpiSubscr_addRef(dpiSubscr *subscr);
1694
-
1695
- // prepare statement for registration with subscription
1696
- int dpiSubscr_prepareStmt(dpiSubscr *subscr, const char *sql,
1697
- uint32_t sqlLength, dpiStmt **stmt);
1698
-
1699
- // release a reference to the subscription
1700
- int dpiSubscr_release(dpiSubscr *subscr);
1701
-
1702
-
1703
- //-----------------------------------------------------------------------------
1704
- // Variable Methods (dpiVar)
1705
- //-----------------------------------------------------------------------------
1706
-
1707
- // add a reference to the variable
1708
- int dpiVar_addRef(dpiVar *var);
1709
-
1710
- // copy the data from one variable to another variable
1711
- int dpiVar_copyData(dpiVar *var, uint32_t pos, dpiVar *sourceVar,
1712
- uint32_t sourcePos);
1713
-
1714
- // return the number of elements in a PL/SQL index-by table
1715
- int dpiVar_getNumElementsInArray(dpiVar *var, uint32_t *numElements);
1716
-
1717
- // return pointer to array of dpiData structures for transferring data
1718
- // this is needed for DML returning where the number of elements is modified
1719
- int dpiVar_getReturnedData(dpiVar *var, uint32_t pos, uint32_t *numElements,
1720
- dpiData **data);
1721
-
1722
- // return the size in bytes of the buffer used for fetching/binding
1723
- int dpiVar_getSizeInBytes(dpiVar *var, uint32_t *sizeInBytes);
1724
-
1725
- // release a reference to the variable
1726
- int dpiVar_release(dpiVar *var);
1727
-
1728
- // set the value of the variable from a byte string
1729
- int dpiVar_setFromBytes(dpiVar *var, uint32_t pos, const char *value,
1730
- uint32_t valueLength);
1731
-
1732
- // set the value of the variable from a LOB
1733
- int dpiVar_setFromLob(dpiVar *var, uint32_t pos, dpiLob *lob);
1734
-
1735
- // set the value of the variable from an object
1736
- int dpiVar_setFromObject(dpiVar *var, uint32_t pos, dpiObject *obj);
1737
-
1738
- // set the value of the variable from a rowid
1739
- int dpiVar_setFromRowid(dpiVar *var, uint32_t pos, dpiRowid *rowid);
1740
-
1741
- // set the value of the variable from a statement
1742
- int dpiVar_setFromStmt(dpiVar *var, uint32_t pos, dpiStmt *stmt);
1743
-
1744
- // set the number of elements in a PL/SQL index-by table
1745
- int dpiVar_setNumElementsInArray(dpiVar *var, uint32_t numElements);
1746
-
1747
- #endif
1748
-