Skip to content

Commit 3fcd580

Browse files
Doc tweaks.
1 parent 6c86663 commit 3fcd580

File tree

8 files changed

+151
-98
lines changed

8 files changed

+151
-98
lines changed

doc/src/api_manual/async_connection.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ AsyncConnection Methods
147147

148148
.. note::
149149

150-
The data frame support in python-oracledb 3.1 is a pre-release and may
150+
The data frame support in python-oracledb 3.2 is a pre-release and may
151151
change in a future version.
152152

153153
.. versionadded:: 3.0.0
@@ -175,7 +175,7 @@ AsyncConnection Methods
175175

176176
.. note::
177177

178-
The data frame support in python-oracledb 3.1 is a pre-release and may
178+
The data frame support in python-oracledb 3.2 is a pre-release and may
179179
change in a future version.
180180

181181
.. versionadded:: 3.0.0

doc/src/api_manual/connection.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Connection Methods
140140

141141
.. note::
142142

143-
The data frame support in python-oracledb 3.1 is a pre-release and may
143+
The data frame support in python-oracledb 3.2 is a pre-release and may
144144
change in a future version.
145145

146146
.. dbapimethodextension::
@@ -172,7 +172,7 @@ Connection Methods
172172

173173
.. note::
174174

175-
The data frame support in python-oracledb 3.1 is a pre-release and may
175+
The data frame support in python-oracledb 3.2 is a pre-release and may
176176
change in a future version.
177177

178178
.. dbapimethodextension::

doc/src/api_manual/dataframe.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ from Oracle Database types to Arrow data types.
1313

1414
.. note::
1515

16-
The data frame support in python-oracledb 3.1 is a pre-release and may
16+
The data frame support in python-oracledb 3.2 is a pre-release and may
1717
change in a future version.
1818

1919
.. _oracledataframeobj:

doc/src/release_notes.rst

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ Common Changes
5555
support Oracle Database 23ai multi-pool :ref:`drcp`.
5656
#) Added Instance Principal authentication support when using
5757
:ref:`OCI Cloud Native Authentication <cloudnativeauthoci>`.
58+
#) Improvements to :ref:`data frames <dataframeformat>`:
59+
60+
- Fixed date handling to match PyArrow's and avoid localization issues
61+
(`issue 499 <https://github.com/oracle/python-oracledb/issues/499>`__).
62+
- Fixed bug on Windows when fetching dates prior to 1970 and after 2038
63+
(`issue 483 <https://github.com/oracle/python-oracledb/issues/483>`__).
64+
5865
#) Use GitHub Arm Linux runner for builds. Supplied by wojiushixiaobai
5966
(`PR 496 <https://github.com/oracle/python-oracledb/pull/496>`__).
6067
#) Fix bug with GitHub build action merge artifacts step
@@ -66,14 +73,6 @@ Common Changes
6673
parameter "min". Previously python-oracledb Thin mode did not raise an
6774
error and python-oracledb Thick mode raised the exception
6875
``ORA-24413: Invalid number of sessions specified``.
69-
#) Improvements to :ref:`data frames <dataframeformat>`:
70-
71-
- Fixed date handling to match PyArrow's and avoid localization issues
72-
(`issue 499 <https://github.com/oracle/python-oracledb/issues/499>`__).
73-
74-
- Fixed bug on Windows when fetching dates prior to 1970 and after 2038
75-
(`issue 483 <https://github.com/oracle/python-oracledb/issues/483>`__).
76-
7776
#) Improved the test suite and documentation.
7877

7978

@@ -980,14 +979,12 @@ Common Changes
980979
<https://github.com/oracle/python-oracledb/issues/250>`__).
981980
#) Added properties :data:`FetchInfo.domain_schema`,
982981
:data:`FetchInfo.domain_name` and :data:`FetchInfo.annotations` for the
983-
`SQL domain <https://docs.oracle.com/en/database/oracle/oracle-database/
984-
23/sqlrf/create-domain.html#GUID-17D3A9C6-D993-4E94-BF6B-CACA56581F41>`__
985-
and `annotations <https://docs.oracle.com/en/database/oracle/
986-
oracle-database/23/sqlrf/annotations_clause.html#
987-
GUID-1AC16117-BBB6-4435-8794-2B99F8F68052>`__
988-
associated with columns that are being fetched. SQL domains and annotations
989-
require Oracle Database 23ai. If using python-oracledb Thick mode, Oracle
990-
Client 23ai is also required.
982+
`SQL domain <https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-
983+
17D3A9C6-D993-4E94-BF6B-CACA56581F41>`__ and `annotations
984+
<https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-1AC16117-
985+
BBB6-4435-8794-2B99F8F68052>`__ associated with columns that are being
986+
fetched. SQL domains and annotations require Oracle Database 23ai. If using
987+
python-oracledb Thick mode, Oracle Client 23ai is also required.
991988
#) Added parameter ``data`` to :meth:`Connection.createlob()` to allow data to
992989
be written at LOB creation time.
993990
#) Added type :data:`~oracledb.DB_TYPE_XMLTYPE` to represent data of type

