Skip to content

Commit 7d364ea

Browse files
Add samples and improve documentation.
1 parent 10e19b8 commit 7d364ea

File tree

12 files changed

+570
-172
lines changed

12 files changed

+570
-172
lines changed

doc/src/api_manual/module.rst

Lines changed: 54 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -332,13 +332,14 @@ Oracledb Methods
332332
Thick modes.
333333

334334
The ``use_tcp_fast_open`` parameter is expected to be a boolean which
335-
indicates whether to use an `Oracle Autonomous Database Serverless (ADB-S)
336-
<https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/
337-
adbsb/adbsb-overview.html#GUID-A7435462-9D74-44B4-8240-4A6F06E92348>`__
338-
specific feature that can reduce the latency in round-trips to the
339-
database after a connection has been established. This feature is only
340-
available with certain versions of ADB-S. This value is used in both
341-
python-oracledb Thin and Thick modes. The default value is False.
335+
indicates whether to use TCP Fast Open which is an `Oracle Autonomous
336+
Database Serverless (ADB-S) <https://docs.oracle.com/en/cloud/paas/
337+
autonomous-database/serverless/adbsb/connection-tcp-fast-open.html#
338+
GUID-34654005-DBBA-4C49-BC6D-717F9C16A17C>`__ specific feature that can
339+
reduce the latency in round-trips to the database after a connection has
340+
been established. This feature is only available with certain versions of
341+
ADB-S. This value is used in both python-oracledb Thin and Thick modes.
342+
The default value is False.
342343

343344
The ``ssl_version`` parameter is expected to be one of the constants
344345
"ssl.TLSVersion.TLSv1_2" or "ssl.TLSVersion.TLSv1_3" and specifies the TLS
@@ -347,7 +348,7 @@ Oracledb Methods
347348
parameter can be specified when establishing connections with the protocol
348349
"tcps". This parameter is used in both python-oracledb Thin and Thick
349350
modes. The value "ssl.TLSVersion.TLSv1_3" requires Oracle Database 23ai
350-
and for Thick mode, Oracle Client 19c (or later) is additionally required.
351+
and for Thick mode, Oracle Client 23ai is additionally required.
351352

