Skip to content

Commit d445143

Browse files
committed
fix: handle set_isolation_level gracefully
Whenever the sqlachemy tries to use set_isolation_level without it being defined it will cast `object has no attribute 'set_isolation_level'` instead of gracefully handling the error by explicitly raising it is not implemented.
1 parent 07aa510 commit d445143

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

duckdb_engine/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ def _get_server_version_info(self, connection: "Connection") -> Tuple[int, int]:
330330
def get_default_isolation_level(self, connection: "Connection") -> None:
331331
raise NotImplementedError()
332332

333+
def set_isolation_level(self, connection: "Connection", level: str) -> None:
334+
raise NotImplementedError()
335+
333336
def do_rollback(self, connection: "Connection") -> None:
334337
try:
335338
super().do_rollback(connection)

0 commit comments

Comments
 (0)