class_docstr: This handler handles connection and execution of the SAP MaxDB  statements.
class_docstr_tok: ["This","handler","handles","connection","and","execution","of","the","SAP","MaxDB","statements","."]
docstr: Establishes a connection to the SAP MaxDB server.
  Returns:
      HandlerStatusResponse
docstr_tok: ["Establishes","a","connection","to","the","SAP","MaxDB","server",".","Returns",":","HandlerStatusResponse"]
code: def connect(self) -> StatusResponse:
      """
      Establishes a connection to the SAP MaxDB server.
      Returns:
          HandlerStatusResponse
      """
      if self.is_connected:
          return self.connection
  
      jdbc_url = f"jdbc:sapdb://{self.host}:{self.port}/{self.database}"
      jdbc_class = "com.sap.dbtech.jdbc.DriverSapDB"
  
      self.connection = jd.connect(
          jdbc_class,
          jdbc_url,
          [self.user, self.password],
          self.jdbc_location,
      )
      self.is_connected = True
      return self.connection
  
imports: from collections import OrderedDict
  from typing import Optional
  from mindsdb_sql import parse_sql
  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, HandlerResponse
  from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE
  import pandas
  import jaydebeapi
label_desc: Use image node_id 3 for calling the MaxDBHandler obj's underlying member method code with example usage: obj.connect() and returns: self, self