Minor tweaks to samples and documentation to take into account recent… · elderdo/python-cx_Oracle@543c1b9 · GitHub
Skip to content

Commit 543c1b9

Browse files
Minor tweaks to samples and documentation to take into account recent changes.
1 parent b199c5d commit 543c1b9

6 files changed

Lines changed: 15 additions & 15 deletions

File tree

doc/src/user_guide/sql_execution.rst

Lines changed: 2 additions & 2 deletions

samples/JSONBLOB.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
# Documentation:
1313
# cx_Oracle: https://cx-oracle.readthedocs.io/en/latest/user_guide/json_data_type.html
1414
# Oracle Database: https://www.oracle.com/pls/topic/lookup?ctx=dblatest&id=ADJSN
15-
##------------------------------------------------------------------------------
15+
#
16+
#------------------------------------------------------------------------------
1617

1718
import sys
1819
import json

samples/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This directory contains samples for cx_Oracle.
55
requires SYSDBA privileges and will prompt for these credentials as well as
66
the names of the schemas and edition that will be created, unless a number
77
of environment variables are set as documented in the Python script
8-
[SampleEnv.py][2]. Run the script using the following command:
8+
[sample_env.py][2]. Run the script using the following command:
99

1010
python SetupSamples.py
1111

@@ -24,7 +24,7 @@ This directory contains samples for cx_Oracle.
2424
requires SYSDBA privileges and will prompt for these credentials as well as
2525
the names of the schemas and edition that will be dropped, unless a number
2626
of environment variables are set as documented in the Python script
27-
[SampleEnv.py][2]. Run the script using the following command:
27+
[sample_env.py][2]. Run the script using the following command:
2828

2929
python DropSamples.py
3030

samples/sample_env.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ def get_main_connect_string(password=None):
102102
return "%s/%s@%s" % (get_main_user(), password, get_connect_string())
103103

104104
def get_drcp_connect_string():
105-
connectString = get_value("DRCP_CONNECT_STRING", "DRCP Connect String",
106-
DEFAULT_DRCP_CONNECT_STRING)
107-
return "%s/%s@%s" % (get_main_user(), get_main_password(), connectString)
105+
connect_string = get_value("DRCP_CONNECT_STRING", "DRCP Connect String",
106+
DEFAULT_DRCP_CONNECT_STRING)
107+
return "%s/%s@%s" % (get_main_user(), get_main_password(), connect_string)
108108

109109
def get_edition_connect_string():
110110
return "%s/%s@%s" % \
@@ -143,9 +143,9 @@ def run_sql_script(conn, script_name, **kwargs):
143143
order by name, type, line, position""",
144144
owner = get_main_user())
145145
prev_name = prev_obj_type = None
146-
for name, objType, lineNum, position, text in cursor:
147-
if name != prev_name or objType != prev_obj_type:
148-
print("%s (%s)" % (name, objType))
146+
for name, obj_type, line_num, position, text in cursor:
147+
if name != prev_name or obj_type != prev_obj_type:
148+
print("%s (%s)" % (name, obj_type))
149149
prev_name = name
150-
prev_obj_type = objType
151-
print(" %s/%s %s" % (lineNum, position, text))
150+
prev_obj_type = obj_type
151+
print(" %s/%s %s" % (line_num, position, text))

samples/sql/SetupSamplesExec.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,4 +556,3 @@ create or replace package body &main_user..pkg_SessionCallback as
556556

557557
end;
558558
/
559-

samples/tutorial/sql/SampleEnv.sql

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)