Skip to content

Commit 4b72d0d

Browse files
Rename samples and test files in order to be consistent.
1 parent 74d16d8 commit 4b72d0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+200
-196
lines changed

Diff for: doc/src/api_manual/cursor.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Cursor Object
6868
contiguous keys. For PL/SQL associative arrays with sparsely populated keys
6969
or for varrays and nested tables, the approach shown in this
7070
`example <https://github.com/oracle/python-cx_Oracle/blob/master/
71-
samples/PLSQLCollection.py>`__ needs to be used.
71+
samples/plsql_collection.py>`__ needs to be used.
7272

7373
.. note::
7474

Diff for: doc/src/release_notes.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -1001,10 +1001,10 @@ Version 6.0 beta 1 (April 2017)
10011001
#) Added parameter edition to the :meth:`cx_Oracle.SessionPool` method.
10021002
#) Added support for
10031003
`universal rowids <https://github.com/oracle/python-cx_Oracle/blob/master/
1004-
samples/UniversalRowids.py>`__.
1004+
samples/universal_rowids.py>`__.
10051005
#) Added support for `DML Returning of multiple rows
10061006
<https://github.com/oracle/python-cx_Oracle/blob/master/samples/
1007-
DMLReturningMultipleRows.py>`__.
1007+
dml_returning_multiple_rows.py>`__.
10081008
#) Added attributes :attr:`Variable.actualElements` and
10091009
:attr:`Variable.values` to variables.
10101010
#) Added parameters region, sharding_key and super_sharding_key to the
@@ -1033,19 +1033,19 @@ Version 6.0 beta 1 (April 2017)
10331033
#) Dropped deprecated parameters action, module and clientinfo from the
10341034
:meth:`cx_Oracle.connect` method. The appcontext parameter should be used
10351035
instead as shown in this `sample <https://github.com/oracle/
1036-
python-cx_Oracle/blob/master/samples/AppContext.py>`__.
1036+
python-cx_Oracle/blob/master/samples/app_context.py>`__.
10371037
#) Dropped deprecated attribute numbersAsString from
10381038
:ref:`cursor objects <cursorobj>`. Use an output type handler instead as
10391039
shown in this `sample <https://github.com/oracle/python-cx_Oracle/blob/
1040-
master/samples/ReturnNumbersAsDecimals.py>`__.
1040+
master/samples/return_numbers_as_decimals.py>`__.
10411041
#) Dropped deprecated attributes cqqos and rowids from
10421042
:ref:`subscription objects <subscrobj>`. Use the qos attribute instead as
10431043
shown in this `sample <https://github.com/oracle/python-cx_Oracle/blob/
1044-
master/samples/CQN.py>`__.
1044+
master/samples/cqn.py>`__.
10451045
#) Dropped deprecated parameters cqqos and rowids from the
10461046
:meth:`Connection.subscribe()` method. Use the qos parameter instead as
10471047
shown in this `sample <https://github.com/oracle/python-cx_Oracle/blob/
1048-
master/samples/CQN.py>`__.
1048+
master/samples/cqn.py>`__.
10491049

10501050

10511051
Version 5.3 (March 2017)

Diff for: doc/src/user_guide/cqn.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,5 +153,5 @@ which should print something like the following::
153153
INSERT of rowid: AAA7EsAAHAAAFS/AAA
154154

155155
See `GitHub Samples
156-
<https://github.com/oracle/python-cx_Oracle/blob/master/samples/CQN.py>`__
156+
<https://github.com/oracle/python-cx_Oracle/blob/master/samples/cqn.py>`__
157157
for a runnable CQN example.

Diff for: doc/src/user_guide/ha.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,4 @@ In the Python application code:
213213

214214
See the `Transaction Guard Sample
215215
<https://github.com/oracle/python-cx_Oracle/blob/master/
216-
samples/TransactionGuard.py>`__ for further details.
216+
samples/transaction_guard.py>`__ for further details.

Diff for: doc/src/user_guide/sql_execution.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ should be used.
289289

290290
Examples of output handlers are shown in :ref:`numberprecision`,
291291
:ref:`directlobs` and :ref:`fetching-raw-data`. Also see samples such as `samples/TypeHandlers.py
292-
<https://github.com/oracle/python-cx_Oracle/blob/master/samples/TypeHandlers.py>`__
292+
<https://github.com/oracle/python-cx_Oracle/blob/master/samples/type_handlers.py>`__
293293

