Skip to content

Commit aa84aa0

Browse files
committed
Documentation and Test case updates
1 parent 54f84a2 commit aa84aa0

File tree

11 files changed

+558
-95
lines changed

11 files changed

+558
-95
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
# node-oracledb version 6.1.0-dev
2-
3-
**This release is under development and information may be incomplete**
1+
# node-oracledb version 6.1.0
42

53
The node-oracledb add-on for Node.js powers high performance Oracle Database
64
applications. Applications can be written in TypeScript, or directly in
75
JavaScript.
86

9-
Use node-oracledb 6.1.0-dev to connect Node.js 14.6, or later, to Oracle
7+
Use node-oracledb 6.1.0 to connect Node.js 14.6, or later, to Oracle
108
Database. Older versions of node-oracledb may work with older versions of
119
Node.js.
1210

doc/src/api_manual/aq.rst

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,14 @@ AqQueue Properties
119119

120120
.. attribute:: aqQueue.payloadType
121121

122-
This read-only property is a number and is one of the
122+
This read-only property is one of the
123123
:ref:`oracledb.DB_TYPE_RAW <oracledbconstantsdbtype>` or
124-
:ref:`oracledb.DB_TYPE_OBJECT <oracledbconstantsdbtype>` constants.
124+
:ref:`oracledb.DB_TYPE_OBJECT <oracledbconstantsdbtype>`, or
125+
:ref:`oracledb.DB_TYPE_JSON <oracledbconstantsdbtype>` constants.
126+
127+
.. versionchanged:: 6.1
128+
129+
Added ``oracledb.DB_TYPE_JSON`` constant.
125130

126131
.. attribute:: aqQueue.payloadTypeClass
127132

@@ -231,8 +236,7 @@ AqQueue Methods
231236
* - AqMessage ``message``
232237
- The message that is dequeued. See :ref:`AqMessage Class <aqmessageclass>`.
233238

234-
Dequeued messages are returned as AqMessage objects. Note AqMessage
235-
objects are not used for enqueuing.
239+
Dequeued messages are returned as AqMessage objects.
236240

237241
.. _aqmessageclass:
238242

@@ -283,11 +287,11 @@ AqQueue Methods
283287

284288
.. warning::
285289

286-
Calling ``enqMany()`` in parallel on different connections
287-
acquired from the same pool may fail due to Oracle bug 29928074. Ensure
288-
that ``enqMany()`` is not run in parallel, use :ref:`standalone
289-
connections <connectionhandling>`, or make multiple calls to
290-
``enqOne()``. The ``deqMany()`` method is not affected.
290+
Calling ``enqMany()`` in parallel on different connections acquired from
291+
the same pool may cause a problem with older versions of Oracle (see
292+
Oracle bug 29928074). Ensure that ``enqMany()`` is not run in parallel.
293+
Instead, use :ref:`standalone connections <connectionhandling>` or make
294+
multiple calls to ``enqOne()``. The ``deqMany()`` method is not affected.
291295

292296
**Callback**:
293297

@@ -330,6 +334,13 @@ AqQueue Methods
330334
* - Error ``error``
331335
- If ``enqMany()`` succeeds, ``error`` is NULL. If an error occurs, then ``error`` contains the :ref:`error message <errorobj>`.
332336

337+
The ``queue.enqMany()`` method returns an array of :ref:`AqMessage objects <aqmessageclass>`.
338+
339+
.. versionchanged:: 6.1
340+
341+
Previously, ``aqQueue.enqMany()`` did not return any value. Now, this
342+
method returns an array of :ref:`AqMessage objects <aqmessageclass>`.
343+
333344
.. method:: aqQueue.enqOne()
334345

