Skip to content

Commit fe3ed66

Browse files
Documentation improvements.
1 parent 2754a7e commit fe3ed66

File tree

8 files changed

+146
-107
lines changed

8 files changed

+146
-107
lines changed

doc/src/api_manual/async_connection.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,12 +556,50 @@ AsyncConnection Attributes
556556
requested python-oracledb size and the maximum size allowed by the database
557557
network configuration.
558558

559+
.. attribute:: AsyncConnection.serial_num
560+
561+
This read-only attribute specifies the session serial number associated with
562+
the connection. It is the same value returned by the SQL
563+
``SELECT SERIAL# FROM V$SESSION``. It is available only in python-oracledb
564+
Thin mode.
565+
566+
.. versionadded:: 2.5.0
567+
568+
.. note::
569+
570+
This attribute is an extension to the DB API definition.
571+
572+
For applications using :ref:`drcp`, the ``serial_num`` attribute may
573+
not contain the current session state until a round-trip is made to the
574+
database after acquiring a session. It is recommended to not use this
575+
attribute if your application uses DRCP but may not perform a
576+
round-trip.
577+
559578
.. attribute:: AsyncConnection.service_name
560579

561580
This read-only attribute specifies the Oracle Database service name
562581
associated with the connection. This is the same value returned by the SQL
563582
``SELECT SYS_CONTEXT('USERENV', 'SERVICE_NAME') FROM DUAL``.
564583

584+
.. attribute:: AsyncConnection.session_id
585+
586+
This read-only attribute specifies the session identifier associated with
587+
the connection. It is the same value returned by the SQL
588+
``SELECT SID FROM V$SESSION``. It is available only in python-oracledb
589+
Thin mode.
590+
591+
.. versionadded:: 2.5.0
592+
593+
.. note::
594+
595+
This attribute is an extension to the DB API definition.
596+
597+
For applications using :ref:`drcp`, the ``session_id`` attribute may
598+
not contain the current session state until a round-trip is made to the
599+
database after acquiring a session. It is recommended to not use this
600+
attribute if your application uses DRCP but may not perform a
601+
round-trip.
602+
565603
.. attribute:: AsyncConnection.stmtcachesize
566604

567605
This read-write attribute specifies the size of the statement cache. This

doc/src/api_manual/async_connection_pool.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ AsyncConnectionPool Methods
3232
be raised.
3333

3434
The ``cclass`` parameter, if specified, should be a string corresponding to
35-
the connection class for Database Resident Connection Pooling (DRCP).
35+
the connection class for :ref:`drcp`.
3636

3737
The ``purity`` parameter is expected to be one of
3838
:data:`~oracledb.PURITY_NEW`, :data:`~oracledb.PURITY_SELF`, or

doc/src/api_manual/connect_params.rst

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ ConnectParams Attributes
105105
.. attribute:: ConnectParams.cclass
106106

107107
This read-only attribute is a string that specifies the connection class
108-
to use for Database Resident Connection Pooling (DRCP).
108+
to use for :ref:`drcp`.
109109

110110
This attribute is supported in both python-oracledb Thin and Thick modes.
111111

@@ -270,14 +270,14 @@ ConnectParams Attributes
270270

271271
.. attribute:: ConnectParams.pool_boundary
272272

273-
This read-only attribute is one of the strings "statement" or
274-
"transaction" which indicates when pooled DRCP or PRCP connections can be
275-
returned to the pool. If the value is "statement", then pooled DRCP or
276-
PRCP connections are implicitly released back to the DRCP or PRCP pool
277-
when the connection is stateless (that is, there are no active cursors,
278-
active transactions, temporary tables, or temporary LOBs). If the value is
279-
"transaction", then pooled DRCP or PRCP connections are implicitly
280-
released back to the DRCP or PRCP pool when either one of the methods
273+
This read-only attribute is one of the strings "statement" or "transaction"
274+
which indicates when pooled :ref:`DRCP <drcp>` or PRCP connections can be
275+
returned to the pool. If the value is "statement", then pooled DRCP or PRCP
276+
connections are implicitly released back to the DRCP or PRCP pool when the
277+
connection is stateless (that is, there are no active cursors, active
278+
transactions, temporary tables, or temporary LOBs). If the value is
279+
"transaction", then pooled DRCP or PRCP connections are implicitly released
280+
back to the DRCP or PRCP pool when either one of the methods
281281
:meth:`Connection.commit()` or :meth:`Connection.rollback()` are called.
282282
This attribute requires the use of DRCP or PRCP with Oracle Database 23ai
283283
(or later). See :ref:`implicitconnpool` for more information.
@@ -325,10 +325,11 @@ ConnectParams Attributes
325325
.. attribute:: ConnectParams.purity
326326

327327
This read-only attribute is an integer that returns the purity used for
328-
DRCP. When the value of this attribute is :attr:`oracledb.PURITY_DEFAULT`,
329-
then any standalone connection will use :attr:`oracledb.PURITY_NEW` and any
330-
pooled connection will use :attr:`oracledb.PURITY_SELF`. The default value
331-
is :data:`~oracledb.PURITY_DEFAULT`.
328+
:ref:`drcp`. When the value of this attribute is
329+
:attr:`oracledb.PURITY_DEFAULT`, then any standalone connection will use
330+
:attr:`oracledb.PURITY_NEW` and any pooled connection will use
331+
:attr:`oracledb.PURITY_SELF`. The default value is
332+
:data:`~oracledb.PURITY_DEFAULT`.
332333

333334
This attribute is supported in both python-oracledb Thin and Thick modes.
334335

doc/src/api_manual/connection.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -838,11 +838,11 @@ Connection Attributes
838838

839839
This attribute is an extension to the DB API definition.
840840

841-
For applications using Database Resident Connection Pooling (DRCP),
842-
the ``serial_num`` attribute may not contain the current session state
843-
until a round-trip is made to the database after acquiring a session.
844-
It is recommended to not use this attribute if your application uses
845-
DRCP but may not perform a round-trip.
841+
For applications using :ref:`drcp`, the ``serial_num`` attribute may
842+
not contain the current session state until a round-trip is made to the
843+
database after acquiring a session. It is recommended to not use this
844+
attribute if your application uses DRCP but may not perform a
845+
round-trip.
846846

847847
.. attribute:: Connection.service_name
848848

@@ -869,11 +869,11 @@ Connection Attributes
869869

870870
This attribute is an extension to the DB API definition.
871871

872-
For applications using Database Resident Connection Pooling (DRCP),
873-
the ``session_id`` attribute may not contain the current session state
874-
until a round-trip is made to the database after acquiring a session.
875-
It is recommended to not use this attribute if your application uses
876-
DRCP but may not perform a round-trip.
872+
For applications using :ref:`drcp`, the ``session_id`` attribute may
873+
not contain the current session state until a round-trip is made to the
874+
database after acquiring a session. It is recommended to not use this
875+
attribute if your application uses DRCP but may not perform a
876+
round-trip.
877877

878878
.. attribute:: Connection.stmtcachesize
879879

doc/src/api_manual/connection_pool.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ ConnectionPool Methods
5656
be raised.
5757

5858
The ``cclass`` parameter, if specified, should be a string corresponding to
59-
the connection class for Database Resident Connection Pooling (DRCP).
59+
the connection class for :ref:`drcp`.
6060

6161
The ``purity`` parameter is expected to be one of
6262
:data:`~oracledb.PURITY_NEW`, :data:`~oracledb.PURITY_SELF`, or

0 commit comments

Comments
 (0)