Skip to content

Commit 48f07cb

Browse files
committed
Prepare for 6.9 release with documentation and test updates
1 parent d4e770e commit 48f07cb

File tree

10 files changed

+894
-165
lines changed

10 files changed

+894
-165
lines changed

doc/src/api_manual/connection.rst

Lines changed: 269 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,105 @@ The properties of a *Connection* object are listed below.
447447
Connection Methods
448448
==================
449449

450+
.. method:: connection.beginSessionlessTransaction()
451+
452+
.. versionadded:: 6.9
453+
454+
**Promise**::
455+
456+
promise = beginSessionlessTransaction(Object options);
457+
458+
Begins a new sessionless transaction using the specified transaction
459+
identifier. This method returns the transaction identifier specified by
460+
the user or generated by node-oracledb as a Buffer value.
461+
462+
See :ref:`sessionlesstxns` for more information.
463+
464+
The parameters of the ``connection.beginSessionlessTransaction()`` method are:
465+
466+
.. _beginsessionlesstxn:
467+
468+
.. list-table-with-summary:: connection.beginSessionlessTransaction() Parameters
469+
:header-rows: 1
470+
:class: wy-table-responsive
471+
:align: center
472+
:widths: 10 10 30
473+
:summary: The first column displays the name of the parameter. The
474+
second column displays the data type of the parameter. The third
475+
column displays the description of the parameter.
476+
477+
* - Parameter
478+
- Data Type
479+
- Description
480+
* - ``options``
481+
- Object
482+
- This is an optional parameter to ``beginSessionlessTransaction()``
483+
that may be used to start a sessionless transaction. See
484+
:ref:`beginSessionlessTransaction() options Parameter Properties
485+
<begintxnoptionsparams>` for detailed information on its
486+
properties.
487+
488+
**beginSessionlessTransaction(): Options Parameter Properties**
489+
490+
The properties of the ``options`` parameter are:
491+
492+
.. _begintxnoptionsparams:
493+
494+
.. list-table-with-summary:: beginSessionlessTransaction(): ``options`` Parameter Properties
495+
:header-rows: 1
496+
:class: wy-table-responsive
497+
:align: center
498+
:widths: 10 10 30
499+
:summary: The first column displays the name of the parameter. The
500+
second column displays the data type of the parameter. The third
501+
column displays the description of the parameter.
502+
503+
* - Parameter
504+
- Data Type
505+
- Description
506+
* - ``transactionId``
507+
- String or Buffer
508+
- A unique identifier for the sessionless transaction.
509+
510+
If the value is *undefined*, that is, no value is specified, node-oracledb generates a random `universally-unique identifier (UUID) <https://www.rfc-editor.org/rfc/rfc4122.txt>`__ value when :meth:`connection.beginSessionlessTransaction()` is called. An example is "36b8f84d-df4e-4d49-b662-bcde71a8764f". The user-chosen value cannot exceed 64 bytes in length.
511+
* - ``timeout``
512+
- Number
513+
- The number of seconds before which this transaction can be resumed by a connection the next time that it is suspended.
514+
515+
If a transaction is not resumed within this specified duration, the transaction will be rolled back.
516+
517+
The default value is *60* seconds.
518+
* - ``deferRoundTrip``
519+
- Boolean
520+
- Determines whether the request to start a transaction is to be sent immediately or with the next database operation.
521+
522+
When this property is set to *false*, the request to start a transaction is sent immediately. If set to *true*, the request is included with the next database operation on the connection.
523+
524+
The default value is *false*.
525+
526+
**Callback**:
527+
528+
If you are using the callback programming style::
529+
530+
beginSessionlessTransaction(Object options, function(Error error){});
531+
532+
See :ref:`beginsessionlesstxn` for information on the ``options`` parameter.
533+
534+
The parameters of the callback function ``function(Error error)`` are:
535+
536+
.. list-table-with-summary::
537+
:header-rows: 1
538+
:class: wy-table-responsive
539+
:align: center
540+
:widths: 15 30
541+
:summary: The first column displays the callback function parameter.
542+
The second column displays the description of the parameter.
543+
544+
* - Callback Function Parameter
545+
- Description
546+
* - Error ``error``
547+
- If ``beginSessionlessTransaction()`` succeeds, ``error`` is NULL. If an error occurs, then ``error`` contains the :ref:`error message <errorobj>`.
548+
450549
.. method:: connection.break()
451550

