[Langchain_community]: Corrected the imports to make them compatible with Sqlachemy <2.0 (#17653)

- Small Change in Imports in sql_database module to make it work with
Sqlachemy <2.0
 - This was identified in the following issue: #17616
This commit is contained in:
Mohammad Mohtashim 2024-02-17 02:59:08 +05:00 committed by GitHub
parent 75465a2a3c
commit 8d4547ae97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,18 +7,17 @@ import sqlalchemy
from langchain_core._api import deprecated from langchain_core._api import deprecated
from langchain_core.utils import get_from_env from langchain_core.utils import get_from_env
from sqlalchemy import ( from sqlalchemy import (
Executable,
MetaData, MetaData,
Result,
Table, Table,
create_engine, create_engine,
inspect, inspect,
select, select,
text, text,
) )
from sqlalchemy.engine import Engine from sqlalchemy.engine import Engine, Result
from sqlalchemy.exc import ProgrammingError, SQLAlchemyError from sqlalchemy.exc import ProgrammingError, SQLAlchemyError
from sqlalchemy.schema import CreateTable from sqlalchemy.schema import CreateTable
from sqlalchemy.sql.expression import Executable
from sqlalchemy.types import NullType from sqlalchemy.types import NullType