doc/src/user_guide/bind.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -823,16 +823,16 @@ will accept them but there will be no processing benefit.
823823
It is not uncommon for SQL statements to have low hundreds of
824824
versions. Sometimes this is expected and not a result of any issue. To
825825
determine the reason, find the SQL identifier of the statement and then query
826-
the Oracle Database view `V$SQL_SHARED_CURSOR <https://docs.oracle.com/en/
827-
database/oracle/oracle-database/23/refrn/V-SQL_SHARED_CURSOR.html>`__.
826+
the Oracle Database view `V$SQL_SHARED_CURSOR <https://www.oracle.com/pls/topic
827+
/lookup?ctx=dblatest&id=GUID-4993A6DE-5658-4745-B43E-F5AD9DB8DCCC>`__.
828828

829829
The SQL identifier of a statement can be found in Oracle Database views like
830-
`V$SQLAREA <https://docs.oracle.com/en/database/oracle/oracle-database/23/
831-
refrn/V-SQLAREA.html>`__ after you have run a statement, or you can find it
832-
*before* you execute the statement by using the `DBMS_SQL_TRANSLATOR.SQL_ID()
833-
<https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-DFFB611B-853A-
834-
434E-808D-D713671C3AA4>`__ function. Make sure to pass in exactly the same SQL
835-
text, including the same whitespace:
830+
`V$SQLAREA <https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-
831+
09D5169F-EE9E-4297-8E01-8D191D87BDF7>`__ after you have run a statement, or you
832+
can find it *before* you execute the statement by using the
833+
`DBMS_SQL_TRANSLATOR.SQL_ID() <https://www.oracle.com/pls/topic/lookup?ctx=
834+
dblatest&id=GUID-DFFB611B-853A-434E-808D-D713671C3AA4>`__ function. Make sure
835+
to pass in exactly the same SQL text, including the same whitespace:
836836

837837
.. code-block:: python
838838

doc/src/user_guide/connection_handling.rst

Lines changed: 49 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -32,32 +32,28 @@ Oracle Client and Oracle Database communicate.
3232
There are two ways to create a connection to Oracle Database using
3333
python-oracledb:
3434

35-
* **Standalone connections**: :ref:`Standalone connections <standaloneconnection>`
36-
are useful when the application needs a single connection to a database.
37-
Connections are created by calling :meth:`oracledb.connect()`.
38-
39-
* **Pooled connections**: :ref:`Connection pooling <connpooling>` is important for
40-
performance when applications frequently connect and disconnect from the database.
41-
Pools support Oracle's :ref:`high availability <highavailability>` features and are
42-
recommended for applications that must be reliable. Small pools can also be
43-
useful for applications that want a few connections available for infrequent
44-
use. Pools are created with :meth:`oracledb.create_pool()` at application
45-
initialization time, and then :meth:`ConnectionPool.acquire()` can be called to
46-
obtain a connection from a pool.
35+
* **Standalone connections**: :ref:`Standalone connections
36+
<standaloneconnection>` are useful when the application needs a single
37+
connection to a database. Connections are created by calling
38+
:meth:`oracledb.connect()`. For :ref:`asyncio <asyncio>`, use
39+
:meth:`oracledb.connect_async()` instead, see :ref:`connasync`.
40+
41+
* **Pooled connections**: :ref:`Connection pooling <connpooling>` is important
42+
for performance when applications frequently connect and disconnect from the
43+
database. Pools support Oracle's :ref:`high availability <highavailability>`
44+
features and are recommended for applications that must be reliable. Small
45+
pools can also be useful for applications that want a few connections
46+
available for infrequent use. Pools are created with
47+
:meth:`oracledb.create_pool()` at application initialization time, and then
48+
:meth:`ConnectionPool.acquire()` can be called to obtain a connection from a
49+
pool. For :ref:`asyncio <asyncio>`, use :meth:`oracledb.create_pool_async()`
50+
and :meth:`AsyncConnectionPool.acquire()` instead, see :ref:`asyncconnpool`.
4751