452551
**Promise**::
@@ -1179,6 +1278,21 @@ Connection Methods
11791278
Determines whether query results, :ref:`Implicit Results <implicitresults>`, and :ref:`nested cursors <nestedcursors>` should be returned as :ref:`ResultSet <resultsetclass>` objects or directly.
11801279

11811280
The default is *false*.
1281+
* - ``suspendOnSuccess``
1282+
- Boolean
1283+
- .. _propexecsuspendonsuccess:
1284+
1285+
Determines whether an active sessionless transaction should be suspended when ``execute()`` completes successfully. This property is only applicable for sessionless transactions.
1286+
1287+
Setting this property to *true*, suspends an active sessionless transaction after successful execution of ``execute()``. If set to *false*, the sessionless transaction will not be suspended.
1288+
1289+
The default value is *false*.
1290+
1291+
When this property is used with transactions that are not sessionless, an error will be thrown.
1292+
1293+
See :ref:`sessionlesstxns`.
1294+
1295+
.. versionadded:: 6.9
11821296

11831297
**Callback**:
11841298

@@ -1479,6 +1593,21 @@ Connection Methods
14791593
.. versionadded:: 5.3
14801594

14811595
In earlier versions, statements were always added to the statement cache, if caching was enabled.
1596+
* - ``suspendOnSuccess``
1597+
- Boolean
1598+
- .. _executemanyoptsuspendonsuccess:
1599+
1600+
Determines whether an active sessionless transaction should be suspended when ``executeMany()`` completes successfully. This property is only applicable for sessionless transactions.
1601+
1602+
Setting this property to *true*, suspends an active sessionless transaction after successful execution of ``executeMany()``. If set to *false*, the sessionless transaction will not be suspended.
1603+
1604+
The default value is *false*.
1605+
1606+
When this property is used with transactions that are not sessionless, an error will be thrown.
1607+
1608+
See :ref:`sessionlesstxns`.
1609+
1610+
.. versionadded:: 6.9
14821611

14831612
**executeMany(): bindDefs Object Properties**
14841613

@@ -1992,6 +2121,107 @@ Connection Methods
19922121

19932122
See :meth:`~connection.execute()`.
19942123