294294
.. _numberprecision:
295295

@@ -340,8 +340,8 @@ The Python ``decimal.Decimal`` converter gets called with the string
340340
representation of the Oracle number. The output from ``decimal.Decimal`` is
341341
returned in the output tuple.
342342

343-
See `samples/ReturnNumbersAsDecimals.py
344-
<https://github.com/oracle/python-cx_Oracle/blob/master/samples/ReturnNumbersAsDecimals.py>`__
343+
See `samples/return_numbers_as_decimals.py
344+
<https://github.com/oracle/python-cx_Oracle/blob/master/samples/return_numbers_as_decimals.py>`__
345345

346346

347347
.. _fetching-raw-data:

Diff for: doc/src/user_guide/tracing_sql.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ In production applications be careful not to log sensitive information.
6666

6767
See `Subclassing.py
6868
<https://github.com/oracle/python-cx_Oracle/blob/master/
69-
samples/Subclassing.py>`__ for an example.
69+
samples/subclassing.py>`__ for an example.
7070

7171

7272
.. _endtoendtracing:

Diff for: samples/README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,43 @@
33
This directory contains samples for [cx_Oracle][6]. Documentation is [here][7].
44

55
1. The schemas and SQL objects that are referenced in the samples can be
6-
created by running the Python script [SetupSamples.py][1]. The script
6+
created by running the Python script [setup_samples.py][1]. The script
77
requires SYSDBA privileges and will prompt for these credentials as well as
88
the names of the schemas and edition that will be created, unless a number
99
of environment variables are set as documented in the Python script
1010
[sample_env.py][2]. Run the script using the following command:
1111

12-
python SetupSamples.py
12+
python setup_samples.py
1313

1414
Alternatively, the [SQL script][3] can be run directly via SQL\*Plus, which
1515
will always prompt for the names of the schemas and edition that will be
1616
created.
1717

18-
sqlplus sys/syspassword@hostname/servicename @sql/SetupSamples.sql
18+
sqlplus sys/syspassword@hostname/servicename @sql/setup_samples.sql
1919

2020
2. Run a Python script, for example:
2121

2222
python Query.py
2323

2424
3. After running cx_Oracle samples, the schemas and SQL objects can be
25-
dropped by running the Python script [DropSamples.py][4]. The script
25+
dropped by running the Python script [drop_samples.py][4]. The script
2626
requires SYSDBA privileges and will prompt for these credentials as well as
2727
the names of the schemas and edition that will be dropped, unless a number
2828
of environment variables are set as documented in the Python script
2929
[sample_env.py][2]. Run the script using the following command:
3030

31-
python DropSamples.py
31+
python drop_samples.py
3232

3333
Alternatively, the [SQL script][5] can be run directly via SQL\*Plus, which
3434
will always prompt for the names of the schemas and edition that will be
3535
dropped.
3636

37-
sqlplus sys/syspassword@hostname/servicename @sql/DropSamples.sql
37+
sqlplus sys/syspassword@hostname/servicename @sql/drop_samples.sql
3838

39-
[1]: https://github.com/oracle/python-cx_Oracle/blob/master/samples/SetupSamples.py
40-
[2]: https://github.com/oracle/python-cx_Oracle/blob/master/samples/SampleEnv.py
41-
[3]: https://github.com/oracle/python-cx_Oracle/blob/master/samples/sql/SetupSamples.sql
42-
[4]: https://github.com/oracle/python-cx_Oracle/blob/master/samples/DropSamples.py
43-
[5]: https://github.com/oracle/python-cx_Oracle/blob/master/samples/sql/DropSamples.sql
39+
[1]: https://github.com/oracle/python-cx_Oracle/blob/master/samples/setup_samples.py
40+
[2]: https://github.com/oracle/python-cx_Oracle/blob/master/samples/sample_env.py
41+
[3]: https://github.com/oracle/python-cx_Oracle/blob/master/samples/sql/setup_samples.sql
42+
[4]: https://github.com/oracle/python-cx_Oracle/blob/master/samples/drop_samples.py
43+
[5]: https://github.com/oracle/python-cx_Oracle/blob/master/samples/sql/drop_samples.sql
4444
[6]: https://oracle.github.io/python-cx_Oracle/
4545
[7]: http://cx-oracle.readthedocs.org/en/latest/index.html

Diff for: samples/AppContext.py renamed to samples/app_context.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
33
#
44
# Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
55
#
@@ -8,7 +8,7 @@
88
#------------------------------------------------------------------------------
99

1010
#------------------------------------------------------------------------------
11-
# AppContext.py
11+
# app_context.py
1212
# This script demonstrates the use of application context. Application
1313
# context is available within logon triggers and can be retrieved by using the
1414
# function sys_context().

Diff for: samples/AdvancedQueuingNotification.py renamed to samples/aq_notification.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
33
#------------------------------------------------------------------------------
44

55
#------------------------------------------------------------------------------
6-
# AdvancedQueuingNotification.py
6+
# aq_notification.py
77
# This script demonstrates using advanced queuing notification. Once this
88
# script is running, use another session to enqueue a few messages to the
99
# "DEMO_BOOK_QUEUE" queue. This is most easily accomplished by running the
10-
# ObjectAQ.py sample.
10+
# object_aq.py sample.
1111
#
1212
# This script requires cx_Oracle 6.4 and higher.
1313
#------------------------------------------------------------------------------

Diff for: samples/ArrayDMLRowCounts.py renamed to samples/array_dml_rowcounts.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
33
#------------------------------------------------------------------------------
44

55
#------------------------------------------------------------------------------
6-
# ArrayDMLRowCounts.py
6+
# array_dml_rowcounts.py
77
#
88
# Demonstrate the use of the 12.1 feature that allows cursor.executemany()
99
# to return the number of rows affected by each individual execution as a list.

Diff for: samples/BatchErrors.py renamed to samples/batch_errors.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
33
#------------------------------------------------------------------------------
44

55
#------------------------------------------------------------------------------
6-
# BatchErrors.py
6+
# batch_errors.py
77
#
88
# Demonstrate the use of the Oracle Database 12.1 feature that allows
99
# cursor.executemany() to complete successfully, even if errors take

Diff for: samples/BindInsert.py renamed to samples/bind_insert.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
33
#------------------------------------------------------------------------------
44

55
#------------------------------------------------------------------------------
6-
# BindInsert.py
6+
# bind_insert.py
77
#
88
# Demonstrate how to insert a row into a table using bind variables.
99
#------------------------------------------------------------------------------

Diff for: samples/BindQuery.py renamed to samples/bind_query.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
33
#------------------------------------------------------------------------------
44

55
#------------------------------------------------------------------------------
6-
# BindQuery.py
6+
# bind_query.py
77
#
88
# Demonstrate how to perform a simple query limiting the rows retrieved using
99
# a bind variable. Since the query that is executed is identical, no additional

Diff for: samples/BulkAQ.py renamed to samples/bulk_aq.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
33
#
44
# Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
55
#
@@ -8,7 +8,7 @@
88
#------------------------------------------------------------------------------
99

1010
#------------------------------------------------------------------------------
11-
# BulkAQ.py
11+
# bulk_aq.py
1212
# This script demonstrates how to use bulk enqueuing and dequeuing of
1313
# messages with advanced queuing using cx_Oracle. It makes use of a RAW queue
1414
# created in the sample setup.

Diff for: samples/CallTimeout.py renamed to samples/call_timeout.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
33
#------------------------------------------------------------------------------
44

55
#------------------------------------------------------------------------------
6-
# CallTimeout.py
6+
# call_timeout.py
77
#
88
# Demonstrate the use of the Oracle Client 18c feature that enables round trips
99
# to the database to time out if a specified amount of time (in milliseconds)

Diff for: samples/ConnectionPool.py renamed to samples/connection_pool.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
33
#------------------------------------------------------------------------------
44

55
#------------------------------------------------------------------------------
6-
# ConnectionPool.py
6+
# connection_pool.py
77
# This script demonstrates the use of connection pooling in cx_Oracle. Pools
88
# can significantly reduce connection times for long running applications that
99
# repeatedly open and close connections. Internal features help protect against
@@ -16,7 +16,7 @@
1616
# the 'threaded' parameter to True. Note only one operation (such as an execute
1717
# or fetch) can take place at a time on each connection.
1818
#
19-
# Also see SessionCallback.py.
19+
# Also see session_callback.py.
2020
#
2121
#------------------------------------------------------------------------------
2222

Diff for: samples/CQN.py renamed to samples/cqn.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
33
#
44
# Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
55
#
@@ -8,7 +8,7 @@
88
#------------------------------------------------------------------------------
99

1010
#------------------------------------------------------------------------------
11-
# CQN.py
11+
# cqn.py
1212
# This script demonstrates using continuous query notification in Python, a
1313
# feature that is available in Oracle 11g and later. Once this script is
1414
# running, use another session to insert, update or delete rows from the table

Diff for: samples/CQN2.py renamed to samples/cqn2.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
33
#------------------------------------------------------------------------------
44

55
#------------------------------------------------------------------------------
6-
# CQN2.py
6+
# cqn2.py
77
# This script demonstrates using continuous query notification in Python, a
88
# feature that is available in Oracle 11g and later. Once this script is
99
# running, use another session to insert, update or delete rows from the table
1010
# cx_Oracle.TestTempTable and you will see the notification of that change.
1111
#
12-
# This script differs from CQN.py in that it shows how a connection can be
12+
# This script differs from cqn.py in that it shows how a connection can be
1313
# acquired from a session pool and used to query the changes that have been
1414
# made.
1515
#

Diff for: samples/DatabaseChangeNotification.py renamed to samples/database_change_notification.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
33
#
44
# Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
55
#
@@ -8,7 +8,7 @@
88
#------------------------------------------------------------------------------
99

1010
#------------------------------------------------------------------------------
11-
# DatabaseChangeNotification.py
11+
# database_change_notification.py
1212
# This script demonstrates using database change notification in Python, a
1313
# feature that is available in Oracle 10g Release 2. Once this script is
1414
# running, use another session to insert, update or delete rows from the table

Diff for: samples/DatabaseShutdown.py renamed to samples/database_shutdown.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
33
#
44
# Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
55
#
@@ -8,10 +8,10 @@
88
#------------------------------------------------------------------------------
99

1010
#------------------------------------------------------------------------------
11-
# DatabaseShutdown.py
12-
# This script demonstrates shutting down a database using Python. It is only
13-
# possible in Oracle 10g Release 2 and higher. The connection used assumes that
14-
# the environment variable ORACLE_SID has been set.
11+
# database_shutdown.py
12+
# This script demonstrates shutting down a database using Python. The
13+
# connection used assumes that the environment variable ORACLE_SID has been
14+
# set.
1515
#
1616
# This script requires cx_Oracle 4.3 and higher.
1717
#------------------------------------------------------------------------------

Diff for: samples/DatabaseStartup.py renamed to samples/database_startup.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
33
#
44
# Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
55
#
@@ -8,10 +8,10 @@
88
#------------------------------------------------------------------------------
99

1010
#------------------------------------------------------------------------------
11-
# DatabaseStartup.py
12-
# This script demonstrates starting up a database using Python. It is only
13-
# possible in Oracle 10g Release 2 and higher. The connection used assumes that
14-
# the environment variable ORACLE_SID has been set.
11+
# database_startup.py
12+
# This script demonstrates starting up a database using Python. The
13+
# connection used assumes that the environment variable ORACLE_SID has been
14+
# set.
1515
#
1616
# This script requires cx_Oracle 4.3 and higher.
1717
#------------------------------------------------------------------------------

Diff for: samples/DbmsOutput.py renamed to samples/dbms_output.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
33
#------------------------------------------------------------------------------
44

55
#------------------------------------------------------------------------------
6-
# DbmsOutput.py
6+
# dbms_output.py
77
# This script demonstrates one method of fetching the lines produced by
88
# the DBMS_OUTPUT package.
99
#------------------------------------------------------------------------------

Diff for: samples/DMLReturningMultipleRows.py renamed to samples/dml_returning_multiple_rows.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#------------------------------------------------------------------------------
2-
# Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
33
#
44
# Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
55
#
@@ -8,7 +8,7 @@
88
#------------------------------------------------------------------------------
99

1010
#------------------------------------------------------------------------------
11-
# DMLReturningMultipleRows.py
11+
# dml_returning_multiple_rows.py
1212
# This script demonstrates the use of DML returning with multiple rows being
1313
# returned at once.
1414
#

0 commit comments

Comments
 (0)