Skip to content

Commit 310aa50

Browse files
Doc updates.
1 parent d3555d4 commit 310aa50

File tree

15 files changed

+1604
-1395
lines changed

15 files changed

+1604
-1395
lines changed

doc/src/.static/custom.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
/* Added code to display tables without horizontal scrollbars */
1+
/* Added code to display tables without horizontal scrollbars
2+
add an extra line between two paragraphs and define the line
3+
spacing in tables */
24
.wy-table-responsive table td, .wy-table-responsive table th {
3-
white-space: normal;
5+
white-space: pre-wrap;
6+
line-height: 10pt;
47
}

doc/src/api_manual/connect_params.rst

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,8 @@ ConnectParams Attributes
145145
.. attribute:: ConnectParams.config_dir
146146

147147
This read-only attribute is a string that identifies the directory in which
148-
the configuration files such as tnsnames.ora are found. The default is the
149-
value of :attr:`defaults.config_dir`.
150-
151-
This attribute is only supported in python-oracledb Thin mode.
152-
153-
For python-oracledb Thick mode, use the ``config_dir`` parameter of
154-
:meth:`oracledb.init_oracle_client()`.
148+
the :ref:`optional configuration files <optconfigfiles>` are found. The
149+
default is the value of :attr:`defaults.config_dir`.
155150

156151
.. attribute:: ConnectParams.connection_id_prefix
157152

doc/src/api_manual/connection.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ Connection Methods
140140
can also be a list of dictionaries, where the keys match the bind variable
141141
placeholder names in ``statement``.
142142

143-
The ``arraysize`` parameter can specified to tune performance of fetching
144-
data across the network. It defaults to :attr:`defaults.arraysize`.
145-
Internally, the ``fetch_df_all()``'s :attr:`Cursor.prefetchrows` size is
146-
always set to the value of the explicit or default ``arraysize`` parameter
147-
value.
143+
The ``arraysize`` parameter can be specified to tune performance of
144+
fetching data across the network. It defaults to
145+
:attr:`defaults.arraysize`. Internally, the ``fetch_df_all()``'s
146+
:attr:`Cursor.prefetchrows` size is always set to the value of the explicit
147+
or default ``arraysize`` parameter value.
148148

149149
See :ref:`dataframeformat` for the supported data types and examples.
150150

@@ -170,7 +170,7 @@ Connection Methods
170170

171171
The ``size`` parameter controls the number of records fetched in each
172172
batch. It defaults to :attr:`defaults.arraysize`. Internally, the
173-
``fetch_df_batches()``'s :attr:`Cursor.arraysize`. and
173+
``fetch_df_batches()``'s :attr:`Cursor.arraysize` and
174174
:attr:`Cursor.prefetchrows` sizes are always set to the value of the
175175
explicit or default ``size`` parameter value.
176176

doc/src/api_manual/defaults.rst

Lines changed: 64 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,31 @@ Defaults Attributes
2929

3030
.. attribute:: defaults.config_dir
3131

32-
The directory in which optional configuration files such as
33-
``tnsnames.ora`` will be read in python-oracledb Thin mode. This attribute
34-
takes its initial value from the environment variable ``TNS_ADMIN``.
32+
The directory in which the optional configuration file ``tnsnames.ora``
33+
will be read in python-oracledb Thin mode.
3534

36-
This attribute is not used by the python-oracledb Thick mode: the usual
37-
Oracle Client search path behavior for configuration files is followed, see
35+
At time of ``import oracledb`` the value of
36+
``oracledb.defaults.config_dir`` will be set to (first one wins):
37+
38+
- the value of ``$TNS_ADMIN``, if ``TNS_ADMIN`` is set.
39+
40+
- ``$ORACLE_HOME/network/admin``, if ``$ORACLE_HOME`` is set.
41+
42+
Otherwise, ``oracledb.defaults.config_dir`` will not be set.
43+
44+
This attribute is used in python-oracledb Thin mode. It is also used in
45+
Thick mode if :attr:`defaults.thick_mode_dsn_passthrough` is *False*, see
3846
:ref:`optnetfiles`.
3947

48+
.. versionchanged:: 3.0.0
49+
50+
The directory ``$ORACLE_HOME/network/admin`` was added to the
51+
heuristic.
52+
53+
At completion of a call to :meth:`oracledb.init_oracle_client()` in
54+
Thick mode, the value of :attr:`defaults.config_dir` may get changed
55+
by python-oracledb.
56+
4057
.. attribute:: defaults.driver_name
4158

