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/dpiDebug.c
DELETED
|
@@ -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
|
-
|
package/odpi/src/dpiDeqOptions.c
DELETED
|
@@ -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
|
-
|