335346
**Promise**::
@@ -401,7 +412,7 @@ AqQueue Methods
401412
- Number
402413
- The number of seconds the message is available to be dequeued before it expires.
403414
* - ``payload``
404-
- String, Buffer, :ref:`DbObject <dbobjectclass>`
415+
- String, Buffer, :ref:`DbObject <dbobjectclass>`, Object
405416
- The actual message to be queued. This property must be specified.
406417
* - ``priority``
407418
- Integer
@@ -430,3 +441,10 @@ AqQueue Methods
430441
- Description
431442
* - Error ``error``
432443
- If ``enqOne()`` succeeds, ``error`` is NULL. If an error occurs, then ``error`` contains the :ref:`error message <errorobj>`.
444+
445+
Enqueued messages are returned as :ref:`AqMessage objects <aqmessageclass>`.
446+
447+
.. versionchanged:: 6.1
448+
449+
Previously, ``aqQueue.enqOne()`` did not return any value. Now, this
450+
method returns an :ref:`AqMessage object <aqmessageclass>`.

doc/src/api_manual/connection.rst

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,16 +1411,32 @@ Connection Methods
14111411
:header-rows: 1
14121412
:class: wy-table-responsive
14131413
:align: center
1414-
:widths: 10 10 30
1414+
:widths: 10 30
14151415
:summary: The first column displays the attribute name. The second
14161416
column displays the description of the attribute.
14171417

14181418
* - Attribute Name
1419-
- Data Type
14201419
- Description
14211420
* - ``payloadType``
1422-
- String
1423-
- Contains the name of an Oracle Database object type, or a :ref:`DbObject Class <dbobjectclass>` earlier acquired from :meth:`connection.getDbObjectClass()`. If the name of an object type is used, it is recommended that a fully qualified name be used.
1421+
- - For :ref:`simple string or stream of bytes (RAW) messages <aqrawexample>`, it is not necessary to explicitly specify this attribute. This is the default setting for the payload type. For example::
1422+
1423+
connection.getQueue(queueName)
1424+
1425+
will have RAW messages as the default ``payloadType`` setting.
1426+
1427+
Or you can also explicitly set this attribute to ``oracledb.DB_TYPE_RAW``. For example::
1428+
1429+
connection.getQueue(queueName, { payloadType: oracledb.DB_TYPE_RAW })
1430+
- For :ref:`JSON messages <aqjsonexample>`, set this attribute to ``oracledb.DB_TYPE_JSON``. For example::
1431+
1432+
connection.getQueue(queueName, { payloadType: oracledb.DB_TYPE_JSON })
1433+
- For :ref:`Database object messages <aqobjexample>`, set this attribute to the name of an Oracle Database object type, or a :ref:`DbObject Class <dbobjectclass>` earlier acquired from :meth:`connection.getDbObjectClass()`. If the name of an object type is used, it is recommended that a fully qualified name be used. For example, if the Oracle Database object type name is ``DEMOQUEUE.USER_ADDRESS_TYPE``::
1434+
1435+
connection.getQueue(queueName, {payloadType: "DEMOQUEUE.USER_ADDRESS_TYPE"});
1436+
1437+
.. versionchanged:: 6.1
1438+
1439+
Previously, the default value was RAW and you did not have to set this attribute for RAW messages. Also, only the name of an Oracle Database object type, or a :ref:`DbObject Class <dbobjectclass>` could be specified in the this attribute. Now, you can also explicitly specify ``oracledb.DB_TYPE_RAW`` for RAW messages and ``oracledb.DB_TYPE_JSON`` for JSON messages in this attribute.
14241440

14251441
**Callback**:
14261442

@@ -2607,7 +2623,8 @@ Connection Methods
26072623

26082624
promise = unsubscribe(String name);
26092625

2610-
Unregisters a :ref:`Continuous Query Notification (CQN) <cqn>` subscription
2626+
Unregisters a :ref:`Continuous Query Notification (CQN) <cqn>` and
2627+
:ref:`Advanced Queuing Notification <aqnotifications>` subscription
26112628
previously created with :meth:`connection.subscribe()`.
26122629
No further notifications will be sent. The notification callback does
26132630
not receive a notification of the deregistration event.

0 commit comments

Comments
 (0)