Doc improvements.

This commit is contained in:
Anthony Tuininga 2022-05-25 14:41:35 -06:00
parent 3db3e3772e
commit 1ad43aa912
7 changed files with 25 additions and 23 deletions

View File

@ -290,7 +290,7 @@ Cursor Object
See :ref:`fetching` for an example. See :ref:`fetching` for an example.
.. method:: Cursor.fetchmany(num_rows=cursor.arraysize) .. method:: Cursor.fetchmany(numRows=cursor.arraysize)
Fetch the next set of rows of a query result, returning a list of tuples. Fetch the next set of rows of a query result, returning a list of tuples.
An empty list is returned if no more rows are available. Note that the An empty list is returned if no more rows are available. Note that the

View File

@ -40,7 +40,7 @@ Module Interface
mode=cx_Oracle.DEFAULT_AUTH, handle=0, pool=None, threaded=False, \ mode=cx_Oracle.DEFAULT_AUTH, handle=0, pool=None, threaded=False, \
events=False, cclass=None, purity=cx_Oracle.ATTR_PURITY_DEFAULT, \ events=False, cclass=None, purity=cx_Oracle.ATTR_PURITY_DEFAULT, \
newpassword=None, encoding=None, nencoding=None, edition=None, \ newpassword=None, encoding=None, nencoding=None, edition=None, \
appcontext=[], tag=None, matchanytag=None, shardingkey=[], \ appcontext=[], tag=None, matchanytag=False, shardingkey=[], \
supershardingkey=[], stmtcachesize=20) supershardingkey=[], stmtcachesize=20)
Connection(user=None, password=None, dsn=None, \ Connection(user=None, password=None, dsn=None, \
mode=cx_Oracle.DEFAULT_AUTH, handle=0, pool=None, threaded=False, \ mode=cx_Oracle.DEFAULT_AUTH, handle=0, pool=None, threaded=False, \

View File

@ -160,7 +160,7 @@ SessionPool Object
unusable, it is discarded and a different connection is selected to be unusable, it is discarded and a different connection is selected to be
returned by :meth:`SessionPool.acquire()`. Setting ``ping_interval`` to a returned by :meth:`SessionPool.acquire()`. Setting ``ping_interval`` to a
negative value disables pinging. Setting it to 0 forces a ping for every negative value disables pinging. Setting it to 0 forces a ping for every
``aquire()`` and is not recommended. ``acquire()`` and is not recommended.
Prior to cx_Oracle 8.2, the ping interval was fixed at 60 seconds. Prior to cx_Oracle 8.2, the ping interval was fixed at 60 seconds.

View File

@ -336,7 +336,7 @@ connection pool:
pool.close() pool.close()
Other :meth:`cx_Oracle.SessionPool()` options can be used at pool creation. Other :meth:`cx_Oracle.SessionPool()` options can be used at pool creation.
For example the ``getmode`` value can be set so that any ``aquire()`` call will For example the ``getmode`` value can be set so that any ``acquire()`` call will
wait for a connection to become available if all are currently in use, for wait for a connection to become available if all are currently in use, for
example: example:
@ -349,8 +349,8 @@ example:
getmode=cx_Oracle.SPOOL_ATTRVAL_WAIT, getmode=cx_Oracle.SPOOL_ATTRVAL_WAIT,
encoding="UTF-8") encoding="UTF-8")
See `ConnectionPool.py See `connection_pool.py
<https://github.com/oracle/python-cx_Oracle/tree/main/samples/ConnectionPool.py>`__ <https://github.com/oracle/python-cx_Oracle/tree/main/samples/connection_pool.py>`__
for an example. for an example.
Before :meth:`SessionPool.acquire()` returns, cx_Oracle does a lightweight check Before :meth:`SessionPool.acquire()` returns, cx_Oracle does a lightweight check
@ -1348,10 +1348,10 @@ of the function :meth:`cx_Oracle.connect()` constructor:
dsn="dbhost.example.com/orclpdb1", dsn="dbhost.example.com/orclpdb1",
newpassword=newpwd, encoding="UTF-8") newpassword=newpwd, encoding="UTF-8")
.. _autononmousdb: .. _autonomousdb:
Connecting to Oracle Cloud Autononmous Databases Connecting to Oracle Cloud Autonomous Databases
================================================ ===============================================
To enable connection to Oracle Autonomous Database in Oracle Cloud, a wallet To enable connection to Oracle Autonomous Database in Oracle Cloud, a wallet
needs be downloaded from the cloud, and cx_Oracle needs to be configured to use needs be downloaded from the cloud, and cx_Oracle needs to be configured to use

View File

