Skip to content

Commit

Permalink
Documentation and Test case updates
Browse files Browse the repository at this point in the history
  • Loading branch information
sharadraju committed Aug 30, 2023
1 parent 54f84a2 commit aa84aa0
Show file tree
Hide file tree
Showing 11 changed files with 558 additions and 95 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# node-oracledb version 6.1.0-dev

**This release is under development and information may be incomplete**
# node-oracledb version 6.1.0

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

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

Expand Down
38 changes: 28 additions & 10 deletions doc/src/api_manual/aq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,14 @@ AqQueue Properties

.. attribute:: aqQueue.payloadType

This read-only property is a number and is one of the
This read-only property is one of the
:ref:`oracledb.DB_TYPE_RAW <oracledbconstantsdbtype>` or
:ref:`oracledb.DB_TYPE_OBJECT <oracledbconstantsdbtype>` constants.
:ref:`oracledb.DB_TYPE_OBJECT <oracledbconstantsdbtype>`, or
:ref:`oracledb.DB_TYPE_JSON <oracledbconstantsdbtype>` constants.

.. versionchanged:: 6.1

Added ``oracledb.DB_TYPE_JSON`` constant.

.. attribute:: aqQueue.payloadTypeClass

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

Dequeued messages are returned as AqMessage objects. Note AqMessage
objects are not used for enqueuing.
Dequeued messages are returned as AqMessage objects.

.. _aqmessageclass:

Expand Down Expand Up @@ -283,11 +287,11 @@ AqQueue Methods

.. warning::

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

**Callback**:

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

The ``queue.enqMany()`` method returns an array of :ref:`AqMessage objects <aqmessageclass>`.

.. versionchanged:: 6.1

Previously, ``aqQueue.enqMany()`` did not return any value. Now, this
method returns an array of :ref:`AqMessage objects <aqmessageclass>`.

.. method:: aqQueue.enqOne()

**Promise**::
Expand Down Expand Up @@ -401,7 +412,7 @@ AqQueue Methods
- Number
- The number of seconds the message is available to be dequeued before it expires.
* - ``payload``
- String, Buffer, :ref:`DbObject <dbobjectclass>`
- String, Buffer, :ref:`DbObject <dbobjectclass>`, Object
- The actual message to be queued. This property must be specified.
* - ``priority``
- Integer
Expand Down Expand Up @@ -430,3 +441,10 @@ AqQueue Methods
- Description
* - Error ``error``
- If ``enqOne()`` succeeds, ``error`` is NULL. If an error occurs, then ``error`` contains the :ref:`error message <errorobj>`.

Enqueued messages are returned as :ref:`AqMessage objects <aqmessageclass>`.

.. versionchanged:: 6.1

Previously, ``aqQueue.enqOne()`` did not return any value. Now, this
method returns an :ref:`AqMessage object <aqmessageclass>`.
27 changes: 22 additions & 5 deletions doc/src/api_manual/connection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1411,16 +1411,32 @@ Connection Methods
:header-rows: 1
:class: wy-table-responsive
:align: center
:widths: 10 10 30
:widths: 10 30
:summary: The first column displays the attribute name. The second
column displays the description of the attribute.

* - Attribute Name
- Data Type
- Description
* - ``payloadType``
- String
- 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.
- - 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::

connection.getQueue(queueName)

will have RAW messages as the default ``payloadType`` setting.

Or you can also explicitly set this attribute to ``oracledb.DB_TYPE_RAW``. For example::

connection.getQueue(queueName, { payloadType: oracledb.DB_TYPE_RAW })
- For :ref:`JSON messages <aqjsonexample>`, set this attribute to ``oracledb.DB_TYPE_JSON``. For example::

connection.getQueue(queueName, { payloadType: oracledb.DB_TYPE_JSON })
- 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``::

connection.getQueue(queueName, {payloadType: "DEMOQUEUE.USER_ADDRESS_TYPE"});

.. versionchanged:: 6.1

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.

**Callback**:

Expand Down Expand Up @@ -2607,7 +2623,8 @@ Connection Methods

promise = unsubscribe(String name);

Unregisters a :ref:`Continuous Query Notification (CQN) <cqn>` subscription
Unregisters a :ref:`Continuous Query Notification (CQN) <cqn>` and
:ref:`Advanced Queuing Notification <aqnotifications>` subscription
previously created with :meth:`connection.subscribe()`.
No further notifications will be sent. The notification callback does
not receive a notification of the deregistration event.
Expand Down
Loading

0 comments on commit aa84aa0

Please sign in to comment.