Skip to content

Commit 8038126

Browse files
committed
Fix error message for append function, usage of deleteElement function with Associative Array collection types and update copyright year to 2025
1 parent e1770b5 commit 8038126

File tree

8 files changed

+23
-9
lines changed

8 files changed

+23
-9
lines changed

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015, 2024 Oracle and/or its affiliates.
1+
Copyright (c) 2015, 2025 Oracle and/or its affiliates.
22

33
This software is dual-licensed to you under the Universal Permissive License
44
(UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License

NOTICE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Copyright (c) 2015, 2024, Oracle and/or its affiliates.
1+
Copyright (c) 2015, 2025, Oracle and/or its affiliates.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ vulnerability disclosure process.
5050

5151
## License
5252

53-
Copyright (c) 2015, 2024, Oracle and/or its affiliates.
53+
Copyright (c) 2015, 2025, Oracle and/or its affiliates.
5454

5555
This software is dual-licensed to you under the Universal Permissive License
5656
(UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License

doc/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# node-oracledb Documentation for the Oracle Database Node.js Add-on
22

3-
*Copyright (c) 2015, 2024, Oracle and/or its affiliates.*
3+
*Copyright (c) 2015, 2025, Oracle and/or its affiliates.*
44

55
This software is dual-licensed to you under the Universal Permissive License
66
(UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License

doc/src/release_notes.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@ node-oracledb Release Notes
88
For deprecated and desupported features, see
99
:ref:`Deprecations and desupported features <deprecations>`.
1010

11+
node-oracledb `v6.8.0 <https://github.com/oracle/node-oracledb/compare/v6.7.1...v6.8.0>`__ (TBD)
12+
---------------------------------------------------------------------------------------------------------
13+
14+
Thin Mode Changes
15+
+++++++++++++++++
16+
17+
#) Fixed error message in ``NJS-131`` to provide the correct range of the
18+
database object collection types.
19+
20+
#) Fixed bug with :meth:`dbObject.deleteElement()` which did not update the
21+
keys of associative arrays when an element was deleted.
22+
1123
node-oracledb `v6.7.1 <https://github.com/oracle/node-oracledb/compare/v6.7.0...v6.7.1>`__ (23 Dec 2024)
1224
---------------------------------------------------------------------------------------------------------
1325

lib/errors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022, 2024, Oracle and/or its affiliates.
1+
// Copyright (c) 2022, 2025, Oracle and/or its affiliates.
22

33
//-----------------------------------------------------------------------------
44
//
@@ -416,7 +416,7 @@ messages.set(ERR_INVALID_OBJECT_TYPE_NAME, // NJS-129
416416
messages.set(ERR_TDS_TYPE_NOT_SUPPORTED, // NJS-130
417417
'Oracle TDS data type %d is not supported');
418418
messages.set(ERR_INVALID_COLL_INDEX_SET, // NJS-131
419-
'given index %d must be in the range of %d to %d');
419+
'given index [%d] must be in the range of [%d] to [%d]');
420420
messages.set(ERR_INVALID_COLL_INDEX_GET, // NJS-132
421421
'element at index %d does not exist');
422422
messages.set(ERR_DELETE_ELEMENTS_OF_VARRAY, // NJS-133

lib/thin/dbObject.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ class ThinDbObjectImpl extends DbObjectImpl {
429429
if (objType.maxNumElements > 0 &&
430430
this.unpackedArray.length >= objType.maxNumElements) {
431431
errors.throwErr(errors.ERR_INVALID_COLL_INDEX_SET,
432-
this.unpackedArray.length, 0, objType.maxNumElements);
432+
this.unpackedArray.length, 0, objType.maxNumElements - 1);
433433
}
434434
this.unpackedArray.push(value);
435435
} else {
@@ -459,7 +459,7 @@ class ThinDbObjectImpl extends DbObjectImpl {
459459
}
460460
this.unpackedArray.splice(index, 1);
461461
} else {
462-
this._unpackedAssocKeys = undefined;
462+
this.unpackedAssocKeys = undefined;
463463
this.unpackedAssocArray.delete(index);
464464
}
465465
}

test/dbObject20.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2019, 2024, Oracle and/or its affiliates. */
1+
/* Copyright (c) 2019, 2025, Oracle and/or its affiliates. */
22

33
/******************************************************************************
44
*
@@ -1243,6 +1243,8 @@ describe('290. dbObject20.js', () => {
12431243
assert.strictEqual(res.hasElement(12), false);
12441244
assert.deepStrictEqual(res.getKeys(), Object.keys(inDataobj).map(Number));
12451245
assert.deepStrictEqual(res.getValues(), Object.values(inDataobj).map(Number));
1246+
res.deleteElement(2);
1247+
assert.strictEqual(res.hasElement(2), false);
12461248
});
12471249
});
12481250

0 commit comments

Comments
 (0)