Skip to content

Commit 36b1f84

Browse files
groundracemdrxy
andauthored
Update sql_database.py to support materialized view (#281)
add support for materialized views see langchain-ai/langchain#32217 --------- Co-authored-by: Mason Daugherty <[email protected]> Co-authored-by: Mason Daugherty <[email protected]>
1 parent 3817581 commit 36b1f84

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libs/community/langchain_community/utilities/sql_database.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ def __init__(
110110
self._all_tables = set(
111111
list(self._inspector.get_table_names(schema=schema))
112112
+ (self._inspector.get_view_names(schema=schema) if view_support else [])
113+
+ (
114+
self._inspector.get_materialized_view_names(schema=schema)
115+
if view_support
116+
else []
117+
)
113118
)
114119

115120
self._include_tables = set(include_tables) if include_tables else set()

0 commit comments

Comments
 (0)