class_docstr: This handler handles connection and execution of the LanceDB statements.
class_docstr_tok: ["This","handler","handles","connection","and","execution","of","the","LanceDB","statements","."]
code: def __init__(self, name: str, **kwargs):
      super().__init__(name, **kwargs)
      self._connection_data = kwargs.get("connection_data")
  
      self._client_config = {
          "uri": self._connection_data.get("persist_directory"),
          "api_key": self._connection_data.get("api_key", None),
          "region": self._connection_data.get("region"),
          "host_override": self._connection_data.get("host_override"),
      }
  
      # uri is required either for LanceDB Cloud or local
      if not self._client_config["uri"]:
          raise Exception(
              "persist_directory is required for LanceDB connection!"
          )
      # uri, api_key and region is required either for LanceDB Cloud
      elif (
          self._client_config["uri"]
          and self._client_config["api_key"]
          and not self._client_config["region"]
      ):
          raise Exception(
              "region is required for LanceDB Cloud connection!"
          )
  
      self._client = None
      self.is_connected = False
      self.connect()
  
imports: from collections import OrderedDict
  from typing import List, Optional
  import lancedb
  import pandas
  import pyarrow
  from lance.vector import vec_to_table
  import duckdb
  import json
  from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE
  from mindsdb.integrations.libs.response import RESPONSE_TYPE
  from mindsdb.integrations.libs.response import HandlerResponse
  from mindsdb.integrations.libs.response import HandlerResponse
  from mindsdb.integrations.libs.response import HandlerStatusResponse
  from mindsdb.integrations.libs.vectordatabase_handler import FilterCondition, FilterOperator, TableField, VectorStoreHandler
  from mindsdb.utilities import log
label_desc: Use image node_id 1 to create a new LanceDBHandler object from inherited base classes: VectorStoreHandler with example: obj = LanceDBHandler(name)