Documentation updates.
This commit is contained in:
parent
5def438665
commit
5052665dd5
|
@ -90,11 +90,12 @@ Connection Methods
|
|||
|
||||
Commits any pending transactions to the database.
|
||||
|
||||
.. method:: Connection.createlob(lobType)
|
||||
.. method:: Connection.createlob(lob_type)
|
||||
|
||||
Creates and returns a new temporary :ref:`LOB object <lobobj>` of the
|
||||
specified type. The ``lobType`` parameter should be one of
|
||||
:data:`oracledb.CLOB`, :data:`oracledb.BLOB` or :data:`oracledb.NCLOB`.
|
||||
specified type. The ``lob_type`` parameter should be one of
|
||||
:data:`oracledb.DB_TYPE_CLOB`, :data:`oracledb.DB_TYPE_BLOB`, or
|
||||
:data:`oracledb.DB_TYPE_NCLOB`.
|
||||
|
||||
.. note::
|
||||
|
||||
|
@ -540,8 +541,8 @@ Connection Attributes
|
|||
.. attribute:: Connection.action
|
||||
|
||||
This write-only attribute sets the action column in the v$session table. It
|
||||
is a string attribute and cannot be set to None -- use the empty string
|
||||
instead.
|
||||
is a string attribute but the value None is accepted and treated as an
|
||||
empty string.
|
||||
|
||||
.. note::
|
||||
|
||||
|
@ -917,6 +918,6 @@ Connection Attributes
|
|||
|
||||
.. note::
|
||||
|
||||
If you connect to Oracle Database 18 or higher with client libraries
|
||||
12.2 or lower that you will only receive the base version (such as
|
||||
18.0.0.0.0) instead of the full version (18.3.0.0.0).
|
||||
If you connect to Oracle Database 18 or higher using Oracle Client
|
||||
libraries 12.2 or lower you will only receive the base version (such as
|
||||
18.0.0.0.0) instead of the full version (such as 18.3.0.0.0).
|
||||
|
|
|
@ -8,6 +8,16 @@ The following tables contain all of the deprecations in the python-oracledb API,
|
|||
when they were first deprecated and a comment on what should be used instead,
|
||||
if applicable. The most recent deprecations are listed first.
|
||||
|
||||
.. list-table-with-summary:: Desupported in python-oracledb 2.0
|
||||
:header-rows: 1
|
||||
:class: wy-table-responsive
|
||||
:summary: The first column, Name, displays the deprecated or desupported API name. The second column, Comments, includes information about when the API was deprecated or desupported and what API to use, if applicable.
|
||||
:name: _deprecations_2_0
|
||||
|
||||
* - Name
|
||||
- Comments
|
||||
* - ``oracledb.__future__.old_json_col_as_obj``
|
||||
- This attribute is desupported and does not need to be set to fetch VARCHAR2 and LOB columns that contain JSON data.
|
||||
|
||||
.. list-table-with-summary:: Deprecated in python-oracledb 1.4
|
||||
:header-rows: 1
|
||||
|
|
|
@ -1518,8 +1518,9 @@ Advanced Queuing: Message States
|
|||
These constants are extensions to the DB API definition. They are possible
|
||||
values for the :attr:`~MessageProperties.state` attribute of the
|
||||
:ref:`message properties object <msgproperties>`. This object is the
|
||||
``msgproperties`` parameter for the :meth:`Connection.deq()` and
|
||||
:meth:`Queue.enqone()` or :meth:`Queue.enqmany()` methods.
|
||||
``msgproperties`` parameter for the :meth:`Queue.deqone()` or
|
||||
:meth:`Queue.deqmany()`, and :meth:`Queue.enqone()` or :meth:`Queue.enqmany()`
|
||||
methods.
|
||||
|
||||
|
||||
.. data:: MSG_EXPIRED
|
||||
|
|
|
@ -104,32 +104,27 @@ insert JSON strings like:
|
|||
|
||||
cursor.execute(inssql, [1, json.dumps(data)])
|
||||
|
||||
You can fetch VARCHAR2 and LOB columns that contain JSON data without needing
|
||||
to call ``json.loads()`` on the value (similar to
|
||||
:ref:`fetching JSON type columns <json21fetch>` when using Oracle Database
|
||||
21c). This can be done by setting the attribute
|
||||
:attr:`oracledb.__future__.old_json_col_as_obj` to the value *True* as shown
|
||||
below. If you are using python-oracledb Thick mode, you must also use Oracle
|
||||
Client 19c (or later).
|
||||
You can fetch VARCHAR2 and LOB columns that contain JSON data in the same way
|
||||
that :ref:`JSON type columns <json21fetch>` are fetched when using Oracle
|
||||
Database 21c or later. If you are using python-oracledb Thick mode, you must
|
||||
use Oracle Client 19c (or later). For example:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
oracledb.__future__.old_json_col_as_obj = True
|
||||
|
||||
for row in cursor.execute("select * from CustomersAsBlob"):
|
||||
print(row)
|
||||
|
||||
To fetch JSON without setting the attribute
|
||||
``oracledb.__future__.old_json_col_as_obj``, you can use ``json.loads()`` on
|
||||
the returned data. For example, to fetch JSON which uses BLOB storage:
|
||||
.. versionchanged:: 2.0
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import json
|
||||
|
||||
sql = "SELECT c.json_data FROM CustomersAsBlob c"
|
||||
for j, in cursor.execute(sql):
|
||||
print(json.loads(j.read()))
|
||||
Previously, the ``oracledb.__future__.old_json_col_as_obj`` attribute
|
||||
needed to be set to *True* to fetch VARCHAR2 and LOB columns that
|
||||
contained JSON data. Also, you could fetch JSON data without setting this
|
||||
attribute with a call to ``json.loads()`` on the returned data. With this
|
||||
change, the ``oracledb.__future__.old_json_col_as_obj`` attribute is
|
||||
desupported. VARCHAR2 and LOB columns containing JSON data can now be
|
||||
fetched directly without setting the
|
||||
``oracledb.__future__.old_json_col_as_obj`` attribute or without needing
|
||||
to call ``json.loads()`` on the value.
|
||||
|
||||
See `json_blob.py
|
||||
<https://github.com/oracle/python-oracledb/tree/main/samples/json_blob.py>`__
|
||||
|
|
|
@ -334,7 +334,7 @@ Encryption (NNE) enabled. NNE is only supported in python-oracledb Thick mode.
|
|||
|
||||
SELECT network_service_banner FROM v$session_connect_info;
|
||||
|
||||
If NNE is enabled, then this query prints an output that includes the
|
||||
If NNE is enabled, then this query prints output that includes the
|
||||
available encryption service, the crypto-checksumming service, and the
|
||||
algorithms in use, such as::
|
||||
|
||||
|
|
Loading…
Reference in New Issue