Skip to content

Commit 8567281

Browse files
authored
Merge branch 'erezsh:master' into master
2 parents 2bee74d + 164f62d commit 8567281

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

sqeleton/databases/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ def _query_cursor(self, c, sql_code: CompiledCode) -> Optional[QueryResult]:
565565
assert isinstance(sql_code, CompiledCode), sql_code
566566
try:
567567
logger.debug(f"{self.name} Executing SQL: {sql_code.code} || {sql_code.args}")
568-
c.execute(sql_code.code, sql_code.args or None)
568+
c.execute(sql_code.code, sql_code.args or ())
569569
# insert, delete and update may return values if they have the "returning" clause.
570570
if sql_code.type is not None or sql_code.code.lstrip().lower().startswith(
571571
("select", "explain", "show", "with")

sqeleton/databases/oracle.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,12 @@ class Oracle(ThreadedDatabase):
171171
CONNECT_URI_PARAMS = ["database?"]
172172

173173
def __init__(self, *, host, database, thread_count, **kw):
174-
self.kwargs = dict(dsn=f"{host}/{database}" if database else host, **kw)
174+
175+
self.kwargs = kw
176+
177+
# Build dsn if not present
178+
if "dsn" not in kw:
179+
self.kwargs["dsn"] = f"{host}/{database}" if database else host
175180

176181
self.default_schema = kw.get("user").upper()
177182

0 commit comments

Comments
 (0)