You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
: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.
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
+
450
549
.. method:: connection.break()
451
550
452
551
**Promise**::
@@ -1179,6 +1278,21 @@ Connection Methods
1179
1278
Determines whether query results, :ref:`Implicit Results <implicitresults>`, and :ref:`nested cursors <nestedcursors>` should be returned as :ref:`ResultSet <resultsetclass>` objects or directly.
1180
1279
1181
1280
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
1182
1296
1183
1297
**Callback**:
1184
1298
@@ -1479,6 +1593,21 @@ Connection Methods
1479
1593
.. versionadded:: 5.3
1480
1594
1481
1595
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.
: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.
Copy file name to clipboardExpand all lines: doc/src/api_manual/oracledb.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2809,7 +2809,7 @@ Oracledb Methods
2809
2809
2810
2810
With Simple Authentication, the configuration parameters can be provided at runtime.
2811
2811
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.
2813
2813
2814
2814
See `OCI SDK Authentication Methods <https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdk_authentication_methods.htm>`__ for more information.
0 commit comments