summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/oracle
diff options
context:
space:
mode:
authorGord Thompson <gord@gordthompson.com>2021-11-08 11:03:54 -0700
committerGord Thompson <gord@gordthompson.com>2021-11-09 06:12:39 -0700
commitbd1be0b7e0ecd76bdf6d26fd11cc42e1a473b319 (patch)
treebcb527a334bb3da906b8c450f93f3dc3ed683a27 /lib/sqlalchemy/dialects/oracle
parentcf404d840c15fe167518dd884b295dc99ee26178 (diff)
downloadsqlalchemy-bd1be0b7e0ecd76bdf6d26fd11cc42e1a473b319.tar.gz
De-emphasize notion of "default driver" (DBAPI)
Fixes: #6960 Even though a default driver still exists for each dialect, remove most usages of `dialect://` to encourage users to explicitly specify `dialect+driver://` Change-Id: I0ad42167582df509138fca64996bbb53e379b1af
Diffstat (limited to 'lib/sqlalchemy/dialects/oracle')
-rw-r--r--lib/sqlalchemy/dialects/oracle/base.py4
-rw-r--r--lib/sqlalchemy/dialects/oracle/cx_oracle.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/sqlalchemy/dialects/oracle/base.py b/lib/sqlalchemy/dialects/oracle/base.py
index 9e62b931d..5a43205df 100644
--- a/lib/sqlalchemy/dialects/oracle/base.py
+++ b/lib/sqlalchemy/dialects/oracle/base.py
@@ -306,7 +306,7 @@ an INSERT in order to increment a sequence within an INSERT statement and get
the value back at the same time. To disable this feature across the board,
specify ``implicit_returning=False`` to :func:`_sa.create_engine`::
- engine = create_engine("oracle://scott:tiger@dsn",
+ engine = create_engine("oracle+cx_oracle://scott:tiger@dsn",
implicit_returning=False)
Implicit returning can also be disabled on a table-by-table basis as a table
@@ -450,7 +450,7 @@ the ``exclude_tablespaces`` parameter::
# exclude SYSAUX and SOME_TABLESPACE, but not SYSTEM
e = create_engine(
- "oracle://scott:tiger@xe",
+ "oracle+cx_oracle://scott:tiger@xe",
exclude_tablespaces=["SYSAUX", "SOME_TABLESPACE"])
.. versionadded:: 1.1
diff --git a/lib/sqlalchemy/dialects/oracle/cx_oracle.py b/lib/sqlalchemy/dialects/oracle/cx_oracle.py
index 38e864898..590c9d47c 100644
--- a/lib/sqlalchemy/dialects/oracle/cx_oracle.py
+++ b/lib/sqlalchemy/dialects/oracle/cx_oracle.py
@@ -158,7 +158,7 @@ SQLAlchemy's pooling::
encoding="UTF-8", nencoding="UTF-8"
)
- engine = create_engine("oracle://", creator=pool.acquire, poolclass=NullPool)
+ engine = create_engine("oracle+cx_oracle://", creator=pool.acquire, poolclass=NullPool)
The above engine may then be used normally where cx_Oracle's pool handles
connection pooling::
@@ -196,7 +196,7 @@ This can be achieved by wrapping ``pool.acquire()``::
def creator():
return pool.acquire(cclass="MYCLASS", purity=cx_Oracle.ATTR_PURITY_SELF)
- engine = create_engine("oracle://", creator=creator, poolclass=NullPool)
+ engine = create_engine("oracle+cx_oracle://", creator=creator, poolclass=NullPool)
The above engine may then be used normally where cx_Oracle handles session
pooling and Oracle Database additionally uses DRCP::