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,117 +0,0 @@
1
- //-----------------------------------------------------------------------------
2
- // Copyright (c) 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
- // dpiHandleList.c
14
- // Implementation of a list of handles which are managed in a thread-safe
15
- // manner. The references to these handles are assumed to be held by other
16
- // structures. No references are held by the list of handles defined here.
17
- //-----------------------------------------------------------------------------
18
-
19
- #include "dpiImpl.h"
20
-
21
- //-----------------------------------------------------------------------------
22
- // dpiHandleList__addHandle() [INTERNAL]
23
- // Add a handle to the list. The list is expanded in sets of 8 handles as
24
- // needed. A current position is maintained to reduce the number of scans of
25
- // the list are required. An empty slot is designated by a NULL pointer.
26
- //-----------------------------------------------------------------------------
27
- int dpiHandleList__addHandle(dpiHandleList *list, void *handle,
28
- uint32_t *slotNum, dpiError *error)
29
- {
30
- uint32_t numSlots, i;
31
- void **tempHandles;
32
-
33
- dpiMutex__acquire(list->mutex);
34
- if (list->numUsedSlots == list->numSlots) {
35
- numSlots = list->numSlots + 8;
36
- if (dpiUtils__allocateMemory(numSlots, sizeof(void*), 1,
37
- "allocate slots", (void**) &tempHandles, error) < 0) {
38
- dpiMutex__release(list->mutex);
39
- return DPI_FAILURE;
40
- }
41
- memcpy(tempHandles, list->handles, list->numSlots * sizeof(void*));
42
- dpiUtils__freeMemory(list->handles);
43
- list->handles = tempHandles;
44
- list->numSlots = numSlots;
45
- *slotNum = list->numUsedSlots++;
46
- list->currentPos = list->numUsedSlots + 1;
47
- } else {
48
- for (i = 0; i < list->numSlots; i++) {
49
- if (!list->handles[list->currentPos])
50
- break;
51
- list->currentPos++;
52
- if (list->currentPos == list->numSlots)
53
- list->currentPos = 0;
54
- }
55
- list->numUsedSlots++;
56
- *slotNum = list->currentPos++;
57
- if (list->currentPos == list->numSlots)
58
- list->currentPos = 0;
59
- }
60
- list->handles[*slotNum] = handle;
61
- dpiMutex__release(list->mutex);
62
- return DPI_SUCCESS;
63
- }
64
-
65
-
66
- //-----------------------------------------------------------------------------
67
- // dpiHandleList__create() [INTERNAL]
68
- // Create a new (empty) list of handles.
69
- //-----------------------------------------------------------------------------
70
- int dpiHandleList__create(dpiHandleList **list, dpiError *error)
71
- {
72
- dpiHandleList *tempList;
73
-
74
- if (dpiUtils__allocateMemory(1, sizeof(dpiHandleList), 0,
75
- "allocate handle list", (void**) &tempList, error) < 0)
76
- return DPI_FAILURE;
77
- tempList->numSlots = 8;
78
- tempList->numUsedSlots = 0;
79
- if (dpiUtils__allocateMemory(tempList->numSlots, sizeof(void*), 1,
80
- "allocate handle list slots", (void**) &tempList->handles,
81
- error) < 0) {
82
- dpiUtils__freeMemory(tempList);
83
- return DPI_FAILURE;
84
- }
85
- dpiMutex__initialize(tempList->mutex);
86
- tempList->currentPos = 0;
87
- *list = tempList;
88
- return DPI_SUCCESS;
89
- }
90
-
91
- //-----------------------------------------------------------------------------
92
- // dpiHandleList__free() [INTERNAL]
93
- // Free the memory associated with the handle list.
94
- //-----------------------------------------------------------------------------
95
- void dpiHandleList__free(dpiHandleList *list)
96
- {
97
- if (list->handles) {
98
- dpiUtils__freeMemory(list->handles);
99
- list->handles = NULL;
100
- }
101
- dpiMutex__destroy(list->mutex);
102
- dpiUtils__freeMemory(list);
103
- }
104
-
105
-
106
- //-----------------------------------------------------------------------------
107
- // dpiHandleList__removeHandle() [INTERNAL]
108
- // Remove the handle at the specified location from the list.
109
- //-----------------------------------------------------------------------------
110
- void dpiHandleList__removeHandle(dpiHandleList *list, uint32_t slotNum)
111
- {
112
- dpiMutex__acquire(list->mutex);
113
- list->handles[slotNum] = NULL;
114
- list->numUsedSlots--;
115
- dpiMutex__release(list->mutex);
116
- }
117
-
@@ -1,118 +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
- // dpiHandlePool.c
14
- // Implementation of a pool of handles which can be acquired and released in
15
- // a thread-safe manner. The pool is a circular queue where handles are
16
- // acquired from the front and released to the back.
17
- //-----------------------------------------------------------------------------
18
-
19
- #include "dpiImpl.h"
20
-
21
- //-----------------------------------------------------------------------------
22
- // dpiHandlePool__acquire() [INTERNAL]
23
- // Acquire a handle from the pool. If a handle is available, it will be
24
- // cleared out of the pool and returned to the caller. It is the caller's
25
- // responsibility to return the handle back to the pool when it is finished
26
- // with it. If no handle is available, a NULL value is returned. The caller is
27
- // expected to create a new handle and return it to the pool when it is
28
- // finished with it.
29
- //-----------------------------------------------------------------------------
30
- int dpiHandlePool__acquire(dpiHandlePool *pool, void **handle, dpiError *error)
31
- {
32
- void **tempHandles;
33
- uint32_t numSlots;
34
-
35
- dpiMutex__acquire(pool->mutex);
36
- if (pool->acquirePos != pool->releasePos) {
37
- *handle = pool->handles[pool->acquirePos];
38
- pool->handles[pool->acquirePos++] = NULL;
39
- if (pool->acquirePos == pool->numSlots)
40
- pool->acquirePos = 0;
41
- } else {
42
- *handle = NULL;
43
- pool->numUsedSlots++;
44
- if (pool->numUsedSlots > pool->numSlots) {
45
- numSlots = pool->numSlots + 8;
46
- if (dpiUtils__allocateMemory(numSlots, sizeof(void*), 1,
47
- "allocate slots", (void**) &tempHandles, error) < 0) {
48
- dpiMutex__release(pool->mutex);
49
- return DPI_FAILURE;
50
- }
51
- memcpy(tempHandles, pool->handles, pool->numSlots * sizeof(void*));
52
- dpiUtils__freeMemory(pool->handles);
53
- pool->handles = tempHandles;
54
- pool->numSlots = numSlots;
55
- }
56
- }
57
- dpiMutex__release(pool->mutex);
58
-
59
- return DPI_SUCCESS;
60
- }
61
-
62
-
63
- //-----------------------------------------------------------------------------
64
- // dpiHandlePool__create() [INTERNAL]
65
- // Create a new handle pool.
66
- //-----------------------------------------------------------------------------
67
- int dpiHandlePool__create(dpiHandlePool **pool, dpiError *error)
68
- {
69
- dpiHandlePool *tempPool;
70
-
71
- if (dpiUtils__allocateMemory(1, sizeof(dpiHandlePool), 0,
72
- "allocate handle pool", (void**) &tempPool, error) < 0)
73
- return DPI_FAILURE;
74
- tempPool->numSlots = 8;
75
- tempPool->numUsedSlots = 0;
76
- if (dpiUtils__allocateMemory(tempPool->numSlots, sizeof(void*), 1,
77
- "allocate handle pool slots", (void**) &tempPool->handles,
78
- error) < 0) {
79
- dpiUtils__freeMemory(tempPool);
80
- return DPI_FAILURE;
81
- }
82
- dpiMutex__initialize(tempPool->mutex);
83
- tempPool->acquirePos = 0;
84
- tempPool->releasePos = 0;
85
- *pool = tempPool;
86
- return DPI_SUCCESS;
87
- }
88
-
89
- //-----------------------------------------------------------------------------
90
- // dpiHandlePool__free() [INTERNAL]
91
- // Free the memory associated with the error pool.
92
- //-----------------------------------------------------------------------------
93
- void dpiHandlePool__free(dpiHandlePool *pool)
94
- {
95
- if (pool->handles) {
96
- dpiUtils__freeMemory(pool->handles);
97
- pool->handles = NULL;
98
- }
99
- dpiMutex__destroy(pool->mutex);
100
- dpiUtils__freeMemory(pool);
101
- }
102
-
103
-
104
- //-----------------------------------------------------------------------------
105
- // dpiHandlePool__release() [INTERNAL]
106
- // Release a handle back to the pool. No checks are performed on the handle
107
- // that is being returned to the pool; It will simply be placed back in the
108
- // pool.
109
- //-----------------------------------------------------------------------------
110
- void dpiHandlePool__release(dpiHandlePool *pool, void *handle, dpiError *error)
111
- {
112
- dpiMutex__acquire(pool->mutex);
113
- pool->handles[pool->releasePos++] = handle;
114
- if (pool->releasePos == pool->numSlots)
115
- pool->releasePos = 0;
116
- dpiMutex__release(pool->mutex);
117
- }
118
-