352353
If the ``handle`` parameter is specified, it must be of type OCISvcCtx\*
353354
and is only of use when embedding Python in an application (like
@@ -605,13 +606,14 @@ Oracledb Methods
605606
the python-oracledb Thin and Thick modes.
606607

607608
The ``use_tcp_fast_open`` parameter is expected to be a boolean which
608-
indicates whether to use an `Oracle Autonomous Database Serverless (ADB-S)
609-
<https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/
610-
adbsb/adbsb-overview.html#GUID-A7435462-9D74-44B4-8240-4A6F06E92348>`__
611-
specific feature that can reduce the latency in round-trips to the
612-
database after a connection has been established. This feature is only
613-
available with certain versions of ADB-S. This value is used in both
614-
python-oracledb Thin and Thick modes. The default value is False.
609+
indicates whether to use TCP Fast Open which is an `Oracle Autonomous
610+
Database Serverless (ADB-S) <https://docs.oracle.com/en/cloud/paas/
611+
autonomous-database/serverless/adbsb/connection-tcp-fast-open.html#
612+
GUID-34654005-DBBA-4C49-BC6D-717F9C16A17C>`__ specific feature that can
613+
reduce the latency in round-trips to the database after a connection has
614+
been established. This feature is only available with certain versions of
615+
ADB-S. This value is used in both python-oracledb Thin and Thick modes.
616+
The default value is False.
615617

616618
The ``ssl_version`` parameter is expected to be one of the constants
617619
"ssl.TLSVersion.TLSv1_2" or "ssl.TLSVersion.TLSv1_3" and specifies the TLS
@@ -620,7 +622,7 @@ Oracledb Methods
620622
parameter can be specified when establishing connections with the protocol
621623
"tcps". This parameter is used in both python-oracledb Thin and Thick
622624
modes. The value "ssl.TLSVersion.TLSv1_3" requires Oracle Database 23ai
623-
and for Thick mode, Oracle Client 19c (or later) is additionally required.
625+
and for Thick mode, Oracle Client 23ai is additionally required.
624626

625627
The ``handle`` parameter is ignored in the python-oracledb Thin mode.
626628

@@ -903,13 +905,14 @@ Oracledb Methods
903905
Thick modes.
904906

905907
The ``use_tcp_fast_open`` parameter is expected to be a boolean which
906-
indicates whether to use an `Oracle Autonomous Database Serverless (ADB-S)
907-
<https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/
908-
adbsb/adbsb-overview.html#GUID-A7435462-9D74-44B4-8240-4A6F06E92348>`__
909-
specific feature that can reduce the latency in round-trips to the
910-
database after a connection has been established. This feature is only
911-
available with certain versions of ADB-S. This value is used in both
912-
python-oracledb Thin and Thick modes. The default value is False.
908+
indicates whether to use TCP Fast Open which is an `Oracle Autonomous
909+
Database Serverless (ADB-S) <https://docs.oracle.com/en/cloud/paas/
910+
autonomous-database/serverless/adbsb/connection-tcp-fast-open.html#
911+
GUID-34654005-DBBA-4C49-BC6D-717F9C16A17C>`__ specific feature that can
912+
reduce the latency in round-trips to the database after a connection has
913+
been established. This feature is only available with certain versions of
914+
ADB-S. This value is used in both python-oracledb Thin and Thick modes.
915+
The default value is False.
913916

914917
The ``ssl_version`` parameter is expected to be one of the constants
915918
"ssl.TLSVersion.TLSv1_2" or "ssl.TLSVersion.TLSv1_3" and specifies the TLS
@@ -918,7 +921,7 @@ Oracledb Methods
918921
parameter can be specified when establishing connections with the protocol
919922
"tcps". This parameter is used in both python-oracledb Thin and Thick
920923
modes. The value "ssl.TLSVersion.TLSv1_3" requires Oracle Database 23ai
921-
and for Thick mode, Oracle Client 19c (or later) is additionally required.
924+
and for Thick mode, Oracle Client 23ai is additionally required.
922925

923926
The ``handle`` parameter is expected to be an integer which represents a
924927
pointer to a valid service context handle. This value is only used in the
@@ -1303,13 +1306,14 @@ Oracledb Methods
13031306
Thick modes.
13041307

13051308
The ``use_tcp_fast_open`` parameter is expected to be a boolean which
1306-
indicates whether to use an `Oracle Autonomous Database Serverless (ADB-S)
1307-
<https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/
1308-
adbsb/adbsb-overview.html#GUID-A7435462-9D74-44B4-8240-4A6F06E92348>`__
1309-
specific feature that can reduce the latency in round-trips to the database
1310-
after a connection has been established. This feature is only available
1311-
with certain versions of ADB-S. This value is used in both python-oracledb
1312-
Thin and Thick modes. The default value is False.
1309+
indicates whether to use TCP Fast Open which is an `Oracle Autonomous
1310+
Database Serverless (ADB-S) <https://docs.oracle.com/en/cloud/paas/
1311+
autonomous-database/serverless/adbsb/connection-tcp-fast-open.html#
1312+
GUID-34654005-DBBA-4C49-BC6D-717F9C16A17C>`__ specific feature that can
1313+
reduce the latency in round-trips to the database after a connection has
1314+
been established. This feature is only available with certain versions of
1315+
ADB-S. This value is used in both python-oracledb Thin and Thick modes.
1316+
The default value is False.
13131317

13141318
The ``ssl_version`` parameter is expected to be one of the constants
13151319
"ssl.TLSVersion.TLSv1_2" or "ssl.TLSVersion.TLSv1_3" and specifies the TLS
@@ -1318,7 +1322,7 @@ Oracledb Methods
13181322
parameter can be specified when establishing connections with the protocol
13191323
"tcps". This parameter is used in both python-oracledb Thin and Thick
13201324
modes. The value "ssl.TLSVersion.TLSv1_3" requires Oracle Database 23ai
1321-
and for Thick mode, Oracle Client 19c (or later) is additionally required.
1325+
and for Thick mode, Oracle Client 23ai is additionally required.
13221326

13231327
If the ``handle`` parameter is specified, it must be of type OCISvcCtx\*
13241328
and is only of use when embedding Python in an application (like
@@ -1643,13 +1647,14 @@ Oracledb Methods
16431647
the python-oracledb Thin and Thick modes.
16441648

16451649
The ``use_tcp_fast_open`` parameter is expected to be a boolean which
1646-
indicates whether to use an `Oracle Autonomous Database Serverless (ADB-S)
1647-
<https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/
1648-
adbsb/adbsb-overview.html#GUID-A7435462-9D74-44B4-8240-4A6F06E92348>`__
1649-
specific feature that can reduce the latency in round-trips to the database
1650-
after a connection has been established. This feature is only available
1651-
with certain versions of ADB-S. This value is used in both python-oracledb
1652-
Thin and Thick modes. The default value is False.
1650+
indicates whether to use TCP Fast Open which is an `Oracle Autonomous
1651+
Database Serverless (ADB-S) <https://docs.oracle.com/en/cloud/paas/
1652+
autonomous-database/serverless/adbsb/connection-tcp-fast-open.html#
1653+
GUID-34654005-DBBA-4C49-BC6D-717F9C16A17C>`__ specific feature that can
1654+
reduce the latency in round-trips to the database after a connection has
1655+
been established. This feature is only available with certain versions of
1656+
ADB-S. This value is used in both python-oracledb Thin and Thick modes.
1657+
The default value is False.
16531658

16541659
The ``ssl_version`` parameter is expected to be one of the constants
16551660
"ssl.TLSVersion.TLSv1_2" or "ssl.TLSVersion.TLSv1_3" and specifies the TLS
@@ -1658,7 +1663,7 @@ Oracledb Methods
16581663
parameter can be specified when establishing connections with the protocol
16591664
"tcps". This parameter is used in both python-oracledb Thin and Thick
16601665
modes. The value "ssl.TLSVersion.TLSv1_3" requires Oracle Database 23ai
1661-
and for Thick mode, Oracle Client 19c (or later) is additionally required.
1666+
and for Thick mode, Oracle Client 23ai is additionally required.
16621667

16631668
The ``handle`` parameter is ignored in the python-oracledb Thin mode.
16641669

@@ -2110,13 +2115,14 @@ Oracledb Methods
21102115
Thick modes.
21112116

21122117
The ``use_tcp_fast_open`` parameter is expected to be a boolean which
2113-
indicates whether to use an `Oracle Autonomous Database Serverless (ADB-S)
2114-
<https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/
2115-
adbsb/adbsb-overview.html#GUID-A7435462-9D74-44B4-8240-4A6F06E92348>`__
2116-
specific feature that can reduce the latency in round-trips to the database
2117-
after a connection has been established. This feature is only available
2118-
with certain versions of ADB-S. This value is used in both python-oracledb
2119-
Thin and Thick modes. The default value is False.
2118+
indicates whether to use TCP Fast Open which is an `Oracle Autonomous
2119+
Database Serverless (ADB-S) <https://docs.oracle.com/en/cloud/paas/
2120+
autonomous-database/serverless/adbsb/connection-tcp-fast-open.html#
2121+
GUID-34654005-DBBA-4C49-BC6D-717F9C16A17C>`__ specific feature that can
2122+
reduce the latency in round-trips to the database after a connection has
2123+
been established. This feature is only available with certain versions of
2124+
ADB-S. This value is used in both python-oracledb Thin and Thick modes.
2125+
The default value is False.
21202126

21212127
The ``ssl_version`` parameter is expected to be one of the constants
21222128
"ssl.TLSVersion.TLSv1_2" or "ssl.TLSVersion.TLSv1_3" and specifies the TLS
@@ -2125,7 +2131,7 @@ Oracledb Methods
21252131
parameter can be specified when establishing connections with the protocol
21262132
"tcps". This parameter is used in both python-oracledb Thin and Thick
21272133
modes. The value "ssl.TLSVersion.TLSv1_3" requires Oracle Database 23ai
2128-
and for Thick mode, Oracle Client 19c (or later) is additionally required.
2134+
and for Thick mode, Oracle Client 23ai is additionally required.
21292135

21302136
The ``handle`` parameter is expected to be an integer which represents a
21312137
pointer to a valid service context handle. This value is only used in the

doc/src/api_manual/soda.rst

Lines changed: 58 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ allows documents to be inserted, queried, and retrieved from Oracle Database
1010
using a set of NoSQL-style python-oracledb methods. By default, documents are JSON
1111
strings. See the :ref:`user manual <sodausermanual>` for examples.
1212

13+
.. note::
14+
15+
SODA is only supported in the python-oracledb Thick mode. See
16+
:ref:`enablingthick`.
17+
1318
.. _sodarequirements:
1419

1520
SODA Requirements
@@ -30,51 +35,53 @@ SODA requires Oracle Client 18.3 or higher and Oracle Database 18.1 and higher.
3035

3136
.. note::
3237

33-
If you are using Oracle Database 21c (or later) and create new collections
34-
you need to do one of the following:
35-
36-
- Use Oracle Client libraries 21c (or later)
37-
38-
- Or explicitly use collection metadata when creating collections and set
39-
the data storage type to BLOB, for example::
40-
41-
{
42-
"keyColumn": {
43-
"name":"ID"
44-
},
45-
"contentColumn": {
46-
"name": "JSON_DOCUMENT",
47-
"sqlType": "BLOB"
48-
},
49-
"versionColumn": {
50-
"name": "VERSION",
51-
"method": "UUID"
52-
},
53-
"lastModifiedColumn": {
54-
"name": "LAST_MODIFIED"
55-
},
56-
"creationTimeColumn": {
57-
"name": "CREATED_ON"
58-
}
38+
SODA APIs are only supported in the python-oracledb Thick mode. See
39+
:ref:`enablingthick`.
40+
41+
42+
If you are using Oracle Database 21c (or later) and create new collections
43+
you need to do one of the following:
44+
45+
- Use Oracle Client libraries 21c (or later)
46+
47+
- Or explicitly use collection metadata when creating collections and set
48+
the data storage type to BLOB, for example::
49+
50+
{
51+
"keyColumn": {
52+
"name":"ID"
53+
},
54+
"contentColumn": {
55+
"name": "JSON_DOCUMENT",
56+
"sqlType": "BLOB"
57+
},
58+
"versionColumn": {
59+
"name": "VERSION",
60+
"method": "UUID"
61+
},
62+
"lastModifiedColumn": {
63+
"name": "LAST_MODIFIED"
64+
},
65+
"creationTimeColumn": {
66+
"name": "CREATED_ON"
5967
}
68+
}
6069

61-
- Or, set the database initialization parameter `compatible
62-
<https://www.oracle.com/pls/topic/lookup?ctx=dblatest&
63-
id=GUID-A2E90F08-BC9F-4688-A9D0-4A948DD3F7A9>`__ to 19 or lower.
70+
- Or set the database initialization parameter `compatible
71+
<https://www.oracle.com/pls/topic/lookup?ctx=dblatest&
72+
id=GUID-A2E90F08-BC9F-4688-A9D0-4A948DD3F7A9>`__ to 19.0.0 or lower
6473

65-
Otherwise, you may get errors such as ``ORA-40842: unsupported value JSON in
66-
the metadata for the field sqlType`` or ``ORA-40659: Data type does not match
67-
the specification in the collection metadata``.
74+
Otherwise, you may get errors such as ``ORA-40842: unsupported value JSON in
75+
the metadata for the field sqlType`` or ``ORA-40659: Data type does not match
76+
the specification in the collection metadata``.
6877

6978
.. _sodadb:
7079

7180
SodaDatabase Objects
7281
====================
7382

74-
.. note::
75-
76-
The SODA Database object is an extension the DB API. It is returned by the
77-
method :meth:`Connection.getSodaDatabase()`.
83+
The SODA Database object is an extension to the DB API. It is returned by the
84+
method :meth:`Connection.getSodaDatabase()`.
7885

7986

8087
SodaDatabase Methods
@@ -152,12 +159,10 @@ SodaDatabase Methods
152159
SodaCollection Objects
153160
======================
154161

155-
.. note::
156-
157-
The SODA Collection object is an extension the DB API. It is used to
158-
represent SODA collections and is created by methods
159-
:meth:`SodaDatabase.createCollection()` and
160-
:meth:`SodaDatabase.openCollection()`.
162+
The SODA Collection object is an extension to the DB API. It is used to
163+
represent SODA collections and is created by methods
164+
:meth:`SodaDatabase.createCollection()` and
165+
:meth:`SodaDatabase.openCollection()`.
161166

162167
SodaCollection Methods
163168
----------------------
@@ -361,12 +366,10 @@ SodaCollection Attributes
361366
SodaDoc Objects
362367
===============
363368

364-
.. note::
365-
366-
The SODA Document object is an extension the DB API. It is returned by the
367-
methods :meth:`SodaDatabase.createDocument()`,
368-
:meth:`SodaOperation.getDocuments()` and :meth:`SodaOperation.getOne()` as
369-
well as by iterating over :ref:`SODA document cursors <sodadoccur>`.
369+
The SODA Document object is an extension to the DB API. It is returned by the
370+
methods :meth:`SodaDatabase.createDocument()`,
371+
:meth:`SodaOperation.getDocuments()` and :meth:`SodaOperation.getOne()` as
372+
well as by iterating over :ref:`SODA document cursors <sodadoccur>`.
370373

371374
SodaDoc Methods
372375
---------------
@@ -440,12 +443,10 @@ SodaDoc Attributes
440443
SodaDocCursor Objects
441444
=====================
442445

443-
.. note::
444-
445-
The SODA Document Cursor object is an extension the DB API. It is returned
446-
by the method :meth:`SodaOperation.getCursor()` and implements the iterator
447-
protocol. Each iteration will return a :ref:`SODA document object
448-
<sodadoc>`.
446+
The SODA Document Cursor object is an extension to the DB API. It is returned
447+
by the method :meth:`SodaOperation.getCursor()` and implements the iterator
448+
protocol. Each iteration will return a :ref:`SODA document object
449+
<sodadoc>`.
449450

450451
SodaDocCursor Methods
451452
---------------------
@@ -462,11 +463,9 @@ SodaDocCursor Methods
462463
SodaOperation Objects
463464
=====================
464465

465-
.. note::
466-
467-
The SODA Operation Object is an extension to the DB API. It represents an
468-
operation that will be performed on all or some of the documents in a SODA
469-
collection. It is created by the method :meth:`SodaCollection.find()`.
466+
The SODA Operation Object is an extension to the DB API. It represents an
467+
operation that will be performed on all or some of the documents in a SODA
468+
collection. It is created by the method :meth:`SodaCollection.find()`.
470469

471470
SodaOperation Methods
472471
---------------------

0 commit comments

Comments
 (0)