Skip to content

Commit 84ee130

Browse files
Adjust data values to clarify distinction between "parent" and "child" values.
1 parent c8c44ff commit 84ee130

File tree

4 files changed

+35
-35
lines changed

4 files changed

+35
-35
lines changed

samples/ArrayDMLRowCounts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#------------------------------------------------------------------------------
2-
# Copyright 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright 2016, 2018, Oracle and/or its affiliates. All rights reserved.
33
#------------------------------------------------------------------------------
44

55
#------------------------------------------------------------------------------
@@ -32,7 +32,7 @@
3232
print()
3333

3434
# delete the following parent IDs only
35-
parentIdsToDelete = [2, 3, 5]
35+
parentIdsToDelete = [20, 30, 50]
3636

3737
print("Deleting Parent IDs:", parentIdsToDelete)
3838
print()

samples/BatchErrors.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#------------------------------------------------------------------------------
2-
# Copyright 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright 2016, 2018, Oracle and/or its affiliates. All rights reserved.
33
#------------------------------------------------------------------------------
44

55
#------------------------------------------------------------------------------
@@ -25,14 +25,14 @@
2525

2626
# define data to insert
2727
dataToInsert = [
28-
(1016, 1, 'Child 2 of Parent 1'),
29-
(1017, 1, 'Child 3 of Parent 1'),
30-
(1018, 2, 'Child 4 of Parent 2'),
31-
(1018, 2, 'Child 4 of Parent 2'), # duplicate key
32-
(1019, 3, 'Child 3 of Parent 3'),
33-
(1020, 3, 'Child 4 of Parent 4'),
34-
(1021, 6, 'Child 1 of Parent 6'), # parent does not exist
35-
(1022, 4, 'Child 6 of Parent 4'),
28+
(1016, 10, 'Child B of Parent 10'),
29+
(1017, 10, 'Child C of Parent 10'),
30+
(1018, 20, 'Child D of Parent 20'),
31+
(1018, 20, 'Child D of Parent 20'), # duplicate key
32+
(1019, 30, 'Child C of Parent 30'),
33+
(1020, 30, 'Child D of Parent 40'),
34+
(1021, 60, 'Child A of Parent 60'), # parent does not exist
35+
(1022, 40, 'Child F of Parent 40'),
3636
]
3737

3838
# retrieve the number of rows in the table

samples/Subclassing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#------------------------------------------------------------------------------
2-
# Copyright 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright 2016, 2018, Oracle and/or its affiliates. All rights reserved.
33
#------------------------------------------------------------------------------
44

55
#------------------------------------------------------------------------------
@@ -50,7 +50,7 @@ def fetchone(self):
5050
cursor = connection.cursor()
5151

5252
# demonstrate that the subclassed connection and cursor are being used
53-
cursor.execute("select count(*) from ChildTable where ParentId = :1", (3,))
53+
cursor.execute("select count(*) from ChildTable where ParentId = :1", (30,))
5454
count, = cursor.fetchone()
5555
print("COUNT:", int(count))
5656

samples/sql/SetupSamples.sql

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*-----------------------------------------------------------------------------
2-
* Copyright 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright 2017, 2018, Oracle and/or its affiliates. All rights reserved.
33
*---------------------------------------------------------------------------*/
44

55
/*-----------------------------------------------------------------------------
@@ -202,27 +202,27 @@ begin
202202
end;
203203
/
204204

205-
insert into &main_user..ParentTable values (1, 'Parent 1');
206-
insert into &main_user..ParentTable values (2, 'Parent 2');
207-
insert into &main_user..ParentTable values (3, 'Parent 3');
208-
insert into &main_user..ParentTable values (4, 'Parent 4');
209-
insert into &main_user..ParentTable values (5, 'Parent 5');
210-
211-
insert into &main_user..ChildTable values (1001, 1, 'Child 1 of Parent 1');
212-
insert into &main_user..ChildTable values (1002, 2, 'Child 1 of Parent 2');
213-
insert into &main_user..ChildTable values (1003, 2, 'Child 2 of Parent 2');
214-
insert into &main_user..ChildTable values (1004, 2, 'Child 3 of Parent 2');
215-
insert into &main_user..ChildTable values (1005, 3, 'Child 1 of Parent 3');
216-
insert into &main_user..ChildTable values (1006, 3, 'Child 2 of Parent 3');
217-
insert into &main_user..ChildTable values (1007, 4, 'Child 1 of Parent 4');
218-
insert into &main_user..ChildTable values (1008, 4, 'Child 2 of Parent 4');
219-
insert into &main_user..ChildTable values (1009, 4, 'Child 3 of Parent 4');
220-
insert into &main_user..ChildTable values (1010, 4, 'Child 4 of Parent 4');
221-
insert into &main_user..ChildTable values (1011, 4, 'Child 5 of Parent 4');
222-
insert into &main_user..ChildTable values (1012, 5, 'Child 1 of Parent 5');
223-
insert into &main_user..ChildTable values (1013, 5, 'Child 2 of Parent 5');
224-
insert into &main_user..ChildTable values (1014, 5, 'Child 3 of Parent 5');
225-
insert into &main_user..ChildTable values (1015, 5, 'Child 4 of Parent 5');
205+
insert into &main_user..ParentTable values (10, 'Parent 10');
206+
insert into &main_user..ParentTable values (20, 'Parent 20');
207+
insert into &main_user..ParentTable values (30, 'Parent 30');
208+
insert into &main_user..ParentTable values (40, 'Parent 40');
209+
insert into &main_user..ParentTable values (50, 'Parent 50');
210+
211+
insert into &main_user..ChildTable values (1001, 10, 'Child A of Parent 10');
212+
insert into &main_user..ChildTable values (1002, 20, 'Child A of Parent 20');
213+
insert into &main_user..ChildTable values (1003, 20, 'Child B of Parent 20');
214+
insert into &main_user..ChildTable values (1004, 20, 'Child C of Parent 20');
215+
insert into &main_user..ChildTable values (1005, 30, 'Child A of Parent 30');
216+
insert into &main_user..ChildTable values (1006, 30, 'Child B of Parent 30');
217+
insert into &main_user..ChildTable values (1007, 40, 'Child A of Parent 40');
218+
insert into &main_user..ChildTable values (1008, 40, 'Child B of Parent 40');
219+
insert into &main_user..ChildTable values (1009, 40, 'Child C of Parent 40');
220+
insert into &main_user..ChildTable values (1010, 40, 'Child D of Parent 40');
221+
insert into &main_user..ChildTable values (1011, 40, 'Child E of Parent 40');
222+
insert into &main_user..ChildTable values (1012, 50, 'Child A of Parent 50');
223+
insert into &main_user..ChildTable values (1013, 50, 'Child B of Parent 50');
224+
insert into &main_user..ChildTable values (1014, 50, 'Child C of Parent 50');
225+
insert into &main_user..ChildTable values (1015, 50, 'Child D of Parent 50');
226226

227227
insert into &main_user..SampleQueryTab values (1, 'Anthony');
228228
insert into &main_user..SampleQueryTab values (2, 'Barbie');

0 commit comments

Comments
 (0)