2124+
.. method:: connection.resumeSessionlessTransaction()
2125+
2126+
.. versionadded:: 6.9
2127+
2128+
**Promise**::
2129+
2130+
promise = resumeSessionlessTransaction(Buffer transactionId, Objects options);
2131+
2132+
Resumes an existing sessionless transaction using the specified
2133+
transaction identifier. This method returns the transaction identifier
2134+
used to resume the sessionless transaction as a Buffer value.
2135+
2136+
See :ref:`sessionlesstxns`.
2137+
2138+
The parameters of the ``connection.resumeSessionlessTransaction()`` method are:
2139+
2140+
.. _resumesessionlesstxn:
2141+
2142+
.. list-table-with-summary:: connection.resumeSessionlessTransaction() Parameters
2143+
:header-rows: 1
2144+
:class: wy-table-responsive
2145+
:align: center
2146+
:widths: 10 10 30
2147+
:summary: The first column displays the name of the parameter. The
2148+
second column displays the data type of the parameter. The third
2149+
column displays the description of the parameter.
2150+
2151+
* - Parameter
2152+
- Data Type
2153+
- Description
2154+
* - ``transactionId``
2155+
- Buffer
2156+
- The unique identifier of an existing sessionless transaction that is to be resumed.
2157+
* - ``options``
2158+
- Object
2159+
- This is a parameter that may be used to resume a sessionless
2160+
transaction. See :ref:`resumeSessionlessTransaction() options
2161+
Parameter Properties <resumetxnoptionsparams>` for detailed
2162+
information on its properties.
2163+
2164+
.. _resumetxnoptionsparams:
2165+
2166+
.. list-table-with-summary:: resumeSessionlessTransaction(): ``options`` Parameter Properties
2167+
:header-rows: 1
2168+
:class: wy-table-responsive
2169+
:align: center
2170+
:widths: 10 10 30
2171+
:summary: The first column displays the name of the parameter. The
2172+
second column displays the data type of the parameter. The third
2173+
column displays the description of the parameter.
2174+
2175+
* - Parameter
2176+
- Data Type
2177+
- Description
2178+
* - ``timeout``
2179+
- Number
2180+
- The number of seconds that the current connection waits to resume a transaction if another connection is using it.
2181+
2182+
This timeout is only effective when the transaction is in use by another connection. In this case, the current connection waits for the transaction to be suspended within this timeout period.
2183+
2184+
When ``deferRoundTrip`` is set to *false*, the wait happens in the ``resumeSessionlessTransaction()`` call itself, and the function blocks until the transaction becomes available or the timeout expires. When ``deferRoundTrip`` is set to *true*, the resume is deferred and the wait occurs at the time of the next database operation instead.
2185+
2186+
At the start of the wait period, if the transaction is not in use by any other connection, the resume happens immediately.
2187+
2188+
If the transaction remains in use by the other connection after the timeout period, the error `ORA-25351 <https://docs.oracle.com/en/error-help/db/ora-25351>`__ is raised. If another connection completes the transaction, the error `ORA-24756 <https://docs.oracle.com/en/error-help/db/ora-24756>`__ is raised. These error messages are only thrown for non-RAC instances.
2189+
2190+
For information on using Oracle RAC, see :ref:`Sessionless Transactions with Oracle RAC <sessionlesstxnswithrac>`.
2191+
2192+
The default value is *60* seconds.
2193+
* - ``deferRoundTrip``
2194+
- Boolean
2195+
- Determines whether the request to resume a transaction is to be sent immediately or with the next database operation.
2196+
2197+
When this property is set to *false*, the request to resume a transaction is sent immediately. If set to *true*, the request is included with the next database operation on the connection.
2198+
2199+
The default value is *false*.
2200+
2201+
**Callback**:
2202+
2203+
If you are using the callback programming style::
2204+
2205+
resumeSessionlessTransaction(Object options, function(Error error){});
2206+
2207+
See :ref:`resumesessionlesstxn` for information on the ``options``
2208+
parameter.
2209+
2210+
The parameters of the callback function ``function(Error error)`` are:
2211+
2212+
.. list-table-with-summary::
2213+
:header-rows: 1
2214+
:class: wy-table-responsive
2215+
:align: center
2216+
:widths: 15 30
2217+
:summary: The first column displays the callback function parameter.
2218+
The second column displays the description of the parameter.
2219+
2220+
* - Callback Function Parameter
2221+
- Description
2222+
* - Error ``error``
2223+
- If ``resumeSessionlessTransaction()`` succeeds, ``error`` is NULL. If an error occurs, then ``error`` contains the :ref:`error message <errorobj>`.
2224+
19952225
.. method:: connection.rollback()
19962226

19972227
**Promise**::
@@ -2349,6 +2579,45 @@ Connection Methods
23492579

23502580
.. versionadded:: 4.0
23512581

