class_docstr: This handler handles connection and execution of the Weaviate statements.
class_docstr_tok: ["This","handler","handles","connection","and","execution","of","the","Weaviate","statements","."]
code: def select(
      self,
      table_name: str,
      columns: List[str] = None,
      conditions: List[FilterCondition] = None,
      offset: int = None,
      limit: int = None,
  ) -> HandlerResponse:
      table_name = table_name.capitalize()
      # columns which we will always provide in the result
      filters = None
      if conditions:
          non_metadata_conditions = [
              condition
              for condition in conditions
              if not condition.column.startswith(
                  TableField.METADATA.value
              )
              and condition.column != TableField.SEARCH_VECTOR.value
              and condition.column != TableField.EMBEDDINGS.value
          ]
          metadata_conditions = [
              condition
              for condition in conditions
              if condition.column.startswith(TableField.METADATA.value)
          ]
          filters = self._translate_condition(
              table_name,
              non_metadata_conditions
              if non_metadata_conditions
              else None,
              metadata_conditions if metadata_conditions else None,
          )
  
      # check if embedding vector filter is present
      vector_filter = (
          None
          if not conditions
          else [
              condition
              for condition in conditions
              if condition.column == TableField.SEARCH_VECTOR.value
              or condition.column == TableField.EMBEDDINGS.value
          ]
      )
  
      for col in ["id", "embeddings", "distance", "metadata"]:
          if col in columns:
              columns.remove(col)
  
      metadata_table = table_name.capitalize() + "_metadata"
  
      metadata_fields = " ".join(
          [
              prop["name"]
              for prop in self._client.schema.get(metadata_table)[
                  "properties"
              ]
          ]
      )
  
      # query to get all metadata fields
      metadata_query = f"associatedMetadata {{ ... on {metadata_table} {{ {metadata_fields} }} }}"
  
      if columns:
          query = self._client.query.get(
              table_name,
              columns + [metadata_query],
          ).with_additional(["id vector distance"])
      else:
          query = self._client.query.get(
              table_name,
              [metadata_query],
          ).with_additional(["id vector distance"])
      if vector_filter:
          # similarity search
          # assuming the similarity search is on content
          # assuming there would be only one vector based search per query
          vector_filter = vector_filter[0]
          near_vector = {
              "vector": eval(vector_filter.value)
              if isinstance(vector_filter.value, str)
              else vector_filter.value
          }
          query = query.with_near_vector(near_vector)
      if filters:
          query = query.with_where(filters)
      if limit:
          query = query.with_limit(limit)
      result = query.do()
      result = result["data"]["Get"][table_name.capitalize()]
      ids = [query_obj["_additional"]["id"] for query_obj in result]
      contents = [query_obj.get("content") for query_obj in result]
      distances = [
          query_obj.get("_additional").get("distance")
          for query_obj in result
      ]
      # distances will be null for non vector/embedding query
      vectors = [
          query_obj.get("_additional").get("vector")
          for query_obj in result
      ]
      metadatas = [
          query_obj.get("associatedMetadata")[0] for query_obj in result
      ]
  
      payload = {
          TableField.ID.value: ids,
          TableField.CONTENT.value: contents,
          TableField.METADATA.value: metadatas,
          TableField.EMBEDDINGS.value: vectors,
          TableField.DISTANCE.value: distances,
      }
  
      if columns:
          payload = {
              column: payload[column]
              for column in columns
              + ["id", "embeddings", "distance", "metadata"]
              if column != TableField.EMBEDDINGS.value
          }
  
      # always include distance
      if distances:
          payload[TableField.DISTANCE.value] = distances
      result_df = pd.DataFrame(payload)
      return Response(
          resp_type=RESPONSE_TYPE.TABLE, data_frame=result_df
      )
  
imports: from collections import OrderedDict
  from datetime import datetime
  from typing import List, Optional
  import weaviate
  from weaviate.embedded import EmbeddedOptions
  import pandas
  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
  from weaviate.util import generate_uuid5
label_desc: Use image node_id 10 for calling the WeaviateDBHandler obj's underlying member method code with example usage: obj.select(table_name, columns, conditions, offset, limit) and returns: Response