mirror of
https://github.com/kennethreitz/langchain.git
synced 2026-06-05 23:00:18 +00:00
Support SQLAlchemy 2.0 (#3310)
With https://github.com/executablebooks/jupyter-cache/pull/93 merged and `MyST-NB` updated, we can now support SQLAlchemy 2. Closes #1766
This commit is contained in:
@@ -180,7 +180,7 @@ class SQLDatabase:
|
||||
|
||||
def _get_sample_rows(self, table: Table) -> str:
|
||||
# build the select command
|
||||
command = select([table]).limit(self._sample_rows_in_table_info)
|
||||
command = select(table).limit(self._sample_rows_in_table_info)
|
||||
|
||||
# save the columns in string format
|
||||
columns_str = "\t".join([col.name for col in table.columns])
|
||||
|
||||
Reference in New Issue
Block a user