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.
- package/CHANGELOG.md +135 -8
- package/README.md +6 -4
- package/build/Release/oracledb-abi48-darwin-x64.node +0 -0
- package/build/Release/oracledb-abi48-darwin-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-abi48-linux-x64.node +0 -0
- package/build/Release/oracledb-abi48-linux-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-abi48-win32-x64.node +0 -0
- package/build/Release/oracledb-abi48-win32-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-abi57-darwin-x64.node +0 -0
- package/build/Release/oracledb-abi57-darwin-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-abi57-linux-x64.node +0 -0
- package/build/Release/oracledb-abi57-linux-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-abi57-win32-x64.node +0 -0
- package/build/Release/oracledb-abi57-win32-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-abi64-darwin-x64.node +0 -0
- package/build/Release/oracledb-abi64-darwin-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-abi64-linux-x64.node +0 -0
- package/build/Release/oracledb-abi64-linux-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-abi64-win32-x64.node +0 -0
- package/build/Release/oracledb-abi64-win32-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-abi67-darwin-x64.node +0 -0
- package/build/Release/oracledb-abi67-darwin-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-abi67-linux-x64.node +0 -0
- package/build/Release/oracledb-abi67-linux-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-abi67-win32-x64.node +0 -0
- package/build/Release/oracledb-abi67-win32-x64.node-buildinfo.txt +1 -0
- package/lib/connection.js +18 -4
- package/lib/oracledb.js +44 -92
- package/lib/pool.js +36 -2
- package/lib/sodaCollection.js +1 -1
- package/lib/sodaDatabase.js +1 -1
- package/lib/util.js +82 -5
- package/package/README.md +32 -101
- package/package/install.js +139 -0
- package/package/prunebinaries.js +51 -0
- package/package.json +4 -11
- package/binding.gyp +0 -162
- package/lib/rel.txt +0 -1
- package/odpi/.npmignore +0 -4
- package/odpi/LICENSE.md +0 -218
- package/odpi/README.md +0 -61
- package/odpi/embed/README.md +0 -4
- package/odpi/embed/dpi.c +0 -50
- package/odpi/include/dpi.h +0 -1748
- package/odpi/src/dpiConn.c +0 -2089
- package/odpi/src/dpiContext.c +0 -296
- package/odpi/src/dpiData.c +0 -797
- package/odpi/src/dpiDebug.c +0 -184
- package/odpi/src/dpiDeqOptions.c +0 -370
- package/odpi/src/dpiEnqOptions.c +0 -174
- package/odpi/src/dpiEnv.c +0 -189
- package/odpi/src/dpiError.c +0 -204
- package/odpi/src/dpiErrorMessages.h +0 -86
- package/odpi/src/dpiGen.c +0 -303
- package/odpi/src/dpiGlobal.c +0 -292
- package/odpi/src/dpiHandleList.c +0 -117
- package/odpi/src/dpiHandlePool.c +0 -118
- package/odpi/src/dpiImpl.h +0 -1707
- package/odpi/src/dpiLob.c +0 -506
- package/odpi/src/dpiMsgProps.c +0 -386
- package/odpi/src/dpiObject.c +0 -897
- package/odpi/src/dpiObjectAttr.c +0 -115
- package/odpi/src/dpiObjectType.c +0 -326
- package/odpi/src/dpiOci.c +0 -3527
- package/odpi/src/dpiOracleType.c +0 -492
- package/odpi/src/dpiPool.c +0 -549
- package/odpi/src/dpiRowid.c +0 -136
- package/odpi/src/dpiSodaColl.c +0 -685
- package/odpi/src/dpiSodaCollCursor.c +0 -143
- package/odpi/src/dpiSodaDb.c +0 -432
- package/odpi/src/dpiSodaDoc.c +0 -230
- package/odpi/src/dpiSodaDocCursor.c +0 -143
- package/odpi/src/dpiStmt.c +0 -1797
- package/odpi/src/dpiSubscr.c +0 -674
- package/odpi/src/dpiUtils.c +0 -410
- package/odpi/src/dpiVar.c +0 -1794
- package/package/MAKEPKG.BAT +0 -156
- package/package/Makefile +0 -85
- package/package/createpackage.js +0 -186
- package/package/extractpackage.js +0 -76
- package/package/getversion.js +0 -37
- package/package/oracledbinstall.js +0 -497
- package/package/package.json +0 -54
- package/package/util.js +0 -286
- package/src/njsCommon.cpp +0 -1055
- package/src/njsCommon.h +0 -484
- package/src/njsConnection.cpp +0 -2926
- package/src/njsConnection.h +0 -227
- package/src/njsIntLob.cpp +0 -618
- package/src/njsIntLob.h +0 -179
- package/src/njsMessages.cpp +0 -122
- package/src/njsMessages.h +0 -118
- package/src/njsOracle.cpp +0 -1274
- package/src/njsOracle.h +0 -237
- package/src/njsPool.cpp +0 -482
- package/src/njsPool.h +0 -132
- package/src/njsResultSet.cpp +0 -478
- package/src/njsResultSet.h +0 -120
- package/src/njsSodaCollection.cpp +0 -507
- package/src/njsSodaCollection.h +0 -128
- package/src/njsSodaDatabase.cpp +0 -335
- package/src/njsSodaDatabase.h +0 -108
- package/src/njsSodaDocCursor.cpp +0 -203
- package/src/njsSodaDocCursor.h +0 -94
- package/src/njsSodaDocument.cpp +0 -412
- package/src/njsSodaDocument.h +0 -105
- package/src/njsSodaOperation.cpp +0 -557
- package/src/njsSodaOperation.h +0 -123
- package/src/njsSubscription.cpp +0 -388
- package/src/njsSubscription.h +0 -111
- package/src/njsUtils.cpp +0 -158
- package/src/njsUtils.h +0 -68
package/odpi/src/dpiMsgProps.c
DELETED
|
@@ -1,386 +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
|
-
// dpiMsgProps.c
|
|
14
|
-
// Implementation of AQ message properties.
|
|
15
|
-
//-----------------------------------------------------------------------------
|
|
16
|
-
|
|
17
|
-
#include "dpiImpl.h"
|
|
18
|
-
|
|
19
|
-
//-----------------------------------------------------------------------------
|
|
20
|
-
// dpiMsgProps__create() [INTERNAL]
|
|
21
|
-
// Create a new subscription structure and return it. In case of error NULL
|
|
22
|
-
// is returned.
|
|
23
|
-
//-----------------------------------------------------------------------------
|
|
24
|
-
int dpiMsgProps__create(dpiMsgProps *options, dpiConn *conn, dpiError *error)
|
|
25
|
-
{
|
|
26
|
-
dpiGen__setRefCount(conn, error, 1);
|
|
27
|
-
options->conn = conn;
|
|
28
|
-
return dpiOci__descriptorAlloc(conn->env->handle, &options->handle,
|
|
29
|
-
DPI_OCI_DTYPE_AQMSG_PROPERTIES, "allocate descriptor", error);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
//-----------------------------------------------------------------------------
|
|
34
|
-
// dpiMsgProps__extractMsgId() [INTERNAL]
|
|
35
|
-
// Extract bytes from the OCIRaw value containing the message id and store
|
|
36
|
-
// them in allocated memory on the message properties instance. Then resize the
|
|
37
|
-
// OCIRaw value so the memory can be reclaimed.
|
|
38
|
-
//-----------------------------------------------------------------------------
|
|
39
|
-
int dpiMsgProps__extractMsgId(dpiMsgProps *props, void *ociRaw,
|
|
40
|
-
const char **msgId, uint32_t *msgIdLength, dpiError *error)
|
|
41
|
-
{
|
|
42
|
-
const char *rawPtr;
|
|
43
|
-
|
|
44
|
-
dpiOci__rawPtr(props->env->handle, ociRaw, (void**) &rawPtr);
|
|
45
|
-
dpiOci__rawSize(props->env->handle, ociRaw, msgIdLength);
|
|
46
|
-
if (*msgIdLength > props->bufferLength) {
|
|
47
|
-
if (props->buffer) {
|
|
48
|
-
dpiUtils__freeMemory(props->buffer);
|
|
49
|
-
props->buffer = NULL;
|
|
50
|
-
}
|
|
51
|
-
if (dpiUtils__allocateMemory(1, *msgIdLength, 0,
|
|
52
|
-
"allocate msgid buffer", (void**) &props->buffer, error) < 0)
|
|
53
|
-
return DPI_FAILURE;
|
|
54
|
-
}
|
|
55
|
-
memcpy(props->buffer, rawPtr, *msgIdLength);
|
|
56
|
-
*msgId = props->buffer;
|
|
57
|
-
dpiOci__rawResize(props->env->handle, &ociRaw, 0, error);
|
|
58
|
-
return DPI_SUCCESS;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
//-----------------------------------------------------------------------------
|
|
63
|
-
// dpiMsgProps__free() [INTERNAL]
|
|
64
|
-
// Free the memory for a message properties structure.
|
|
65
|
-
//-----------------------------------------------------------------------------
|
|
66
|
-
void dpiMsgProps__free(dpiMsgProps *props, dpiError *error)
|
|
67
|
-
{
|
|
68
|
-
if (props->handle) {
|
|
69
|
-
dpiOci__descriptorFree(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES);
|
|
70
|
-
props->handle = NULL;
|
|
71
|
-
}
|
|
72
|
-
if (props->conn) {
|
|
73
|
-
dpiGen__setRefCount(props->conn, error, -1);
|
|
74
|
-
props->conn = NULL;
|
|
75
|
-
}
|
|
76
|
-
if (props->buffer) {
|
|
77
|
-
dpiUtils__freeMemory(props->buffer);
|
|
78
|
-
props->buffer = NULL;
|
|
79
|
-
}
|
|
80
|
-
dpiUtils__freeMemory(props);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
//-----------------------------------------------------------------------------
|
|
85
|
-
// dpiMsgProps__getAttrValue() [INTERNAL]
|
|
86
|
-
// Get the attribute value in OCI.
|
|
87
|
-
//-----------------------------------------------------------------------------
|
|
88
|
-
static int dpiMsgProps__getAttrValue(dpiMsgProps *props, uint32_t attribute,
|
|
89
|
-
const char *fnName, void *value, uint32_t *valueLength)
|
|
90
|
-
{
|
|
91
|
-
dpiError error;
|
|
92
|
-
int status;
|
|
93
|
-
|
|
94
|
-
if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, fnName, 1,
|
|
95
|
-
&error) < 0)
|
|
96
|
-
return dpiGen__endPublicFn(props, DPI_FAILURE, &error);
|
|
97
|
-
DPI_CHECK_PTR_NOT_NULL(props, value)
|
|
98
|
-
DPI_CHECK_PTR_NOT_NULL(props, valueLength)
|
|
99
|
-
status = dpiOci__attrGet(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES,
|
|
100
|
-
value, valueLength, attribute, "get attribute value", &error);
|
|
101
|
-
return dpiGen__endPublicFn(props, status, &error);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
//-----------------------------------------------------------------------------
|
|
106
|
-
// dpiMsgProps__setAttrValue() [INTERNAL]
|
|
107
|
-
// Set the attribute value in OCI.
|
|
108
|
-
//-----------------------------------------------------------------------------
|
|
109
|
-
static int dpiMsgProps__setAttrValue(dpiMsgProps *props, uint32_t attribute,
|
|
110
|
-
const char *fnName, const void *value, uint32_t valueLength)
|
|
111
|
-
{
|
|
112
|
-
dpiError error;
|
|
113
|
-
int status;
|
|
114
|
-
|
|
115
|
-
if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, fnName, 1,
|
|
116
|
-
&error) < 0)
|
|
117
|
-
return dpiGen__endPublicFn(props, DPI_FAILURE, &error);
|
|
118
|
-
DPI_CHECK_PTR_NOT_NULL(props, value)
|
|
119
|
-
status = dpiOci__attrSet(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES,
|
|
120
|
-
(void*) value, valueLength, attribute, "set attribute value",
|
|
121
|
-
&error);
|
|
122
|
-
return dpiGen__endPublicFn(props, status, &error);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
//-----------------------------------------------------------------------------
|
|
127
|
-
// dpiMsgProps_addRef() [PUBLIC]
|
|
128
|
-
// Add a reference to the message properties.
|
|
129
|
-
//-----------------------------------------------------------------------------
|
|
130
|
-
int dpiMsgProps_addRef(dpiMsgProps *props)
|
|
131
|
-
{
|
|
132
|
-
return dpiGen__addRef(props, DPI_HTYPE_MSG_PROPS, __func__);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
//-----------------------------------------------------------------------------
|
|
137
|
-
// dpiMsgProps_getCorrelation() [PUBLIC]
|
|
138
|
-
// Return correlation associated with the message.
|
|
139
|
-
//-----------------------------------------------------------------------------
|
|
140
|
-
int dpiMsgProps_getCorrelation(dpiMsgProps *props, const char **value,
|
|
141
|
-
uint32_t *valueLength)
|
|
142
|
-
{
|
|
143
|
-
return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_CORRELATION, __func__,
|
|
144
|
-
(void*) value, valueLength);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
//-----------------------------------------------------------------------------
|
|
149
|
-
// dpiMsgProps_getDelay() [PUBLIC]
|
|
150
|
-
// Return the number of seconds the message was delayed.
|
|
151
|
-
//-----------------------------------------------------------------------------
|
|
152
|
-
int dpiMsgProps_getDelay(dpiMsgProps *props, int32_t *value)
|
|
153
|
-
{
|
|
154
|
-
uint32_t valueLength = sizeof(uint32_t);
|
|
155
|
-
|
|
156
|
-
return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_DELAY, __func__,
|
|
157
|
-
value, &valueLength);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
//-----------------------------------------------------------------------------
|
|
162
|
-
// dpiMsgProps_getDeliveryMode() [PUBLIC]
|
|
163
|
-
// Return the mode used for delivering the message.
|
|
164
|
-
//-----------------------------------------------------------------------------
|
|
165
|
-
int dpiMsgProps_getDeliveryMode(dpiMsgProps *props,
|
|
166
|
-
dpiMessageDeliveryMode *value)
|
|
167
|
-
{
|
|
168
|
-
uint32_t valueLength = sizeof(uint16_t);
|
|
169
|
-
|
|
170
|
-
return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_MSG_DELIVERY_MODE,
|
|
171
|
-
__func__, value, &valueLength);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
//-----------------------------------------------------------------------------
|
|
176
|
-
// dpiMsgProps_getEnqTime() [PUBLIC]
|
|
177
|
-
// Return the time the message was enqueued.
|
|
178
|
-
//-----------------------------------------------------------------------------
|
|
179
|
-
int dpiMsgProps_getEnqTime(dpiMsgProps *props, dpiTimestamp *value)
|
|
180
|
-
{
|
|
181
|
-
dpiOciDate ociValue;
|
|
182
|
-
dpiError error;
|
|
183
|
-
|
|
184
|
-
if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, 1,
|
|
185
|
-
&error) < 0)
|
|
186
|
-
return dpiGen__endPublicFn(props, DPI_FAILURE, &error);
|
|
187
|
-
DPI_CHECK_PTR_NOT_NULL(props, value)
|
|
188
|
-
if (dpiOci__attrGet(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES,
|
|
189
|
-
&ociValue, NULL, DPI_OCI_ATTR_ENQ_TIME, "get attribute value",
|
|
190
|
-
&error) < 0)
|
|
191
|
-
return dpiGen__endPublicFn(props, DPI_FAILURE, &error);
|
|
192
|
-
value->year = ociValue.year;
|
|
193
|
-
value->month = ociValue.month;
|
|
194
|
-
value->day = ociValue.day;
|
|
195
|
-
value->hour = ociValue.hour;
|
|
196
|
-
value->minute = ociValue.minute;
|
|
197
|
-
value->second = ociValue.second;
|
|
198
|
-
value->fsecond = 0;
|
|
199
|
-
value->tzHourOffset = 0;
|
|
200
|
-
value->tzMinuteOffset = 0;
|
|
201
|
-
return dpiGen__endPublicFn(props, DPI_SUCCESS, &error);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
//-----------------------------------------------------------------------------
|
|
206
|
-
// dpiMsgProps_getExceptionQ() [PUBLIC]
|
|
207
|
-
// Return the name of the exception queue associated with the message.
|
|
208
|
-
//-----------------------------------------------------------------------------
|
|
209
|
-
int dpiMsgProps_getExceptionQ(dpiMsgProps *props, const char **value,
|
|
210
|
-
uint32_t *valueLength)
|
|
211
|
-
{
|
|
212
|
-
return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_EXCEPTION_QUEUE,
|
|
213
|
-
__func__, (void*) value, valueLength);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
//-----------------------------------------------------------------------------
|
|
218
|
-
// dpiMsgProps_getExpiration() [PUBLIC]
|
|
219
|
-
// Return the number of seconds until the message expires.
|
|
220
|
-
//-----------------------------------------------------------------------------
|
|
221
|
-
int dpiMsgProps_getExpiration(dpiMsgProps *props, int32_t *value)
|
|
222
|
-
{
|
|
223
|
-
uint32_t valueLength = sizeof(uint32_t);
|
|
224
|
-
|
|
225
|
-
return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_EXPIRATION, __func__,
|
|
226
|
-
value, &valueLength);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
//-----------------------------------------------------------------------------
|
|
231
|
-
// dpiMsgProps_getNumAttempts() [PUBLIC]
|
|
232
|
-
// Return the number of attempts made to deliver the message.
|
|
233
|
-
//-----------------------------------------------------------------------------
|
|
234
|
-
int dpiMsgProps_getNumAttempts(dpiMsgProps *props, int32_t *value)
|
|
235
|
-
{
|
|
236
|
-
uint32_t valueLength = sizeof(uint32_t);
|
|
237
|
-
|
|
238
|
-
return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_ATTEMPTS, __func__,
|
|
239
|
-
value, &valueLength);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
//-----------------------------------------------------------------------------
|
|
244
|
-
// dpiMsgProps_getOriginalMsgId() [PUBLIC]
|
|
245
|
-
// Return the original message id for the message.
|
|
246
|
-
//-----------------------------------------------------------------------------
|
|
247
|
-
int dpiMsgProps_getOriginalMsgId(dpiMsgProps *props, const char **value,
|
|
248
|
-
uint32_t *valueLength)
|
|
249
|
-
{
|
|
250
|
-
dpiError error;
|
|
251
|
-
void *rawValue;
|
|
252
|
-
|
|
253
|
-
if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, 1,
|
|
254
|
-
&error) < 0)
|
|
255
|
-
return dpiGen__endPublicFn(props, DPI_FAILURE, &error);
|
|
256
|
-
DPI_CHECK_PTR_NOT_NULL(props, value)
|
|
257
|
-
DPI_CHECK_PTR_NOT_NULL(props, valueLength)
|
|
258
|
-
if (dpiOci__attrGet(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES,
|
|
259
|
-
&rawValue, NULL, DPI_OCI_ATTR_ORIGINAL_MSGID,
|
|
260
|
-
"get attribute value", &error) < 0)
|
|
261
|
-
return dpiGen__endPublicFn(props, DPI_FAILURE, &error);
|
|
262
|
-
dpiOci__rawPtr(props->env->handle, rawValue, (void**) value);
|
|
263
|
-
dpiOci__rawSize(props->env->handle, rawValue, valueLength);
|
|
264
|
-
return dpiGen__endPublicFn(props, DPI_SUCCESS, &error);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
//-----------------------------------------------------------------------------
|
|
269
|
-
// dpiMsgProps_getPriority() [PUBLIC]
|
|
270
|
-
// Return the priority of the message.
|
|
271
|
-
//-----------------------------------------------------------------------------
|
|
272
|
-
int dpiMsgProps_getPriority(dpiMsgProps *props, int32_t *value)
|
|
273
|
-
{
|
|
274
|
-
uint32_t valueLength = sizeof(uint32_t);
|
|
275
|
-
|
|
276
|
-
return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_PRIORITY, __func__,
|
|
277
|
-
value, &valueLength);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
//-----------------------------------------------------------------------------
|
|
282
|
-
// dpiMsgProps_getState() [PUBLIC]
|
|
283
|
-
// Return the state of the message.
|
|
284
|
-
//-----------------------------------------------------------------------------
|
|
285
|
-
int dpiMsgProps_getState(dpiMsgProps *props, dpiMessageState *value)
|
|
286
|
-
{
|
|
287
|
-
uint32_t valueLength = sizeof(uint32_t);
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_MSG_STATE, __func__,
|
|
291
|
-
value, &valueLength);
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
//-----------------------------------------------------------------------------
|
|
296
|
-
// dpiMsgProps_release() [PUBLIC]
|
|
297
|
-
// Release a reference to the message properties.
|
|
298
|
-
//-----------------------------------------------------------------------------
|
|
299
|
-
int dpiMsgProps_release(dpiMsgProps *props)
|
|
300
|
-
{
|
|
301
|
-
return dpiGen__release(props, DPI_HTYPE_MSG_PROPS, __func__);
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
//-----------------------------------------------------------------------------
|
|
306
|
-
// dpiMsgProps_setCorrelation() [PUBLIC]
|
|
307
|
-
// Set correlation associated with the message.
|
|
308
|
-
//-----------------------------------------------------------------------------
|
|
309
|
-
int dpiMsgProps_setCorrelation(dpiMsgProps *props, const char *value,
|
|
310
|
-
uint32_t valueLength)
|
|
311
|
-
{
|
|
312
|
-
return dpiMsgProps__setAttrValue(props, DPI_OCI_ATTR_CORRELATION, __func__,
|
|
313
|
-
value, valueLength);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
//-----------------------------------------------------------------------------
|
|
318
|
-
// dpiMsgProps_setDelay() [PUBLIC]
|
|
319
|
-
// Set the number of seconds to delay the message.
|
|
320
|
-
//-----------------------------------------------------------------------------
|
|
321
|
-
int dpiMsgProps_setDelay(dpiMsgProps *props, int32_t value)
|
|
322
|
-
{
|
|
323
|
-
return dpiMsgProps__setAttrValue(props, DPI_OCI_ATTR_DELAY, __func__,
|
|
324
|
-
&value, 0);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
//-----------------------------------------------------------------------------
|
|
329
|
-
// dpiMsgProps_setExceptionQ() [PUBLIC]
|
|
330
|
-
// Set the name of the exception queue associated with the message.
|
|
331
|
-
//-----------------------------------------------------------------------------
|
|
332
|
-
int dpiMsgProps_setExceptionQ(dpiMsgProps *props, const char *value,
|
|
333
|
-
uint32_t valueLength)
|
|
334
|
-
{
|
|
335
|
-
return dpiMsgProps__setAttrValue(props, DPI_OCI_ATTR_EXCEPTION_QUEUE,
|
|
336
|
-
__func__, value, valueLength);
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
//-----------------------------------------------------------------------------
|
|
341
|
-
// dpiMsgProps_setExpiration() [PUBLIC]
|
|
342
|
-
// Set the number of seconds until the message expires.
|
|
343
|
-
//-----------------------------------------------------------------------------
|
|
344
|
-
int dpiMsgProps_setExpiration(dpiMsgProps *props, int32_t value)
|
|
345
|
-
{
|
|
346
|
-
return dpiMsgProps__setAttrValue(props, DPI_OCI_ATTR_EXPIRATION, __func__,
|
|
347
|
-
&value, 0);
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
//-----------------------------------------------------------------------------
|
|
352
|
-
// dpiMsgProps_setOriginalMsgId() [PUBLIC]
|
|
353
|
-
// Set the original message id for the message.
|
|
354
|
-
//-----------------------------------------------------------------------------
|
|
355
|
-
int dpiMsgProps_setOriginalMsgId(dpiMsgProps *props, const char *value,
|
|
356
|
-
uint32_t valueLength)
|
|
357
|
-
{
|
|
358
|
-
void *rawValue = NULL;
|
|
359
|
-
dpiError error;
|
|
360
|
-
int status;
|
|
361
|
-
|
|
362
|
-
if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, 1,
|
|
363
|
-
&error) < 0)
|
|
364
|
-
return dpiGen__endPublicFn(props, DPI_FAILURE, &error);
|
|
365
|
-
DPI_CHECK_PTR_NOT_NULL(props, value)
|
|
366
|
-
if (dpiOci__rawAssignBytes(props->env->handle, value, valueLength,
|
|
367
|
-
&rawValue, &error) < 0)
|
|
368
|
-
return dpiGen__endPublicFn(props, DPI_FAILURE, &error);
|
|
369
|
-
status = dpiOci__attrSet(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES,
|
|
370
|
-
(void*) rawValue, 0, DPI_OCI_ATTR_ORIGINAL_MSGID, "set value",
|
|
371
|
-
&error);
|
|
372
|
-
dpiOci__rawResize(props->env->handle, &rawValue, 0, &error);
|
|
373
|
-
return dpiGen__endPublicFn(props, status, &error);
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
//-----------------------------------------------------------------------------
|
|
378
|
-
// dpiMsgProps_setPriority() [PUBLIC]
|
|
379
|
-
// Set the priority of the message.
|
|
380
|
-
//-----------------------------------------------------------------------------
|
|
381
|
-
int dpiMsgProps_setPriority(dpiMsgProps *props, int32_t value)
|
|
382
|
-
{
|
|
383
|
-
return dpiMsgProps__setAttrValue(props, DPI_OCI_ATTR_PRIORITY, __func__,
|
|
384
|
-
&value, 0);
|
|
385
|
-
}
|
|
386
|
-
|