4259
The default value that represents the driver used by the client to connect
@@ -169,27 +186,49 @@ Defaults Attributes
169186

170187
.. attribute:: defaults.thick_mode_dsn_passthrough
171188

172-
The default value that determines whether :ref:`connection strings
173-
<connstr>` passed to :meth:`oracledb.connect()` and
174-
:meth:`oracledb.create_pool()` in python-oracledb Thick mode will be parsed
175-
by Oracle Client libraries or by python-oracledb itself.
176-
177-
When the value of this attribute is *True*, then connection strings passed
178-
to these methods will be sent unchanged to the Oracle Client libraries.
179-
180-
Setting this attribute to *False* makes Thick and Thin mode applications
181-
behave similarly regarding connection string parameter handling and
182-
locating any optional :ref:`tnsnames.ora files <optnetfiles>` configuration
183-
file, see :ref:`usingconfigfiles`. Connection strings used in connection
184-
and pool creation methods in Thick mode are parsed by python-oracledb
185-
itself and a generated connect descriptor is sent to the Oracle Client
186-
libraries. The location of any optional :ref:`tnsnames.ora file
187-
<optnetfiles>` used to resolve a :ref:`TNS Alias <netservice>` is
188-
determined by python-oracledb heuristics instead of by the Oracle Client
189-
libraries.
189+
The value that determines whether :ref:`connection strings <connstr>`
190+
passed as the ``dsn`` parameter to :meth:`oracledb.connect()`,
191+
:meth:`oracledb.create_pool()`, :meth:`oracledb.connect_async()`, and
192+
:meth:`oracledb.create_pool_async()` in python-oracledb Thick mode will be
193+
parsed by Oracle Client libraries or by python-oracledb itself.
194+
195+
When ``thick_mode_dsn_passthrough`` is the default value `True`, the
196+
behavior of python-oracledb 2.5 and earlier versions occurs: Thick mode
197+
passes connect strings unchanged to the Oracle Client libraries to
198+
handle. Those libraries have their own heuristics for locating the optional
199+
:ref:`tnsnames.ora <optnetfiles>`, if used.
200+
201+
When ``thick_mode_dsn_passthrough`` is `False`, python-oracledb Thick mode
202+
behaves similarly to Thin mode, which can be helpful for applications that
203+
may be run in either mode:
204+
205+
- The search path used to locate and read any optional :ref:`tnsnames.ora
206+
<optnetfiles>` file is handled in the python-oracledb driver. Different
207+
:ref:`tnsnames.ora <optnetfiles>` files can be used by each
208+
connection. Note loading of optional Thick mode files such as
209+
``sqlnet.ora`` and ``oraaccess.xml`` is always handled by Oracle Client
210+
libraries regardless of the value of ``thick_mode_dsn_passthrough``
211+
because it is those libraries that use these files.
212+
213+
- All connect strings will be parsed by the python-oracledb driver and a
214+
generated connect descriptor is sent to the database. Parameters
215+
unrecognized by python-oracledb in :ref:`Easy Connect strings
216+
<easyconnect>` are discarded. In :ref:`full connect descriptors
217+
<conndescriptor>` passed explicitly as the ``dsn`` parameter value or
218+
stored in a :ref:`tnsnames.ora <optnetfiles>` file, any parameters that
219+
are unrecognized by python-oracledb in the ``DESCRIPTION``,
220+
``CONNECT_DATA`` and ``SECURITY`` sections will be passed through to the
221+
database unchanged, while unrecognized parameters in other sections are
222+
discarded.
223+
224+
- If a :ref:`Centralized Configuration Provider <configurationproviders>`
225+
is used for connection configuration, any :ref:`python-oracledb parameter
226+
values <pyoparams>` in the configuration will be used.
227+
228+
The value of ``thick_mode_dsn_passthrough`` is ignored in python-oracledb
229+
Thin mode, which always parses all connect strings (including reading a
230+
:ref:`tnsnames.ora <optnetfiles>` file, if required).
190231

191232
This attribute has an initial value of *True*.
192233

193-
This attribute is ignored in python-oracledb Thin mode.
194-
195234
.. versionadded:: 3.0.0

0 commit comments

Comments
 (0)