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,184 +0,0 @@
1
- //-----------------------------------------------------------------------------
2
- // Copyright (c) 2017, 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
- // dpiDebug.c
14
- // Methods used for debugging ODPI-C.
15
- //-----------------------------------------------------------------------------
16
-
17
- #include "dpiImpl.h"
18
-
19
- #define DPI_DEBUG_THREAD_FORMAT "%.5" PRIu64
20
- #define DPI_DEBUG_DATE_FORMAT "%.4d-%.2d-%.2d"
21
- #define DPI_DEBUG_TIME_FORMAT "%.2d:%.2d:%.2d.%.3d"
22
-
23
- // debug level (populated by environment variable DPI_DEBUG_LEVEL)
24
- unsigned long dpiDebugLevel = 0;
25
-
26
- // debug prefix format (populated by environment variable DPI_DEBUG_PREFIX)
27
- static char dpiDebugPrefixFormat[64] = "ODPI [%i] %d %t: ";
28
-
29
- // debug file for printing (currently unchangeable)
30
- static FILE *dpiDebugStream = NULL;
31
-
32
-
33
- //-----------------------------------------------------------------------------
34
- // dpiDebug__getFormatWithPrefix() [INTERNAL]
35
- // Adjust the provided format to include the prefix requested by the user.
36
- // This method is not permitted to fail, so if there is not enough space, the
37
- // prefix is truncated as needed -- although this is a very unlikely scenario.
38
- //-----------------------------------------------------------------------------
39
- static void dpiDebug__getFormatWithPrefix(const char *format,
40
- char *formatWithPrefix, size_t maxFormatWithPrefixSize)
41
- {
42
- char *sourcePtr, *targetPtr;
43
- int gotTime, tempSize;
44
- uint64_t threadId;
45
- size_t size;
46
- #ifdef _WIN32
47
- SYSTEMTIME time;
48
- #else
49
- struct timeval timeOfDay;
50
- struct tm time;
51
- #endif
52
-
53
- gotTime = 0;
54
- sourcePtr = dpiDebugPrefixFormat;
55
- targetPtr = formatWithPrefix;
56
- size = maxFormatWithPrefixSize - strlen(format);
57
- while (*sourcePtr && size > 20) {
58
-
59
- // all characters except '%' are copied verbatim to the target
60
- if (*sourcePtr != '%') {
61
- *targetPtr++ = *sourcePtr++;
62
- maxFormatWithPrefixSize--;
63
- continue;
64
- }
65
-
66
- // handle the different directives
67
- sourcePtr++;
68
- switch (*sourcePtr) {
69
- case 'i':
70
- #ifdef _WIN32
71
- threadId = (uint64_t) GetCurrentThreadId();
72
- #elif defined __linux
73
- threadId = (uint64_t) syscall(SYS_gettid);
74
- #elif defined __APPLE__
75
- pthread_threadid_np(NULL, &threadId);
76
- #else
77
- threadId = (uint64_t) pthread_self();
78
- #endif
79
- tempSize = sprintf(targetPtr, DPI_DEBUG_THREAD_FORMAT,
80
- threadId);
81
- size -= tempSize;
82
- targetPtr += tempSize;
83
- sourcePtr++;
84
- break;
85
- case 'd':
86
- case 't':
87
- if (!gotTime) {
88
- gotTime = 1;
89
- #ifdef _WIN32
90
- GetLocalTime(&time);
91
- #else
92
- gettimeofday(&timeOfDay, NULL);
93
- localtime_r(&timeOfDay.tv_sec, &time);
94
- #endif
95
- }
96
- #ifdef _WIN32
97
- if (*sourcePtr == 'd')
98
- tempSize = sprintf(targetPtr, DPI_DEBUG_DATE_FORMAT,
99
- time.wYear, time.wMonth, time.wDay);
100
- else tempSize = sprintf(targetPtr, DPI_DEBUG_TIME_FORMAT,
101
- time.wHour, time.wMinute, time.wSecond,
102
- time.wMilliseconds);
103
- #else
104
- if (*sourcePtr == 'd')
105
- tempSize = sprintf(targetPtr, DPI_DEBUG_DATE_FORMAT,
106
- time.tm_year + 1900, time.tm_mon + 1,
107
- time.tm_mday);
108
- else tempSize = sprintf(targetPtr, DPI_DEBUG_TIME_FORMAT,
109
- time.tm_hour, time.tm_min, time.tm_sec,
110
- (int) (timeOfDay.tv_usec / 1000));
111
- #endif
112
- size -= tempSize;
113
- targetPtr += tempSize;
114
- sourcePtr++;
115
- break;
116
- case '\0':
117
- break;
118
- default:
119
- *targetPtr++ = '%';
120
- *targetPtr++ = *sourcePtr++;
121
- break;
122
- }
123
- }
124
-
125
- // append original format
126
- strcpy(targetPtr, format);
127
- }
128
-
129
-
130
- //-----------------------------------------------------------------------------
131
- // dpiDebug__initialize() [INTERNAL]
132
- // Initialize debugging infrastructure. This reads the environment variables
133
- // and populates the global variables used for determining which messages to
134
- // print and what prefix should be placed in front of each message.
135
- //-----------------------------------------------------------------------------
136
- void dpiDebug__initialize(void)
137
- {
138
- char *envValue;
139
-
140
- // determine the value of the environment variable DPI_DEBUG_LEVEL and
141
- // convert to an integer; if the value in the environment variable is not a
142
- // valid integer, it is ignored
143
- envValue = getenv("DPI_DEBUG_LEVEL");
144
- if (envValue)
145
- dpiDebugLevel = (unsigned long) strtol(envValue, NULL, 10);
146
-
147
- // determine the value of the environment variable DPI_DEBUG_PREFIX and
148
- // store it in the static buffer available for it; a static buffer is used
149
- // since this runs during startup and may not fail; if the value of the
150
- // environment variable is too large for the buffer, the value is ignored
151
- // and the default value is used instead
152
- envValue = getenv("DPI_DEBUG_PREFIX");
153
- if (envValue && strlen(envValue) < sizeof(dpiDebugPrefixFormat))
154
- strcpy(dpiDebugPrefixFormat, envValue);
155
-
156
- // messages are written to stderr
157
- dpiDebugStream = stderr;
158
-
159
- // for any debugging level > 0 print a message indicating that tracing
160
- // has started
161
- if (dpiDebugLevel) {
162
- dpiDebug__print("ODPI-C %s\n", DPI_VERSION_STRING);
163
- dpiDebug__print("debugging messages initialized at level %lu\n",
164
- dpiDebugLevel);
165
- }
166
- }
167
-
168
-
169
- //-----------------------------------------------------------------------------
170
- // dpiDebug__print() [INTERNAL]
171
- // Print the specified debugging message with a newly calculated prefix.
172
- //-----------------------------------------------------------------------------
173
- void dpiDebug__print(const char *format, ...)
174
- {
175
- char formatWithPrefix[512];
176
- va_list varArgs;
177
-
178
- dpiDebug__getFormatWithPrefix(format, formatWithPrefix,
179
- sizeof(formatWithPrefix));
180
- va_start(varArgs, format);
181
- (void) vfprintf(dpiDebugStream, formatWithPrefix, varArgs);
182
- va_end(varArgs);
183
- }
184
-
@@ -1,370 +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
- // dpiDeqOptions.c
14
- // Implementation of AQ dequeue options.
15
- //-----------------------------------------------------------------------------
16
-
17
- #include "dpiImpl.h"
18
-
19
- //-----------------------------------------------------------------------------
20
- // dpiDeqOptions__create() [INTERNAL]
21
- // Create a new subscription structure and return it. In case of error NULL
22
- // is returned.
23
- //-----------------------------------------------------------------------------
24
- int dpiDeqOptions__create(dpiDeqOptions *options, dpiConn *conn,
25
- dpiError *error)
26
- {
27
- dpiGen__setRefCount(conn, error, 1);
28
- options->conn = conn;
29
- return dpiOci__descriptorAlloc(conn->env->handle, &options->handle,
30
- DPI_OCI_DTYPE_AQDEQ_OPTIONS, "allocate descriptor", error);
31
- }
32
-
33
-
34
- //-----------------------------------------------------------------------------
35
- // dpiDeqOptions__free() [INTERNAL]
36
- // Free the memory for a dequeue options structure.
37
- //-----------------------------------------------------------------------------
38
- void dpiDeqOptions__free(dpiDeqOptions *options, dpiError *error)
39
- {
40
- if (options->handle) {
41
- dpiOci__descriptorFree(options->handle, DPI_OCI_DTYPE_AQDEQ_OPTIONS);
42
- options->handle = NULL;
43
- }
44
- if (options->conn) {
45
- dpiGen__setRefCount(options->conn, error, -1);
46
- options->conn = NULL;
47
- }
48
- dpiUtils__freeMemory(options);
49
- }
50
-
51
-
52
- //-----------------------------------------------------------------------------
53
- // dpiDeqOptions__getAttrValue() [INTERNAL]
54
- // Get the attribute value in OCI.
55
- //-----------------------------------------------------------------------------
56
- static int dpiDeqOptions__getAttrValue(dpiDeqOptions *options,
57
- uint32_t attribute, const char *fnName, void *value,
58
- uint32_t *valueLength)
59
- {
60
- dpiError error;
61
- int status;
62
-
63
- if (dpiGen__startPublicFn(options, DPI_HTYPE_DEQ_OPTIONS, fnName, 1,
64
- &error) < 0)
65
- return dpiGen__endPublicFn(options, DPI_FAILURE, &error);
66
- DPI_CHECK_PTR_NOT_NULL(options, value)
67
- DPI_CHECK_PTR_NOT_NULL(options, valueLength)
68
- status = dpiOci__attrGet(options->handle, DPI_OCI_DTYPE_AQDEQ_OPTIONS,
69
- value, valueLength, attribute, "get attribute value", &error);
70
- return dpiGen__endPublicFn(options, status, &error);
71
- }
72
-
73
-
74
- //-----------------------------------------------------------------------------
75
- // dpiDeqOptions__setAttrValue() [INTERNAL]
76
- // Set the attribute value in OCI.
77
- //-----------------------------------------------------------------------------
78
- static int dpiDeqOptions__setAttrValue(dpiDeqOptions *options,
79
- uint32_t attribute, const char *fnName, const void *value,
80
- uint32_t valueLength)
81
- {
82
- dpiError error;
83
- int status;
84
-
85
- if (dpiGen__startPublicFn(options, DPI_HTYPE_DEQ_OPTIONS, fnName, 1,
86
- &error) < 0)
87
- return dpiGen__endPublicFn(options, DPI_FAILURE, &error);
88
- DPI_CHECK_PTR_NOT_NULL(options, value)
89
- status = dpiOci__attrSet(options->handle, DPI_OCI_DTYPE_AQDEQ_OPTIONS,
90
- (void*) value, valueLength, attribute, "set attribute value",
91
- &error);
92
- return dpiGen__endPublicFn(options, status, &error);
93
- }
94
-
95
-
96
- //-----------------------------------------------------------------------------
97
- // dpiDeqOptions_addRef() [PUBLIC]
98
- // Add a reference to the dequeue options.
99
- //-----------------------------------------------------------------------------
100
- int dpiDeqOptions_addRef(dpiDeqOptions *options)
101
- {
102
- return dpiGen__addRef(options, DPI_HTYPE_DEQ_OPTIONS, __func__);
103
- }
104
-
105
-
106
- //-----------------------------------------------------------------------------
107
- // dpiDeqOptions_getCondition() [PUBLIC]
108
- // Return condition associated with dequeue options.
109
- //-----------------------------------------------------------------------------
110
- int dpiDeqOptions_getCondition(dpiDeqOptions *options, const char **value,
111
- uint32_t *valueLength)
112
- {
113
- return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_DEQCOND, __func__,
114
- (void*) value, valueLength);
115
- }
116
-
117
-
118
- //-----------------------------------------------------------------------------
119
- // dpiDeqOptions_getConsumerName() [PUBLIC]
120
- // Return consumer name associated with dequeue options.
121
- //-----------------------------------------------------------------------------
122
- int dpiDeqOptions_getConsumerName(dpiDeqOptions *options, const char **value,
123
- uint32_t *valueLength)
124
- {
125
- return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_CONSUMER_NAME,
126
- __func__, (void*) value, valueLength);
127
- }
128
-
129
-
130
- //-----------------------------------------------------------------------------
131
- // dpiDeqOptions_getCorrelation() [PUBLIC]
132
- // Return correlation associated with dequeue options.
133
- //-----------------------------------------------------------------------------
134
- int dpiDeqOptions_getCorrelation(dpiDeqOptions *options, const char **value,
135
- uint32_t *valueLength)
136
- {
137
- return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_CORRELATION,
138
- __func__, (void*) value, valueLength);
139
- }
140
-
141
-
142
- //-----------------------------------------------------------------------------
143
- // dpiDeqOptions_getMode() [PUBLIC]
144
- // Return mode associated with dequeue options.
145
- //-----------------------------------------------------------------------------
146
- int dpiDeqOptions_getMode(dpiDeqOptions *options, dpiDeqMode *value)
147
- {
148
- uint32_t valueLength = sizeof(uint32_t);
149
-
150
- return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_DEQ_MODE,
151
- __func__, value, &valueLength);
152
- }
153
-
154
-
155
- //-----------------------------------------------------------------------------
156
- // dpiDeqOptions_getMsgId() [PUBLIC]
157
- // Return message id associated with dequeue options.
158
- //-----------------------------------------------------------------------------
159
- int dpiDeqOptions_getMsgId(dpiDeqOptions *options, const char **value,
160
- uint32_t *valueLength)
161
- {
162
- dpiError error;
163
- void *rawValue;
164
-
165
- if (dpiGen__startPublicFn(options, DPI_HTYPE_DEQ_OPTIONS, __func__, 1,
166
- &error) < 0)
167
- return dpiGen__endPublicFn(options, DPI_FAILURE, &error);
168
- DPI_CHECK_PTR_NOT_NULL(options, value)
169
- DPI_CHECK_PTR_NOT_NULL(options, valueLength)
170
- if (dpiOci__attrGet(options->handle, DPI_OCI_DTYPE_AQDEQ_OPTIONS,
171
- &rawValue, NULL, DPI_OCI_ATTR_DEQ_MSGID, "get attribute value",
172
- &error) < 0)
173
- return dpiGen__endPublicFn(options, DPI_FAILURE, &error);
174
- dpiOci__rawPtr(options->env->handle, rawValue, (void**) value);
175
- dpiOci__rawSize(options->env->handle, rawValue, valueLength);
176
- return dpiGen__endPublicFn(options, DPI_SUCCESS, &error);
177
- }
178
-
179
-
180
- //-----------------------------------------------------------------------------
181
- // dpiDeqOptions_getNavigation() [PUBLIC]
182
- // Return navigation associated with dequeue options.
183
- //-----------------------------------------------------------------------------
184
- int dpiDeqOptions_getNavigation(dpiDeqOptions *options,
185
- dpiDeqNavigation *value)
186
- {
187
- uint32_t valueLength = sizeof(uint32_t);
188
-
189
- return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_NAVIGATION,
190
- __func__, value, &valueLength);
191
- }
192
-
193
-
194
- //-----------------------------------------------------------------------------
195
- // dpiDeqOptions_getTransformation() [PUBLIC]
196
- // Return transformation associated with dequeue options.
197
- //-----------------------------------------------------------------------------
198
- int dpiDeqOptions_getTransformation(dpiDeqOptions *options, const char **value,
199
- uint32_t *valueLength)
200
- {
201
- return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_TRANSFORMATION,
202
- __func__, (void*) value, valueLength);
203
- }
204
-
205
-
206
- //-----------------------------------------------------------------------------
207
- // dpiDeqOptions_getVisibility() [PUBLIC]
208
- // Return visibility associated with dequeue options.
209
- //-----------------------------------------------------------------------------
210
- int dpiDeqOptions_getVisibility(dpiDeqOptions *options, dpiVisibility *value)
211
- {
212
- uint32_t valueLength = sizeof(uint32_t);
213
-
214
- return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_VISIBILITY,
215
- __func__, value, &valueLength);
216
- }
217
-
218
-
219
- //-----------------------------------------------------------------------------
220
- // dpiDeqOptions_getWait() [PUBLIC]
221
- // Return the number of seconds to wait for a message when dequeuing.
222
- //-----------------------------------------------------------------------------
223
- int dpiDeqOptions_getWait(dpiDeqOptions *options, uint32_t *value)
224
- {
225
- uint32_t valueLength = sizeof(uint32_t);
226
-
227
- return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_WAIT, __func__,
228
- value, &valueLength);
229
- }
230
-
231
-
232
- //-----------------------------------------------------------------------------
233
- // dpiDeqOptions_release() [PUBLIC]
234
- // Release a reference to the dequeue options.
235
- //-----------------------------------------------------------------------------
236
- int dpiDeqOptions_release(dpiDeqOptions *options)
237
- {
238
- return dpiGen__release(options, DPI_HTYPE_DEQ_OPTIONS, __func__);
239
- }
240
-
241
-
242
- //-----------------------------------------------------------------------------
243
- // dpiDeqOptions_setCondition() [PUBLIC]
244
- // Set condition associated with dequeue options.
245
- //-----------------------------------------------------------------------------
246
- int dpiDeqOptions_setCondition(dpiDeqOptions *options, const char *value,
247
- uint32_t valueLength)
248
- {
249
- return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_DEQCOND, __func__,
250
- value, valueLength);
251
- }
252
-
253
-
254
- //-----------------------------------------------------------------------------
255
- // dpiDeqOptions_setConsumerName() [PUBLIC]
256
- // Set consumer name associated with dequeue options.
257
- //-----------------------------------------------------------------------------
258
- int dpiDeqOptions_setConsumerName(dpiDeqOptions *options, const char *value,
259
- uint32_t valueLength)
260
- {
261
- return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_CONSUMER_NAME,
262
- __func__, value, valueLength);
263
- }
264
-
265
-
266
- //-----------------------------------------------------------------------------
267
- // dpiDeqOptions_setCorrelation() [PUBLIC]
268
- // Set correlation associated with dequeue options.
269
- //-----------------------------------------------------------------------------
270
- int dpiDeqOptions_setCorrelation(dpiDeqOptions *options, const char *value,
271
- uint32_t valueLength)
272
- {
273
- return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_CORRELATION,
274
- __func__, value, valueLength);
275
- }
276
-
277
-
278
- //-----------------------------------------------------------------------------
279
- // dpiDeqOptions_setDeliveryMode() [PUBLIC]
280
- // Set the delivery mode associated with dequeue options.
281
- //-----------------------------------------------------------------------------
282
- int dpiDeqOptions_setDeliveryMode(dpiDeqOptions *options,
283
- dpiMessageDeliveryMode value)
284
- {
285
- return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_MSG_DELIVERY_MODE,
286
- __func__, &value, 0);
287
- }
288
-
289
-
290
- //-----------------------------------------------------------------------------
291
- // dpiDeqOptions_setMode() [PUBLIC]
292
- // Set the mode associated with dequeue options.
293
- //-----------------------------------------------------------------------------
294
- int dpiDeqOptions_setMode(dpiDeqOptions *options, dpiDeqMode value)
295
- {
296
- return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_DEQ_MODE,
297
- __func__, &value, 0);
298
- }
299
-
300
-
301
- //-----------------------------------------------------------------------------
302
- // dpiDeqOptions_setMsgId() [PUBLIC]
303
- // Set the message id associated with dequeue options.
304
- //-----------------------------------------------------------------------------
305
- int dpiDeqOptions_setMsgId(dpiDeqOptions *options, const char *value,
306
- uint32_t valueLength)
307
- {
308
- void *rawValue = NULL;
309
- dpiError error;
310
- int status;
311
-
312
- if (dpiGen__startPublicFn(options, DPI_HTYPE_DEQ_OPTIONS, __func__, 1,
313
- &error) < 0)
314
- return dpiGen__endPublicFn(options, DPI_FAILURE, &error);
315
- DPI_CHECK_PTR_NOT_NULL(options, value)
316
- if (dpiOci__rawAssignBytes(options->env->handle, value, valueLength,
317
- &rawValue, &error) < 0)
318
- return dpiGen__endPublicFn(options, DPI_FAILURE, &error);
319
- status = dpiOci__attrSet(options->handle, DPI_OCI_DTYPE_AQDEQ_OPTIONS,
320
- (void*) &rawValue, valueLength, DPI_OCI_ATTR_DEQ_MSGID,
321
- "set value", &error);
322
- dpiOci__rawResize(options->env->handle, &rawValue, 0, &error);
323
- return dpiGen__endPublicFn(options, status, &error);
324
- }
325
-
326
-
327
- //-----------------------------------------------------------------------------
328
- // dpiDeqOptions_setNavigation() [PUBLIC]
329
- // Set navigation associated with dequeue options.
330
- //-----------------------------------------------------------------------------
331
- int dpiDeqOptions_setNavigation(dpiDeqOptions *options, dpiDeqNavigation value)
332
- {
333
- return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_NAVIGATION,
334
- __func__, &value, 0);
335
- }
336
-
337
-
338
- //-----------------------------------------------------------------------------
339
- // dpiDeqOptions_setTransformation() [PUBLIC]
340
- // Set transformation associated with dequeue options.
341
- //-----------------------------------------------------------------------------
342
- int dpiDeqOptions_setTransformation(dpiDeqOptions *options, const char *value,
343
- uint32_t valueLength)
344
- {
345
- return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_TRANSFORMATION,
346
- __func__, value, valueLength);
347
- }
348
-
349
-
350
- //-----------------------------------------------------------------------------
351
- // dpiDeqOptions_setVisibility() [PUBLIC]
352
- // Set visibility associated with dequeue options.
353
- //-----------------------------------------------------------------------------
354
- int dpiDeqOptions_setVisibility(dpiDeqOptions *options, dpiVisibility value)
355
- {
356
- return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_VISIBILITY,
357
- __func__, &value, 0);
358
- }
359
-
360
-
361
- //-----------------------------------------------------------------------------
362
- // dpiDeqOptions_setWait() [PUBLIC]
363
- // Set the number of seconds to wait for a message when dequeuing.
364
- //-----------------------------------------------------------------------------
365
- int dpiDeqOptions_setWait(dpiDeqOptions *options, uint32_t value)
366
- {
367
- return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_WAIT, __func__,
368
- &value, 0);
369
- }
370
-