Skip to content

Commit 0bd0ff9

Browse files
committed
partially revert last commit
1 parent 462e984 commit 0bd0ff9

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

‎plsql/client.py‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ def __call__(self, **kwargs):
156156
for func, data_type in [
157157
(oracle_plsql_record, "PL/SQL RECORD"),
158158
(oracle_plsql_table, "PL/SQL TABLE"),
159-
(oracle_table, "TABLE"),
160159
]
161160
)
162161

@@ -355,10 +354,17 @@ def __iter__(self):
355354

356355
class Database:
357356
def __init__(
358-
self, user: str, password: str, sid: str, encoding: str,
357+
self,
358+
user: str,
359+
password: str,
360+
host: str,
361+
port: int,
362+
service_name: str,
363+
encoding: str,
359364
):
365+
dsn = oracle.makedsn(host, port, service_name=service_name)
360366
self.connection = oracle.connect(
361-
user, password, sid, encoding=encoding, nencoding=encoding
367+
user=user, password=password, dsn=dsn, encoding=encoding, nencoding=encoding
362368
)
363369

364370
def execute_immediate(self, dynamic_string: str):

0 commit comments

Comments
 (0)