mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-11 22:09:44 +00:00
feat(agent): Multi agent sdk (#976)
Co-authored-by: xtyuns <xtyuns@163.com> Co-authored-by: Fangyin Cheng <staneyffer@gmail.com> Co-authored-by: csunny <cfqsunny@163.com> Co-authored-by: qidanrui <qidanrui@gmail.com>
This commit is contained in:
@@ -334,7 +334,7 @@ class RDBMSDatabase(BaseConnect):
|
||||
"""
|
||||
print(f"Query[{query}]")
|
||||
if not query:
|
||||
return []
|
||||
return [], None
|
||||
cursor = self.session.execute(text(query))
|
||||
if cursor.returns_rows:
|
||||
if fetch == "all":
|
||||
@@ -347,7 +347,7 @@ class RDBMSDatabase(BaseConnect):
|
||||
|
||||
result = list(result)
|
||||
return field_names, result
|
||||
return []
|
||||
return [], None
|
||||
|
||||
def run(self, command: str, fetch: str = "all") -> List:
|
||||
"""Execute a SQL command and return a string representing the results."""
|
||||
|
Reference in New Issue
Block a user