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,115 +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
- // dpiObjectAttr.c
14
- // Implementation of object attributes.
15
- //-----------------------------------------------------------------------------
16
-
17
- #include "dpiImpl.h"
18
-
19
- //-----------------------------------------------------------------------------
20
- // dpiObjectAttr__allocate() [INTERNAL]
21
- // Allocate and initialize an object attribute structure.
22
- //-----------------------------------------------------------------------------
23
- int dpiObjectAttr__allocate(dpiObjectType *objType, void *param,
24
- dpiObjectAttr **attr, dpiError *error)
25
- {
26
- dpiObjectAttr *tempAttr;
27
-
28
- // allocate and assign main reference to the type this attribute belongs to
29
- *attr = NULL;
30
- if (dpiGen__allocate(DPI_HTYPE_OBJECT_ATTR, objType->env,
31
- (void**) &tempAttr, error) < 0)
32
- return DPI_FAILURE;
33
- dpiGen__setRefCount(objType, error, 1);
34
- tempAttr->belongsToType = objType;
35
-
36
- // determine the name of the attribute
37
- if (dpiUtils__getAttrStringWithDup("get name", param, DPI_OCI_DTYPE_PARAM,
38
- DPI_OCI_ATTR_NAME, &tempAttr->name, &tempAttr->nameLength,
39
- error) < 0) {
40
- dpiObjectAttr__free(tempAttr, error);
41
- return DPI_FAILURE;
42
- }
43
-
44
- // determine type information of the attribute
45
- if (dpiOracleType__populateTypeInfo(objType->conn, param,
46
- DPI_OCI_DTYPE_PARAM, &tempAttr->typeInfo, error) < 0) {
47
- dpiObjectAttr__free(tempAttr, error);
48
- return DPI_FAILURE;
49
- }
50
-
51
- *attr = tempAttr;
52
- return DPI_SUCCESS;
53
- }
54
-
55
-
56
- //-----------------------------------------------------------------------------
57
- // dpiObjectAttr__free() [INTERNAL]
58
- // Free the memory for an object attribute.
59
- //-----------------------------------------------------------------------------
60
- void dpiObjectAttr__free(dpiObjectAttr *attr, dpiError *error)
61
- {
62
- if (attr->belongsToType) {
63
- dpiGen__setRefCount(attr->belongsToType, error, -1);
64
- attr->belongsToType = NULL;
65
- }
66
- if (attr->typeInfo.objectType) {
67
- dpiGen__setRefCount(attr->typeInfo.objectType, error, -1);
68
- attr->typeInfo.objectType = NULL;
69
- }
70
- if (attr->name) {
71
- dpiUtils__freeMemory((void*) attr->name);
72
- attr->name = NULL;
73
- }
74
- dpiUtils__freeMemory(attr);
75
- }
76
-
77
-
78
- //-----------------------------------------------------------------------------
79
- // dpiObjectAttr_addRef() [PUBLIC]
80
- // Add a reference to the object attribute.
81
- //-----------------------------------------------------------------------------
82
- int dpiObjectAttr_addRef(dpiObjectAttr *attr)
83
- {
84
- return dpiGen__addRef(attr, DPI_HTYPE_OBJECT_ATTR, __func__);
85
- }
86
-
87
-
88
- //-----------------------------------------------------------------------------
89
- // dpiObjectAttr_getInfo() [PUBLIC]
90
- // Return information about the attribute to the caller.
91
- //-----------------------------------------------------------------------------
92
- int dpiObjectAttr_getInfo(dpiObjectAttr *attr, dpiObjectAttrInfo *info)
93
- {
94
- dpiError error;
95
-
96
- if (dpiGen__startPublicFn(attr, DPI_HTYPE_OBJECT_ATTR, __func__, 0,
97
- &error) < 0)
98
- return dpiGen__endPublicFn(attr, DPI_FAILURE, &error);
99
- DPI_CHECK_PTR_NOT_NULL(attr, info)
100
- info->name = attr->name;
101
- info->nameLength = attr->nameLength;
102
- info->typeInfo = attr->typeInfo;
103
- return dpiGen__endPublicFn(attr, DPI_SUCCESS, &error);
104
- }
105
-
106
-
107
- //-----------------------------------------------------------------------------
108
- // dpiObjectAttr_release() [PUBLIC]
109
- // Release a reference to the object attribute.
110
- //-----------------------------------------------------------------------------
111
- int dpiObjectAttr_release(dpiObjectAttr *attr)
112
- {
113
- return dpiGen__release(attr, DPI_HTYPE_OBJECT_ATTR, __func__);
114
- }
115
-
@@ -1,326 +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
- // dpiObjectType.c
14
- // Implementation of object types.
15
- //-----------------------------------------------------------------------------
16
-
17
- #include "dpiImpl.h"
18
-
19
- // forward declarations of internal functions only used in this file
20
- static int dpiObjectType__init(dpiObjectType *objType, void *param,
21
- uint32_t nameAttribute, dpiError *error);
22
-
23
-
24
- //-----------------------------------------------------------------------------
25
- // dpiObjectType__allocate() [INTERNAL]
26
- // Allocate and initialize an object type structure.
27
- //-----------------------------------------------------------------------------
28
- int dpiObjectType__allocate(dpiConn *conn, void *param,
29
- uint32_t nameAttribute, dpiObjectType **objType, dpiError *error)
30
- {
31
- dpiObjectType *tempObjType;
32
-
33
- // create structure and retain reference to connection
34
- *objType = NULL;
35
- if (dpiGen__allocate(DPI_HTYPE_OBJECT_TYPE, conn->env,
36
- (void**) &tempObjType, error) < 0)
37
- return DPI_FAILURE;
38
- dpiGen__setRefCount(conn, error, 1);
39
- tempObjType->conn = conn;
40
-
41
- // perform initialization
42
- if (dpiObjectType__init(tempObjType, param, nameAttribute, error) < 0) {
43
- dpiObjectType__free(tempObjType, error);
44
- return DPI_FAILURE;
45
- }
46
-
47
- *objType = tempObjType;
48
- return DPI_SUCCESS;
49
- }
50
-
51
-
52
- //-----------------------------------------------------------------------------
53
- // dpiObjectType__check() [INTERNAL]
54
- // Validate that the connection from which the object type was created is
55
- // still connected and issue an error if it is not.
56
- //-----------------------------------------------------------------------------
57
- static int dpiObjectType__check(dpiObjectType *objType, const char *fnName,
58
- dpiError *error)
59
- {
60
- if (dpiGen__startPublicFn(objType, DPI_HTYPE_OBJECT_TYPE, fnName, 1,
61
- error) < 0)
62
- return DPI_FAILURE;
63
- return dpiConn__checkConnected(objType->conn, error);
64
- }
65
-
66
-
67
- //-----------------------------------------------------------------------------
68
- // dpiObjectType__describe() [INTERNAL]
69
- // Describe the object type and store information about it. Note that a
70
- // separate call to OCIDescribeAny() is made in order to support nested types;
71
- // an illegal attribute value is returned if this is not done.
72
- //-----------------------------------------------------------------------------
73
- static int dpiObjectType__describe(dpiObjectType *objType,
74
- void *describeHandle, dpiError *error)
75
- {
76
- void *collectionParam, *param;
77
- uint16_t typeCode;
78
-
79
- // describe the type
80
- if (dpiOci__describeAny(objType->conn, objType->tdo, 0, DPI_OCI_OTYPE_PTR,
81
- describeHandle, error) < 0)
82
- return DPI_FAILURE;
83
-
84
- // get top level parameter descriptor
85
- if (dpiOci__attrGet(describeHandle, DPI_OCI_HTYPE_DESCRIBE, &param, 0,
86
- DPI_OCI_ATTR_PARAM, "get top level parameter", error) < 0)
87
- return DPI_FAILURE;
88
-
89
- // determine type code
90
- if (dpiOci__attrGet(param, DPI_OCI_DTYPE_PARAM, &typeCode, 0,
91
- DPI_OCI_ATTR_TYPECODE, "get type code", error) < 0)
92
- return DPI_FAILURE;
93
- objType->typeCode = typeCode;
94
-
95
- // determine the number of attributes
96
- if (dpiOci__attrGet(param, DPI_OCI_DTYPE_PARAM,
97
- (void*) &objType->numAttributes, 0, DPI_OCI_ATTR_NUM_TYPE_ATTRS,
98
- "get number of attributes", error) < 0)
99
- return DPI_FAILURE;
100
-
101
- // if a collection, need to determine the element type
102
- if (typeCode == DPI_SQLT_NCO) {
103
- objType->isCollection = 1;
104
-
105
- // acquire collection parameter descriptor
106
- if (dpiOci__attrGet(param, DPI_OCI_DTYPE_PARAM, &collectionParam, 0,
107
- DPI_OCI_ATTR_COLLECTION_ELEMENT, "get collection descriptor",
108
- error) < 0)
109
- return DPI_FAILURE;
110
-
111
- // determine type of element
112
- if (dpiOracleType__populateTypeInfo(objType->conn, collectionParam,
113
- DPI_OCI_DTYPE_PARAM, &objType->elementTypeInfo, error) < 0)
114
- return DPI_FAILURE;
115
-
116
- }
117
-
118
- return DPI_SUCCESS;
119
- }
120
-
121
-
122
- //-----------------------------------------------------------------------------
123
- // dpiObjectType__free() [INTERNAL]
124
- // Free the memory for an object type.
125
- //-----------------------------------------------------------------------------
126
- void dpiObjectType__free(dpiObjectType *objType, dpiError *error)
127
- {
128
- if (objType->conn) {
129
- dpiGen__setRefCount(objType->conn, error, -1);
130
- objType->conn = NULL;
131
- }
132
- if (objType->elementTypeInfo.objectType) {
133
- dpiGen__setRefCount(objType->elementTypeInfo.objectType, error, -1);
134
- objType->elementTypeInfo.objectType = NULL;
135
- }
136
- if (objType->schema) {
137
- dpiUtils__freeMemory((void*) objType->schema);
138
- objType->schema = NULL;
139
- }
140
- if (objType->name) {
141
- dpiUtils__freeMemory((void*) objType->name);
142
- objType->name = NULL;
143
- }
144
- dpiUtils__freeMemory(objType);
145
- }
146
-
147
-
148
- //-----------------------------------------------------------------------------
149
- // dpiObjectType__init() [INTERNAL]
150
- // Initialize the object type.
151
- //-----------------------------------------------------------------------------
152
- static int dpiObjectType__init(dpiObjectType *objType, void *param,
153
- uint32_t nameAttribute, dpiError *error)
154
- {
155
- void *describeHandle;
156
- void *tdoReference;
157
-
158
- // determine the schema of the type
159
- if (dpiUtils__getAttrStringWithDup("get schema", param,
160
- DPI_OCI_DTYPE_PARAM, DPI_OCI_ATTR_SCHEMA_NAME, &objType->schema,
161
- &objType->schemaLength, error) < 0)
162
- return DPI_FAILURE;
163
-
164
- // determine the name of the type
165
- if (dpiUtils__getAttrStringWithDup("get name", param, DPI_OCI_DTYPE_PARAM,
166
- nameAttribute, &objType->name, &objType->nameLength, error) < 0)
167
- return DPI_FAILURE;
168
-
169
- // retrieve TDO of the parameter and pin it in the cache
170
- if (dpiOci__attrGet(param, DPI_OCI_DTYPE_PARAM, (void*) &tdoReference, 0,
171
- DPI_OCI_ATTR_REF_TDO, "get TDO reference", error) < 0)
172
- return DPI_FAILURE;
173
- if (dpiOci__objectPin(objType->env->handle, tdoReference, &objType->tdo,
174
- error) < 0)
175
- return DPI_FAILURE;
176
-
177
- // acquire a describe handle
178
- if (dpiOci__handleAlloc(objType->env->handle, &describeHandle,
179
- DPI_OCI_HTYPE_DESCRIBE, "allocate describe handle", error) < 0)
180
- return DPI_FAILURE;
181
-
182
- // describe the type
183
- if (dpiObjectType__describe(objType, describeHandle, error) < 0) {
184
- dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE);
185
- return DPI_FAILURE;
186
- }
187
-
188
- // free the describe handle
189
- dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE);
190
-
191
- return DPI_SUCCESS;
192
- }
193
-
194
-
195
- //-----------------------------------------------------------------------------
196
- // dpiObjectType_addRef() [PUBLIC]
197
- // Add a reference to the object type.
198
- //-----------------------------------------------------------------------------
199
- int dpiObjectType_addRef(dpiObjectType *objType)
200
- {
201
- return dpiGen__addRef(objType, DPI_HTYPE_OBJECT_TYPE, __func__);
202
- }
203
-
204
-
205
- //-----------------------------------------------------------------------------
206
- // dpiObjectType_createObject() [PUBLIC]
207
- // Create a new object of the specified type and return it. Return NULL on
208
- // error.
209
- //-----------------------------------------------------------------------------
210
- int dpiObjectType_createObject(dpiObjectType *objType, dpiObject **obj)
211
- {
212
- dpiError error;
213
- int status;
214
-
215
- // validate parameters
216
- if (dpiObjectType__check(objType, __func__, &error) < 0)
217
- return dpiGen__endPublicFn(objType, DPI_FAILURE, &error);
218
- DPI_CHECK_PTR_NOT_NULL(objType, obj)
219
- status = dpiObject__allocate(objType, NULL, NULL, NULL, obj, &error);
220
- return dpiGen__endPublicFn(objType, status, &error);
221
- }
222
-
223
-
224
- //-----------------------------------------------------------------------------
225
- // dpiObjectType_getAttributes() [PUBLIC]
226
- // Get the attributes for the object type in the provided array.
227
- //-----------------------------------------------------------------------------
228
- int dpiObjectType_getAttributes(dpiObjectType *objType, uint16_t numAttributes,
229
- dpiObjectAttr **attributes)
230
- {
231
- void *topLevelParam, *attrListParam, *attrParam, *describeHandle;
232
- dpiError error;
233
- uint16_t i;
234
-
235
- // validate object type and the number of attributes
236
- if (dpiObjectType__check(objType, __func__, &error) < 0)
237
- return dpiGen__endPublicFn(objType, DPI_FAILURE, &error);
238
- DPI_CHECK_PTR_NOT_NULL(objType, attributes)
239
- if (numAttributes < objType->numAttributes) {
240
- dpiError__set(&error, "get attributes", DPI_ERR_ARRAY_SIZE_TOO_SMALL,
241
- numAttributes);
242
- return dpiGen__endPublicFn(objType, DPI_FAILURE, &error);
243
- }
244
- if (numAttributes == 0)
245
- return dpiGen__endPublicFn(objType, DPI_SUCCESS, &error);
246
-
247
- // acquire a describe handle
248
- if (dpiOci__handleAlloc(objType->env->handle, &describeHandle,
249
- DPI_OCI_HTYPE_DESCRIBE, "allocate describe handle", &error) < 0)
250
- return dpiGen__endPublicFn(objType, DPI_FAILURE, &error);
251
-
252
- // describe the type
253
- if (dpiOci__describeAny(objType->conn, objType->tdo, 0, DPI_OCI_OTYPE_PTR,
254
- describeHandle, &error) < 0) {
255
- dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE);
256
- return dpiGen__endPublicFn(objType, DPI_FAILURE, &error);
257
- }
258
-
259
- // get the top level parameter descriptor
260
- if (dpiOci__attrGet(describeHandle, DPI_OCI_HTYPE_DESCRIBE, &topLevelParam,
261
- 0, DPI_OCI_ATTR_PARAM, "get top level param", &error) < 0) {
262
- dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE);
263
- return dpiGen__endPublicFn(objType, DPI_FAILURE, &error);
264
- }
265
-
266
- // get the attribute list parameter descriptor
267
- if (dpiOci__attrGet(topLevelParam, DPI_OCI_DTYPE_PARAM,
268
- (void*) &attrListParam, 0, DPI_OCI_ATTR_LIST_TYPE_ATTRS,
269
- "get attr list param", &error) < 0) {
270
- dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE);
271
- return dpiGen__endPublicFn(objType, DPI_FAILURE, &error);
272
- }
273
-
274
- // create attribute structure for each attribute
275
- for (i = 0; i < objType->numAttributes; i++) {
276
- if (dpiOci__paramGet(attrListParam, DPI_OCI_DTYPE_PARAM, &attrParam,
277
- (uint32_t) i + 1, "get attribute param", &error) < 0) {
278
- dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE);
279
- return dpiGen__endPublicFn(objType, DPI_FAILURE, &error);
280
- }
281
- if (dpiObjectAttr__allocate(objType, attrParam, &attributes[i],
282
- &error) < 0) {
283
- dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE);
284
- return dpiGen__endPublicFn(objType, DPI_FAILURE, &error);
285
- }
286
- }
287
-
288
- // free the describe handle
289
- dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE);
290
-
291
- return dpiGen__endPublicFn(objType, DPI_SUCCESS, &error);
292
- }
293
-
294
-
295
- //-----------------------------------------------------------------------------
296
- // dpiObjectType_getInfo() [PUBLIC]
297
- // Return information about the object type.
298
- //-----------------------------------------------------------------------------
299
- int dpiObjectType_getInfo(dpiObjectType *objType, dpiObjectTypeInfo *info)
300
- {
301
- dpiError error;
302
-
303
- if (dpiGen__startPublicFn(objType, DPI_HTYPE_OBJECT_TYPE, __func__, 0,
304
- &error) < 0)
305
- return dpiGen__endPublicFn(objType, DPI_FAILURE, &error);
306
- DPI_CHECK_PTR_NOT_NULL(objType, info)
307
- info->name = objType->name;
308
- info->nameLength = objType->nameLength;
309
- info->schema = objType->schema;
310
- info->schemaLength = objType->schemaLength;
311
- info->isCollection = objType->isCollection;
312
- info->elementTypeInfo = objType->elementTypeInfo;
313
- info->numAttributes = objType->numAttributes;
314
- return dpiGen__endPublicFn(objType, DPI_SUCCESS, &error);
315
- }
316
-
317
-
318
- //-----------------------------------------------------------------------------
319
- // dpiObjectType_release() [PUBLIC]
320
- // Release a reference to the object type.
321
- //-----------------------------------------------------------------------------
322
- int dpiObjectType_release(dpiObjectType *objType)
323
- {
324
- return dpiGen__release(objType, DPI_HTYPE_OBJECT_TYPE, __func__);
325
- }
326
-