mirror of
https://github.com/hwchase17/langchain.git
synced 2025-10-27 21:59:29 +00:00
Fix sqlalchemy warnings when running tests (#733)
This has been bugging me when running my own tests that call langchain methods :P
This commit is contained in:
@@ -86,7 +86,7 @@ class SQLDatabase:
|
||||
If the statement returns rows, a string of the results is returned.
|
||||
If the statement returns no rows, an empty string is returned.
|
||||
"""
|
||||
with self._engine.connect() as connection:
|
||||
with self._engine.begin() as connection:
|
||||
if self._schema is not None:
|
||||
connection.exec_driver_sql(f"SET search_path TO {self._schema}")
|
||||
cursor = connection.exec_driver_sql(command)
|
||||
|
||||
Reference in New Issue
Block a user