4852
Many connection behaviors can be controlled by python-oracledb connection
4953
options. Other settings can be configured in :ref:`optnetfiles` or in
5054
:ref:`optclientfiles`. These include limiting the amount of time that opening
5155
a connection can take, or enabling :ref:`network encryption <netencrypt>`.
5256

53-
.. note::
54-
55-
Creating a connection in python-oracledb Thin mode always requires a
56-
connection string, or the database host name and service name, to be
57-
specified. The Thin mode cannot use "bequeath" connections and does not
58-
reference Oracle environment variables ``ORACLE_SID``, ``TWO_TASK``,
59-
or ``LOCAL``.
60-
6157
.. _standaloneconnection:
6258

6359
Standalone Connections
@@ -287,6 +283,14 @@ For more information about naming methods, see the `Database Net Services
287283
Administrator's Guide
288284
<https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-E5358DEA-D619-4B7B-A799-3D2F802500F1>`__.
289285

286+
.. note::
287+
288+
Creating a connection in python-oracledb Thin mode always requires a
289+
connection string, or the database host name and service name, to be
290+
specified. The Thin mode cannot use "bequeath" connections and does not
291+
reference Oracle environment variables ``ORACLE_SID``, ``TWO_TASK``,
292+
or ``LOCAL``.
293+
290294
.. _easyconnect:
291295

292296
Easy Connect Syntax for Connection Strings
@@ -1883,6 +1887,10 @@ creation calls. If you call :meth:`ConnectParams.parse_connect_string()`, the
18831887
registered protocol hook method will be called but the parameter hook will not
18841888
be.
18851889

1890+
..
1891+
Note to doc writers: do not change the following heading because it is used
1892+
for a link emitted by ldap_hook() in src/oracledb/builtin_hooks.py
1893+
18861894
.. _ldapconnections:
18871895

18881896
LDAP Directory Naming
@@ -2061,8 +2069,17 @@ Connection Pooling
20612069
==================
20622070

20632071
Connection pooling can significantly improve application performance and
2064-
scalability, allows resource sharing, and lets applications use advanced Oracle
2065-
High Availability features.
2072+
scalability by allowing resource sharing. Pools also let applications use
2073+
optional advanced Oracle High Availability features.
2074+
2075+
Opening a connection to a database can be expensive: the connection string must
2076+
be parsed, a network connection must be established, the Oracle Database
2077+
network listener needs to be invoked, user authentication must be performed, a
2078+
database server process must be created, and session memory must be allocated
2079+
(and then the process is destroyed when the connection is closed). Connection
2080+
pools remove the overhead of repeatedly opening and closing :ref:`standalone
2081+
connections <standaloneconnection>` by establishing a pool of open connections
2082+
that can be reused throughout the life of an application process.
20662083

20672084
The pooling solutions available to python-oracledb applications are:
20682085

@@ -2092,12 +2109,12 @@ The pooling solutions available to python-oracledb applications are:
20922109

20932110
- `Proxy Resident Connection Pooling (PRCP)
20942111
<https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=GUID-E0032017-03B1-
2095-
4F14-AF9B-BCC87C982DA8>`__: This is connection pooling handled by a dedicated
2096-
mid-tier connection proxy, `CMAN-TDM <https://download.oracle.com/
2097-
ocomdocs/global/CMAN_TDM_Oracle_DB_Connection_Proxy_for_scalable_
2098-
apps.pdf>`__.
2112+
4F14-AF9B-BCC87C982DA8>`__: This is connection pooling handled by Oracle's
2113+
mid-tier connection proxy solution, `CMAN-TDM <https://download.oracle.com/
2114+
ocomdocs/global/
2115+
CMAN_TDM_Oracle_DB_Connection_Proxy_for_scalable_apps.pdf>`__.
20992116

2100-
This is useful for applications taking advantage of CMAN-TDM.
2117+
PRCP is useful for applications taking advantage of CMAN-TDM.
21012118

21022119
- :ref:`implicitconnpool`: This can add pooling benefits to applications that
21032120
connect when they start, and only close the connection when the application
@@ -2242,6 +2259,11 @@ server process to be released, use :meth:`ConnectionPool.drop()`:
22422259
22432260
pool.drop(connection)
22442261
2262+
Avoid doing this unnecessarily because it shrinks the pool. A future
2263+
:meth:`~ConnectionPool.acquire()` call may suffer the overhead of establishing
2264+
a new connection to the database, instead of being able to reuse a connection
2265+
already available in the pool.
2266+
22452267
Closing a Connection Pool
22462268
+++++++++++++++++++++++++
22472269

0 commit comments

Comments
 (0)