class_docstr: Can't modify signature, as LangChain does a Pydantic check.
class_docstr_tok: ["Ca","n't","modify","signature",",","as","LangChain","does","a","Pydantic","check","."]
docstr: Execute a SQL command and return a string representing the results.
  If the statement returns rows, a string of the results is returned.
  If the statement returns no rows, an empty string is returned.
docstr_tok: ["Execute","a","SQL","command","and","return","a","string","representing","the","results",".","If","the","statement","returns","rows",",","a","string","of","the","results","is","returned",".","If","the","statement","returns","no","rows",",","an","empty","string","is","returned","."]
code: def run(self, command: str, fetch: str = "all") -> str:
      """Execute a SQL command and return a string representing the results.
      If the statement returns rows, a string of the results is returned.
      If the statement returns no rows, an empty string is returned.
      """
  
      def _tidy(result: List) -> str:
          return "\n".join(
              [
                  "\t".join([str(value) for value in row])
                  for row in result
              ]
          )
  
      ret = self._call_engine([command])
      if fetch == "all":
          result = _tidy(ret.data)
      elif fetch == "one":
          result = _tidy(ret.data[0])
      else:
          raise ValueError(
              "Fetch parameter must be either 'one' or 'all'"
          )
      return str(result)
  
file_path: mindsdb/mindsdb/integrations/handlers/langchain_handler/mindsdb_database_agent.py
imports: import warnings
  from typing import Iterable, List, Optional
  from mindsdb_sql import parse_sql
  from langchain.sql_database import SQLDatabase
  from mindsdb.utilities import log
label_desc: Use image node_id 10 for calling the MindsDBSQL obj's underlying member method code with example usage: obj.run(command, fetch) and returns: str, str