Skip to content

Commit 6dfd36f

Browse files
committed
Documentation and test case updates for the new features
1 parent dc208c9 commit 6dfd36f

File tree

8 files changed

+85
-87
lines changed

8 files changed

+85
-87
lines changed

doc/src/api_manual/oracledb.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3162,9 +3162,9 @@ Oracledb Methods
31623162
* - Attribute
31633163
- Description
31643164
* - ``binaryDir``
3165-
- This specifies the directory that contains the node-oracledb Thick mode binary module.
3165+
- This directory is added to the start of the default search path used by :meth:`~oracledb.initOracleClient()` to load the node-oracledb Thick mode binary module.
31663166

3167-
If ``binaryDir`` is not specified, then :meth:`~oracledb.initOracleClient()` looks for the Thick mode binary in either the ``build/Release`` or ``build/Debug`` sub directories under the node-oracledb home directory.
3167+
The default search path includes ``node_modules/oracledb/build/Release`` and ``node_modules/oracledb/build/Debug``.
31683168

31693169
.. versionadded:: 6.2
31703170
* - ``configDir``

doc/src/release_notes.rst

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,45 +13,41 @@ node-oracledb `v6.2.0 <https://github.com/oracle/node-oracledb/compare/v6.1.0...
1313
Thin Mode Changes
1414
++++++++++++++++++
1515

16-
#) Ensure that the database port is passed as a number to the network connection.
16+
#) Ensure that the database port is passed as a number to the network connection.
1717
See `Issue #1600 <https://github.com/oracle/node-oracledb/issues/1600>`__
18-
and `PR #1601 <https://github.com/oracle/node-oracledb/pull/1601>`__.
19-
(Daniel Rodrigues)
18+
and `PR #1601 <https://github.com/oracle/node-oracledb/pull/1601>`__
19+
(Daniel Rodrigues).
2020

21-
#) Improved statement bind variable placeholder parser performance, handle
21+
#) Improved statement bind variable placeholder parser performance, handle
2222
statements which use the `Alternative Quoting Mechanism
2323
<https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-1824CBAA-6E16-4921-B2A6-112FB02248DA>`__
2424
('Q' strings), and fix some issues identifying bind variable placeholders
2525
in embedded quotes and in JSON syntax.
26-
See `Issue #1605 <https://github.com/oracle/node-oracledb/issues/1605>`__.
26+
`Issue #1605 <https://github.com/oracle/node-oracledb/issues/1605>`__.
2727

2828
Thick Mode Changes
2929
++++++++++++++++++
3030

31-
#) Implemented enhancement to support listIndexes() method to fetch all the
32-
current indexes from the SODA collection.
33-
34-
#) Fixed bug where a segmentation fault (segfault) occurred while populating
35-
object Collection having BLOB property. See
36-
`node-oracledb public Slack channel <https://node-oracledb.slack.com/
37-
archives/CCM8AMSF7/p1694544451676639>`__.
31+
#) Added new property :ref:`binaryDir <odbinitoracleclientattrsopts>` to the
32+
options passed to :meth:`~oracledb.initOracleClient()` which indicates the
33+
name of the directory that contains the node-oracledb :ref:`Thick mode
34+
<enablingthick>` binary module. `PR #1602
35+
<https://github.com/oracle/node-oracledb/pull/1602>`__ (Kwok Chun Man).
3836

39-
#) Added :meth:`sodaOperation.lock()` method on
40-
:ref:`SodaOperation <sodaoperationclass>` object to disable modification
41-
on any SODA document. An explicit commit or rollback is required to unlock
42-
and modify any corresponding SODA document.
37+
#) Fixed a segfault while populating a collection with a BLOB
38+
property. See `node-oracledb public Slack channel
39+
<https://node-oracledb.slack.com/ archives/CCM8AMSF7/p1694544451676639>`__.
4340

41+
#) Added ``listIndexes()`` method to fetch all the current indexes from
42+
a SODA collection.
4443

45-
#) Fixed bug that throws an 'ORA-21525' error with dbObjects having one or
46-
more 'Number' attributes of precision less than or equal to 18 and scale
47-
as 0.
48-
`Issue #1594 <https://github.com/oracle/node-oracledb/issues/1594>`__.
44+
#) Added :meth:`sodaOperation.lock()` method to disable modification of SODA
45+
documents by other connections.
4946

