class_docstr: Base class for handlers associated to vector databases.
class_docstr_tok: ["Base","class","for","handlers","associated","to","vector","databases","."]
code: def _extract_conditions(
      self, where_statement
  ) -> Optional[List[FilterCondition]]:
      conditions = []
      # parse conditions
      if where_statement is not None:
          # dfs to get all binary operators in the where statement
          def _extract_comparison_conditions(node, **kwargs):
              if isinstance(node, BinaryOperation):
                  # if the op is and, continue
                  # TODO: need to handle the OR case
                  if node.op.upper() == "AND":
                      return
                  op = FilterOperator(node.op.upper())
                  # unquote the left hand side
                  left_hand = node.args[0].parts[-1].strip("`")
                  if isinstance(node.args[1], Constant):
                      if left_hand == TableField.SEARCH_VECTOR.value:
                          right_hand = ast.literal_eval(
                              node.args[1].value
                          )
                      else:
                          right_hand = node.args[1].value
                  elif isinstance(node.args[1], Tuple):
                      # Constant could be actually a list i.e. [1.2, 3.2]
                      right_hand = [
                          ast.literal_eval(item.value)
                          if isinstance(item, Constant)
                          and not isinstance(item.value, list)
                          else item.value
                          for item in node.args[1].items
                      ]
                  else:
                      raise Exception(
                          f"Unsupported right hand side: {node.args[1]}"
                      )
                  conditions.append(
                      FilterCondition(
                          column=left_hand, op=op, value=right_hand
                      )
                  )
  
          query_traversal(
              where_statement, _extract_comparison_conditions
          )
  
          # try to treat conditions that are not in TableField as metadata conditions
          for condition in conditions:
              if not self._is_condition_allowed(condition):
                  condition.column = (
                      TableField.METADATA.value + "." + condition.column
                  )
  
      else:
          conditions = None
  
      return conditions
  
imports: import ast
  import hashlib
  from enum import Enum
  from typing import Any, List, Optional
  import pandas
  from mindsdb_sql.parser.ast import BinaryOperation, Constant, CreateTable, Delete, DropTables, Insert, Select, Star, Tuple, Update
  from mindsdb_sql.parser.ast.base import ASTNode
  from mindsdb.integrations.libs.response import RESPONSE_TYPE, HandlerResponse
  from mindsdb.utilities import log
  from mindsdb.integrations.utilities.sql_utils import conditions_to_filter
  from ..utilities.sql_utils import query_traversal
  from .base import BaseHandler
label_desc: Use image node_id 5 for calling the VectorStoreHandler obj's underlying member method code with example usage: obj._extract_conditions(where_statement) and returns: conditions