class_docstr: Base class for handling database operations.
  
  Args:
      name (str): The name associated with the database handler instance.
class_docstr_tok: ["Base","class","for","handling","database","operations",".","Args",":","name","(","str",")",":","The","name","associated","with","the","database","handler","instance","."]
docstr: Returns a generator that yields the data from the given table, or the data.
  Args:
      table_name (str): name of the table whose data is to be retrieved.
  Returns:
      DBHandlerResponse: An instance of DBHandlerResponse containing the data, data generator, or an error message. Data is in a pandas DataFrame.
  
  Raises:
      NotImplementedError: The default implementation of this method is for sqlalchemy-supported data source. The data source that does not support sqlalchemy should overwrite this function.
docstr_tok: ["Returns","a","generator","that","yields","the","data","from","the","given","table",",","or","the","data",".","Args",":","table_name","(","str",")",":","name","of","the","table","whose","data","is","to","be","retrieved",".","Returns",":","DBHandlerResponse",":","An","instance","of","DBHandlerResponse","containing","the","data",",","data","generator",",","or","an","error","message",".","Data","is","in","a","pandas","DataFrame",".","Raises",":","NotImplementedError",":","The","default","implementation","of","this","method","is","for","sqlalchemy-supported","data","source",".","The","data","source","that","does","not","support","sqlalchemy","should","overwrite","this","function","."]
code: def select(self, table_name: str) -> DBHandlerResponse:
      """
      Returns a generator that yields the data from the given table, or the data.
      Args:
          table_name (str): name of the table whose data is to be retrieved.
      Returns:
          DBHandlerResponse: An instance of DBHandlerResponse containing the data, data generator, or an error message. Data is in a pandas DataFrame.
  
      Raises:
          NotImplementedError: The default implementation of this method is for sqlalchemy-supported data source. The data source that does not support sqlalchemy should overwrite this function.
      """
      try:
          uri = self.get_sqlalchmey_uri()
          # Create a metadata object
          engine = create_engine(uri)
          metadata = MetaData()
  
          Session = sessionmaker(bind=engine)
          session = Session()
          # Retrieve the SQLAlchemy table object for the existing table
          table_to_read = Table(
              table_name, metadata, autoload_with=engine
          )
          # TODO: there is a BUG in the SQLAlchemy session management, when there is a function expression in the plan tree, we will update the catalog for its cost, which leads to a SQLAlchemy deadlock if we return a generator here.
          result = session.execute(table_to_read.select()).fetchall()
          session.close()
          # A generator is better, however, the current implementation suffers from deadlock from different SQLAlchemy sessions.
          return DBHandlerResponse(data=result)
      except Exception as e:
          return DBHandlerResponse(data=None, error=str(e))
  
file_path: evadb/evadb/third_party/databases/types.py
imports: from dataclasses import dataclass
  from typing import Generator
  import pandas
  from sqlalchemy import MetaData, Table, create_engine
  from sqlalchemy.orm import sessionmaker
label_desc: Use image node_id 10 for calling the DBHandler obj's underlying member method code with example usage: obj.select(table_name) and returns: DBHandlerResponse, DBHandlerResponse