50-
#) Added new property :ref:`binaryDir <odbinitoracleclientattrsopts>` to the
51-
options passed to :meth:`~oracledb.initOracleClient()` which indicates the
52-
name of the directory that contains the node-oracledb Thick mode binary
53-
module.
54-
`PR #1602 <https://github.com/oracle/node-oracledb/pull/1602>`__. (Leman)
47+
#) Fixed bug causing an 'ORA-21525' error with :ref:`DbObject Class
48+
<dbobjectclass>` objects that have a NUMBER attribute with a scale of 0
49+
and precision less than, or equal, to 18. `Issue #1594
50+
<https://github.com/oracle/node-oracledb/issues/1594>`__.
5551

5652
node-oracledb `v6.1.0 <https://github.com/oracle/node-oracledb/compare/v6.0.3...v6.1.0>`__ (30 Aug 2023)
5753
--------------------------------------------------------------------------------------------------------

test/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ Set the following environment variables to provide credentials for the test suit
114114

115115
* `NODE_ORACLEDB_DRCP` provides an option for skipping test run when DRCP is enabled. Setting this environment variable to `true` will skip certain test case run due to DRCP restrictions.
116116

117+
* `NODE_ORACLEDB_WALLET_LOCATION` provides the local directory name for the wallets that may be required for mutual TLS (mTLS) connections, especially to Oracle Cloud Autonomous Databases optionally. The wallet location can also be provided as a part of the database connect string.
118+
119+
* `NODE_ORACLEDB_WALLET_PASSWORD` provides the password for the wallets that may be required for mutual TLS (mTLS) connections, especially to Oracle Cloud Autonomous Databases.
120+
117121
Note: the test suite requires the schema to have these privileges: CREATE TABLE, CREATE SESSION,
118122
CREATE PROCEDURE, CREATE SEQUENCE, CREATE TRIGGER, and CREATE TYPE.
119123

