@@ -44,7 +44,7 @@ def register_connection(self, client: Any, module_name: str, alias: str):
4444 logger .warn (f"Overwriting not closed connection for alias = '{ alias } '" )
4545 self ._connections [alias ] = Connection (client , module_name )
4646
47- def get_connection (self , alias : Optional [str ]):
47+ def get_connection (self , alias : Optional [str ]) -> Connection :
4848 """
4949 Return connection with given alias.
5050
@@ -61,7 +61,7 @@ def get_connection(self, alias: Optional[str]):
6161 raise ValueError (f"Alias '{ alias } ' not found in existing connections." )
6262 return self ._connections [alias ]
6363
64- def pop_connection (self , alias : Optional [str ]):
64+ def pop_connection (self , alias : Optional [str ]) -> Connection :
6565 if not self ._connections :
6666 return None
6767 if not alias :
@@ -639,7 +639,10 @@ def set_auto_commit(
639639 | Set Auto Commit | True | alias=postgres |
640640 """
641641 db_connection = self .connection_store .get_connection (alias )
642- db_connection .client .autocommit = auto_commit
642+ if db_connection .module_name == "jaydebeapi" :
643+ db_connection .client .jconn .setAutoCommit (auto_commit )
644+ else :
645+ db_connection .client .autocommit = auto_commit
643646
644647 def switch_database (self , alias : str ):
645648 """
0 commit comments