@ -19,14 +19,14 @@ what types of SQL should trigger a notification, whether notifications should
survive database loss, and control over unsubscription. You can also choose survive database loss, and control over unsubscription. You can also choose
whether notification messages will include ROWIDs of affected rows. whether notification messages will include ROWIDs of affected rows.
By default, object-level (previously known as Database Change Notification) By default, object-level notification (previously known as Database Change
occurs and the Python notification method is invoked whenever a database Notification) occurs. With this mode a Python notification method is invoked
transaction is committed that changes an object that a registered query whenever a database transaction is committed that changes an object referenced
references, regardless of whether the actual query result changed. However if by a registered query. However if the :meth:`subscription
the :meth:`subscription <Connection.subscribe>` option ``qos`` is <Connection.subscribe>` option ``qos`` is :data:`cx_Oracle.SUBSCR_QOS_QUERY`
:data:`cx_Oracle.SUBSCR_QOS_QUERY` then query-level notification occurs. In then query-level notification occurs. In this mode, the database notifies the
this mode, the database notifies the application whenever a transaction changing application whenever a committed transaction changes the result of a registered
the result of the registered query is committed. query.
CQN is best used to track infrequent data changes. CQN is best used to track infrequent data changes.
@ -109,7 +109,7 @@ calling :meth:`Subscription.registerquery()`. Registering a query behaves
similarly to :meth:`Cursor.execute()`, but only queries are permitted and the similarly to :meth:`Cursor.execute()`, but only queries are permitted and the
``args`` parameter must be a sequence or dictionary. ``args`` parameter must be a sequence or dictionary.
An example script to receive query notifications when the 'CUSTOMER' table data An example script to receive query notifications when the 'REGIONS' table data
changes is: changes is:
.. code-block:: python .. code-block:: python
@ -129,6 +129,7 @@ changes is:
subscr = connection.subscribe(callback=cqn_callback, subscr = connection.subscribe(callback=cqn_callback,
operations=cx_Oracle.OPCODE_INSERT | cx_Oracle.OPCODE_DELETE, operations=cx_Oracle.OPCODE_INSERT | cx_Oracle.OPCODE_DELETE,
qos=cx_Oracle.SUBSCR_QOS_QUERY | cx_Oracle.SUBSCR_QOS_ROWIDS) qos=cx_Oracle.SUBSCR_QOS_QUERY | cx_Oracle.SUBSCR_QOS_ROWIDS)
subscr.registerquery("select * from regions") subscr.registerquery("select * from regions")
input("Hit enter to stop CQN demo\n") input("Hit enter to stop CQN demo\n")

View File

@ -241,7 +241,7 @@ located with, or separately from, the ``tnsnames.ora`` and ``sqlnet.ora``
files. It should be securely stored. The ``sqlnet.ora`` file's files. It should be securely stored. The ``sqlnet.ora`` file's
``WALLET_LOCATION`` path should be set to the directory containing ``WALLET_LOCATION`` path should be set to the directory containing
``cwallet.sso``. For Oracle Autonomous Database use of wallets, see ``cwallet.sso``. For Oracle Autonomous Database use of wallets, see
:ref:`autononmousdb`. :ref:`autonomousdb`.
Note the :ref:`easyconnect` can set many common configuration options without Note the :ref:`easyconnect` can set many common configuration options without
needing ``tnsnames.ora`` or ``sqlnet.ora`` files. needing ``tnsnames.ora`` or ``sqlnet.ora`` files.

View File

@ -491,10 +491,11 @@ To use cx_Oracle with Oracle Instant Client zip files:
a 64-bit or 32-bit architecture to match Instant Client's architecture. a 64-bit or 32-bit architecture to match Instant Client's architecture.
Each Instant Client version requires a different redistributable version: Each Instant Client version requires a different redistributable version:
- For Instant Client 19 install `VS 2017 <https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads>`__. - For Instant Client 21 install `VS 2019 <https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170>`__ or later.
- For Instant Client 18 or 12.2 install `VS 2013 <https://support.microsoft.com/en-us/kb/2977003#bookmark-vs2013>`__ - For Instant Client 19 install `VS 2017 <https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170>`__.
- For Instant Client 12.1 install `VS 2010 <https://support.microsoft.com/en-us/kb/2977003#bookmark-vs2010>`__ - For Instant Client 18 or 12.2 install `VS 2013 <https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2013-vc-120>`__
- For Instant Client 11.2 install `VS 2005 64-bit <https://www.microsoft.com/en-us/download/details.aspx?id=18471>`__ or `VS 2005 32-bit <https://www.microsoft.com/en-ca/download/details.aspx?id=3387>`__ - For Instant Client 12.1 install `VS 2010 <https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2010-vc-100-sp1-no-longer-supported>`__
- For Instant Client 11.2 install `VS 2005 64-bit <https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2005-vc-80-sp1-no-longer-supported>`__
Configure Oracle Instant Client Configure Oracle Instant Client
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^