Skip to content

Commit 2475d9b

Browse files
Clarify helper function returnes desired mode and not current mode.
1 parent f1b35e8 commit 2475d9b

File tree

74 files changed

+167
-259
lines changed

Some content is hidden

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

74 files changed

+167
-259
lines changed

samples/app_context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -----------------------------------------------------------------------------
2-
# Copyright (c) 2016, 2024, Oracle and/or its affiliates.
2+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates.
33
#
44
# Portions Copyright 2007-2015, Anthony Tuininga. All rights reserved.
55
#
@@ -39,7 +39,7 @@
3939
import sample_env
4040

4141
# determine whether to use python-oracledb thin mode or thick mode
42-
if not sample_env.get_is_thin():
42+
if sample_env.run_in_thick_mode():
4343
oracledb.init_oracle_client(lib_dir=sample_env.get_oracle_client())
4444

4545
# client context attributes to be set

samples/array_dml_rowcounts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -----------------------------------------------------------------------------
2-
# Copyright (c) 2016, 2024, Oracle and/or its affiliates.
2+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates.
33
#
44
# This software is dual-licensed to you under the Universal Permissive License
55
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@@ -35,7 +35,7 @@
3535
import sample_env
3636

3737
# determine whether to use python-oracledb thin mode or thick mode
38-
if not sample_env.get_is_thin():
38+
if sample_env.run_in_thick_mode():
3939
oracledb.init_oracle_client(lib_dir=sample_env.get_oracle_client())
4040

4141
connection = oracledb.connect(

samples/batch_errors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -----------------------------------------------------------------------------
2-
# Copyright (c) 2016, 2024, Oracle and/or its affiliates.
2+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates.
33
#
44
# This software is dual-licensed to you under the Universal Permissive License
55
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@@ -37,7 +37,7 @@
3737
import sample_env
3838

3939
# determine whether to use python-oracledb thin mode or thick mode
40-
if not sample_env.get_is_thin():
40+
if sample_env.run_in_thick_mode():
4141
oracledb.init_oracle_client(lib_dir=sample_env.get_oracle_client())
4242

4343
connection = oracledb.connect(

samples/bind_insert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import sample_env
3333

3434
# determine whether to use python-oracledb thin mode or thick mode
35-
if not sample_env.get_is_thin():
35+
if sample_env.run_in_thick_mode():
3636
oracledb.init_oracle_client(lib_dir=sample_env.get_oracle_client())
3737

3838
connection = oracledb.connect(

samples/bind_query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -----------------------------------------------------------------------------
2-
# Copyright (c) 2016, 2024, Oracle and/or its affiliates.
2+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates.
33
#
44
# This software is dual-licensed to you under the Universal Permissive License
55
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@@ -37,7 +37,7 @@
3737
import sample_env
3838

3939
# determine whether to use python-oracledb thin mode or thick mode
40-
if not sample_env.get_is_thin():
40+
if sample_env.run_in_thick_mode():
4141
oracledb.init_oracle_client(lib_dir=sample_env.get_oracle_client())
4242

4343
connection = oracledb.connect(

samples/bulk_aq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
]
5555

5656
# determine whether to use python-oracledb thin mode or thick mode
57-
if not sample_env.get_is_thin():
57+
if sample_env.run_in_thick_mode():
5858
oracledb.init_oracle_client(lib_dir=sample_env.get_oracle_client())
5959

6060
# connect to database

samples/call_timeout.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -----------------------------------------------------------------------------
2-
# Copyright (c) 2019, 2024, Oracle and/or its affiliates.
2+
# Copyright (c) 2019, 2025, Oracle and/or its affiliates.
33
#
44
# This software is dual-licensed to you under the Universal Permissive License
55
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@@ -36,7 +36,7 @@
3636
import sample_env
3737

3838
# determine whether to use python-oracledb thin mode or thick mode
39-
if not sample_env.get_is_thin():
39+
if sample_env.run_in_thick_mode():
4040
oracledb.init_oracle_client(lib_dir=sample_env.get_oracle_client())
4141

4242
connection = oracledb.connect(

samples/connection_pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
POOL_ALIAS_NAME = "mypool"
8383

8484
# determine whether to use python-oracledb thin mode or thick mode
85-
if not sample_env.get_is_thin():
85+
if sample_env.run_in_thick_mode():
8686
oracledb.init_oracle_client(lib_dir=sample_env.get_oracle_client())
8787

8888

samples/dataframe_insert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
import sample_env
3838

3939
# determine whether to use python-oracledb thin mode or thick mode
40-
if not sample_env.get_is_thin():
40+
if sample_env.run_in_thick_mode():
4141
oracledb.init_oracle_client(lib_dir=sample_env.get_oracle_client())
4242

4343

samples/dataframe_numpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import sample_env
3939

4040
# determine whether to use python-oracledb thin mode or thick mode
41-
if not sample_env.get_is_thin():
41+
if sample_env.run_in_thick_mode():
4242
oracledb.init_oracle_client(lib_dir=sample_env.get_oracle_client())
4343

4444
connection = oracledb.connect(

0 commit comments

Comments
 (0)