mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-21 14:18:52 +00:00
community[patch]: support for Sybase SQL anywhere added. (#14821)
- **Description:** support for Sybase SQL anywhere added in sql_database.py file at path langchain\libs\community\langchain_community\utilities - **Issue:** It will resolve default schema setting for Sybase SQL anywhere - **Dependencies:** No, - **Tag maintainer:** @baskaryan, @eyurtsev, @hwchase17, - **Twitter handle:** NA --------- Co-authored-by: learn360sujeet <121271779+learn360sujeet@users.noreply.github.com> Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
parent
1acc7ffa3f
commit
f1d3f29bc4
@ -405,6 +405,10 @@ class SQLDatabase:
|
||||
connection.exec_driver_sql(
|
||||
f"ALTER SESSION SET CURRENT_SCHEMA = {self._schema}"
|
||||
)
|
||||
elif self.dialect == "sqlany":
|
||||
# If anybody using Sybase SQL anywhere database then it should not
|
||||
# go to else condition. It should be same as mssql.
|
||||
pass
|
||||
else: # postgresql and other compatible dialects
|
||||
connection.exec_driver_sql("SET search_path TO %s", (self._schema,))
|
||||
cursor = connection.execute(text(command))
|
||||
|
Loading…
Reference in New Issue
Block a user