test/jsonDualityViews4.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ describe('275. jsonDualityView4.js', function() {
702702
FROM student_ov s
703703
`);
704704

705-
assert.strictEqual(result.rows[0][0].A1, 1);
705+
assert.strictEqual(result.rows[0][0].a1, 1);
706706
await connection.execute('DROP TABLE a PURGE');
707707
});
708708
});

test/jsonDualityViews6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ describe('277. jsonDualityView6.js', function() {
406406

407407
const result = await connection.execute(`select * from student_ov`);
408408
assert.strictEqual(result.rows.length, 3);
409-
assert.deepEqual(result.rows[0][0]._id, {"STUID":1});
409+
assert.deepEqual(result.rows[0][0]._id, {"stuid":1});
410410
assert.strictEqual(result.rows[0][0].StudentName, "Ajit");
411411
assert.deepEqual(result.rows[0][0].StudentClass, [{"StudentClassId":1, "StudentId":1,
412412
"Class":[{"ClassId":1, "Name":"CS101"}]}]);

test/list.txt

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5513,34 +5513,34 @@ oracledb.OUT_FORMAT_OBJECT and resultSet = true
55135513
287. sodaOperationsLock.js
55145514
287.1 lock on sodaOperations
55155515

5516-
286. embedded_oid.js
5517-
286.1 Test embedded oid normal operations
5518-
286.1.1 create collection with No key present in the input doc
5519-
286.1.2 Embedded varchar key already present doc
5520-
286.1.3 Embedded number key already present in the doc
5521-
286.1.4 test replaceOne, for each replace op, use previously retrieved key
5522-
286.1.5 test replaceOne, A new string ID is present in the target document
5523-
286.1.6 test replaceOne, A new integer ID is present in the target document
5524-
286.1.7 test replaceOneAndGet, for each replace op, use previously retrieved key
5525-
286.1.8 test replaceOneAndGet, A new string ID is present in the target document
5526-
286.1.9 test replaceOneAndGet, A new integer ID is present in the target document
5527-
286.1.10 Negative test for save()
5528-
286.1.11 Negative test for saveAndGet()
5529-
286.2 Test QBEs - filter, skip and limit
5530-
286.2.1 filter()
5531-
286.2.2 skip() first doc
5532-
286.2.3 limit() operation to 1 doc
5533-
286.2.4 remove() previously retrieved key
5534-
286.2.5 remove() with filter, No key present in the input doc
5535-
5536-
288. sqlParser.js
5537-
288.1 parse SQL containing json_object()
5538-
288.2 bind variables between quoted string
5539-
288.3 single line comment
5540-
288.4 constant string
5541-
288.5 multiple division operation
5542-
288.6 SQL statement starting with parentheses
5543-
288.7 statement containing simple strings
5544-
288.8 binds between comments
5545-
288.9 non-ascii character in the bind name
5546-
288.10 apostrophe in single line comment
5516+
288. embedded_oid.js
5517+
288.1 Test embedded oid normal operations
5518+
288.1.1 create collection with No key present in the input doc
5519+
288.1.2 Embedded varchar key already present doc
5520+
288.1.3 Embedded number key already present in the doc
5521+
288.1.4 test replaceOne, for each replace op, use previously retrieved key
5522+
288.1.5 test replaceOne, A new string ID is present in the target document
5523+
288.1.6 test replaceOne, A new integer ID is present in the target document
5524+
288.1.7 test replaceOneAndGet, for each replace op, use previously retrieved key
5525+
288.1.8 test replaceOneAndGet, A new string ID is present in the target document
5526+
288.1.9 test replaceOneAndGet, A new integer ID is present in the target document
5527+
288.1.10 Negative test for save()
5528+
288.1.11 Negative test for saveAndGet()
5529+
288.2 Test QBEs - filter, skip and limit
5530+
288.2.1 filter()
5531+
288.2.2 skip() first doc
5532+
288.2.3 limit() operation to 1 doc
5533+
288.2.4 remove() previously retrieved key
5534+
288.2.5 remove() with filter, No key present in the input doc
5535+
5536+
289. sqlParser.js
5537+
289.1 parse SQL containing json_object()
5538+
289.2 bind variables between quoted string
5539+
289.3 single line comment
5540+
289.4 constant string
5541+
289.5 multiple division operation
5542+
289.6 SQL statement starting with parentheses
5543+
289.7 statement containing simple strings
5544+
289.8 binds between comments
5545+
289.9 non-ascii character in the bind name
5546+
289.10 apostrophe in single line comment

test/sodaOpLock.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
'use strict';
3333

3434
const oracledb = require('oracledb');
35-
const assert = require('assert');
3635
const dbConfig = require('./dbconfig.js');
3736
const sodaUtil = require('./sodaUtil.js');
3837
const testsUtil = require('./testsUtil.js');
@@ -74,9 +73,8 @@ describe('287. sodaOperationsLock.js', () => {
7473
}
7574
});
7675

77-
it('287.1 lock on sodaOperations', async() => {
78-
coll.find().lock();
76+
it('287.1 lock on sodaOperations', () => {
77+
coll.find().lock();
7978
});
80-
8179

8280
});

test/sqlParser.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* limitations under the License.
2424
*
2525
* NAME
26-
* 288. sqlParser.js
26+
* 289. sqlParser.js
2727
*
2828
* DESCRIPTION
2929
* This test verifies the SQL Parser written for the thin mode
@@ -35,7 +35,7 @@ const oracledb = require('oracledb');
3535
const assert = require('assert');
3636
const dbConfig = require('./dbconfig.js');
3737

38-
describe('288. sqlParser.js', function() {
38+
describe('289. sqlParser.js', function() {
3939

4040
let conn;
4141
let isRunnable = false;
@@ -54,16 +54,16 @@ describe('288. sqlParser.js', function() {
5454
await conn.close();
5555
});
5656

57-
it('288.1 parse SQL containing json_object()', async function() {
57+
it('289.1 parse SQL containing json_object()', async function() {
5858
if (conn.oracleServerVersion < 2100000000) {
5959
this.skip();
6060
}
6161
const sql = `SELECT json_object('id':2),:bv1, json {'key': 2} FROM DUAL`;
6262
const info = await conn.getStatementInfo(sql);
6363
assert.deepStrictEqual(info.bindNames, ['BV1']);
64-
}); // 288.1
64+
}); // 289.1
6565

66-
it('288.2 bind variables between quoted string', async () => {
66+
it('289.2 bind variables between quoted string', async () => {
6767
const sql = `select
6868
:a,
6969
q'{This contains ' and " and : just fine}',
@@ -79,42 +79,42 @@ describe('288. sqlParser.js', function() {
7979
from dual`;
8080
const info = await conn.getStatementInfo(sql);
8181
assert.deepStrictEqual(info.bindNames, ["A", "B", "C", "D", "E", "F"]);
82-
}); // 288.2
82+
}); // 289.2
8383

84-
it('288.3 single line comment', async () => {
84+
it('289.3 single line comment', async () => {
8585
const sql = `--begin :value2 := :a + :b + :c +:a +3; end;
8686
begin :value2 := :a + :c +3; end;`;
8787
const info = await conn.getStatementInfo(sql);
8888
assert.deepStrictEqual(info.bindNames, ["VALUE2", "A", "C"]);
89-
}); // 288.3
89+
}); // 289.3
9090

91-
it('288.4 constant string', async () => {
91+
it('289.4 constant string', async () => {
9292
const sql = `begin
9393
:value := to_date('20021231 12:31:00', :format);
9494
end;`;
9595
const info = await conn.getStatementInfo(sql);
9696
assert.deepStrictEqual(info.bindNames, ["VALUE", "FORMAT"]);
97-
}); // 288.4
97+
}); // 289.4
9898

99-
it('288.5 multiple division operation', async () => {
99+
it('289.5 multiple division operation', async () => {
100100
const sql = `select :a / :b, :c / :d from dual`;
101101
const info = await conn.getStatementInfo(sql);
102102
assert.deepStrictEqual(info.bindNames, ["A", "B", "C", "D"]);
103-
}); // 288.5
103+
}); // 289.5
104104

105-
it('288.6 SQL statement starting with parentheses', async () => {
105+
it('289.6 SQL statement starting with parentheses', async () => {
106106
const sql = `(select :a from dual) union (select :b from dual)`;
107107
const info = await conn.getStatementInfo(sql);
108108
assert.deepStrictEqual(info.bindNames, ["A", "B"]);
109-
}); // 288.6
109+
}); // 289.6
110110

111-
it('288.7 statement containing simple strings', async () => {
111+
it('289.7 statement containing simple strings', async () => {
112112
const sql = `select '"string_1"', :bind_1, ':string_2' from dual`;
113113
const info = await conn.getStatementInfo(sql);
114114
assert.deepStrictEqual(info.bindNames, ["BIND_1"]);
115-
}); // 288.7
115+
}); // 289.7
116116

117-
it('288.8 binds between comments', async () => {
117+
it('289.8 binds between comments', async () => {
118118
const sql = `select
119119
/* comment 1 with /* */
120120
:a,
@@ -125,21 +125,21 @@ describe('288. sqlParser.js', function() {
125125
from dual`;
126126
const info = await conn.getStatementInfo(sql);
127127
assert.deepStrictEqual(info.bindNames, ["A", "B", "C"]);
128-
}); // 288.8
128+
}); // 289.8
129129

130-
it('288.9 non-ascii character in the bind name', async () => {
130+
it('289.9 non-ascii character in the bind name', async () => {
131131
const sql = `select :méil$ from dual`;
132132
const info = await conn.getStatementInfo(sql);
133133
assert.deepStrictEqual(info.bindNames, ["MÉIL$"]);
134-
}); // 288.9
134+
}); // 289.9
135135

136-
// gh issue 1605
136+
// GitHub issue 1605
137137
// https://github.com/oracle/node-oracledb/issues/1605
138-
it('288.10 apostrophe in single line comment', async () => {
138+
it('289.10 apostrophe in single line comment', async () => {
139139
const sql = `
140140
-- Example with ' in comment
141141
SELECT :test, 'String' FROM DUAL`;
142142
const info = await conn.getStatementInfo(sql);
143143
assert.deepStrictEqual(info.bindNames, ['TEST']);
144-
}); // 288.10
144+
}); // 289.10
145145
});

0 commit comments

Comments
 (0)