2582+
.. method:: connection.suspendSessionlessTransaction()
2583+
2584+
.. versionadded:: 6.9
2585+
2586+
**Promise**::
2587+
2588+
promise = suspendSessionlessTransaction();
2589+
2590+
Suspends the currently active sessionless transaction immediately.
2591+
2592+
This detaches the transaction from the connection, allowing it to be
2593+
resumed later with the transaction identifier that was specified when
2594+
creating the sessionless transaction. Also, the timeout value defined in
2595+
:meth:`Connection.beginSessionlessTransaction()` comes into effect and
2596+
determines how long the transaction can stay suspended.
2597+
2598+
See :ref:`sessionlesstxns`.
2599+
2600+
**Callback**:
2601+
2602+
If you are using the callback programming style::
2603+
2604+
suspendSessionlessTransaction(function(Error error){});
2605+
2606+
The parameter of the callback function is:
2607+
2608+
.. list-table-with-summary::
2609+
:header-rows: 1
2610+
:class: wy-table-responsive
2611+
:align: center
2612+
:widths: 15 30
2613+
:summary: The first column displays the callback function parameter.
2614+
The second column displays the description of the parameter.
2615+
2616+
* - Callback Function Parameter
2617+
- Description
2618+
* - Error ``error``
2619+
- If ``suspendSessionlessTransaction()`` succeeds, ``error`` is NULL. If an error occurs, then ``error`` contains the :ref:`error message <errorobj>`.
2620+
23522621
.. method:: connection.startup()
23532622

23542623
.. versionadded:: 5.0

doc/src/api_manual/oracledb.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2809,7 +2809,7 @@ Oracledb Methods
28092809

28102810
With Simple Authentication, the configuration parameters can be provided at runtime.
28112811

2812-
With Instance Principal Authentication, OCI compute instances can be authorized to access services on Oracle Cloud such as Oracle Autonomous Database. Node.js applications running on such a compute instance are automatically authenticated, eliminating the need to provide database user credentials. This authentication method will only work on compute instances where internal network endpoints are reachable. For more information on OCI compute instances, see `OCI Compute Instances <https://docs.oracle.com/en-us/iaas/compute-cloud-at-customer/topics/compute/compute-instances.htm>`__, `Creating a Compute Instance <https://docs.oracle.com/en-us/iaas/Content/Compute/Tasks/launchinginstance.htm>`__, and `Calling Services from a Compute Instance <https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm>`__.
2812+
With Instance Principal Authentication, OCI compute instances can be authorized to access services on Oracle Cloud such as Oracle Autonomous Database. Node-oracledb applications running on such a compute instance are automatically authenticated, eliminating the need to provide database user credentials. This authentication method will only work on compute instances where internal network endpoints are reachable. See :ref:`instanceprincipalauth` for more information.
28132813

28142814
See `OCI SDK Authentication Methods <https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdk_authentication_methods.htm>`__ for more information.
28152815
- Required

doc/src/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
# from the other)
4747
#
4848
# The short X.Y version.
49-
version = '6.8'
50-
release = '6.8.0'
49+
version = '6.9'
50+
release = '6.9.0'
5151

5252
# There are two options for replacing |today|: either, you set today to some
5353
# non-false value, then it is used:

doc/src/release_notes.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ node-oracledb `v6.9.0 <https://github.com/oracle/node-oracledb/compare/v6.8.0...
1919
Common Changes
2020
++++++++++++++
2121

22+
#) Added support for Oracle Database 23ai
23+
:ref:`Sessionless Transactions <sessionlesstxns>`.
24+
2225
#) Added support for :ref:`Transaction Guard <tg>` with the introduction of
2326
the :attr:`~connection.ltxid` property.
2427

@@ -40,6 +43,10 @@ Common Changes
4043
with external bundlers such as webpack and esbuild.
4144
See `Issue #1791 <https://github.com/oracle/node-oracledb/issues/1791>`__.
4245

46+
#) Added :meth:`oracledb.registerConfigurationProviderHook()` to register
47+
:ref:`centralized configuration provider <configproviderplugins>`
48+
extension modules.
49+
4350
#) Added support for
4451
:ref:`instance principal authentication <_create_pool_oci_properties>`
4552
in :ref:`native IAM token-based authentication <cloudnativeauthoci>`

doc/src/user_guide/appendix_a.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ node-oracledb Thin and Thick modes. For more details see :ref:`modediff`.
242242
* - Feature tracking
243243
- No
244244
- Yes
245+
* - Oracle Database 23ai Sessionless Transactions (see :ref:`sessionlesstxns`)
246+
- Yes
247+
- Yes
245248
* - Two-phase Commit (TPC) (see :ref:`twopc`)
246249
- Yes
247250
- Yes

0 commit comments

Comments
 (0)