class_docstr: This handler handles connection and execution of the Ingres statements.
class_docstr_tok: ["This","handler","handles","connection","and","execution","of","the","Ingres","statements","."]
docstr: Receive raw query and act upon it somehow.
  Args:
      query (str): SQL query to execute.
  Returns:
      HandlerResponse
docstr_tok: ["Receive","raw","query","and","act","upon","it","somehow",".","Args",":","query","(","str",")",":","SQL","query","to","execute",".","Returns",":","HandlerResponse"]
code: def native_query(self, query: str) -> Response:
      """
      Receive raw query and act upon it somehow.
      Args:
          query (str): SQL query to execute.
      Returns:
          HandlerResponse
      """
      need_to_close = self.is_connected is False
  
      connection = self.connect()
      with connection.cursor() as cursor:
          try:
              cursor.execute(query)
              result = cursor.fetchall()
              if result:
                  response = Response(
                      RESPONSE_TYPE.TABLE,
                      data_frame=pd.DataFrame.from_records(
                          result,
                          columns=[x[0] for x in cursor.description],
                      ),
                  )
              else:
                  response = Response(RESPONSE_TYPE.OK)
                  connection.commit()
          except Exception as e:
              logger.error(
                  f'Error running query: {query} on {self.connection_args["database"]}!'
              )
              response = Response(
                  RESPONSE_TYPE.ERROR, error_message=str(e)
              )
  
      if need_to_close is True:
          self.disconnect()
  
      return response
  
imports: import pyodbc
  from collections import OrderedDict
  import pandas
  from mindsdb_sql import parse_sql
  from ingres_sa_dialect.base import IngresDialect
  from mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender
  from mindsdb_sql.parser.ast.base import ASTNode
  from mindsdb.integrations.libs.base import DatabaseHandler
  from mindsdb.utilities import log
  from mindsdb.integrations.libs.response import HandlerStatusResponse, HandlerResponse, RESPONSE_TYPE
  from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE
label_desc: Use image node_id 6 for calling the IngresHandler obj's underlying member method code with example usage: obj.native_query(query) and returns: response