class_docstr: This handler handles connection and execution of the PostgreSQL with pgvector extension statements.
class_docstr_tok: ["This","handler","handles","connection","and","execution","of","the","PostgreSQL","with","pgvector","extension","statements","."]
docstr: Construct where clauses from filter conditions
docstr_tok: ["Construct","where","clauses","from","filter","conditions"]
code: def _construct_where_clause(filter_conditions=None):
      """
      Construct where clauses from filter conditions
      """
      if filter_conditions is None:
          return ""
  
      where_clauses = []
  
      for key, value in filter_conditions.items():
          if key == "embeddings":
              continue
          if value["op"].lower() == "in":
              values = list(repr(i) for i in value["value"])
              value["value"] = "({})".format(", ".join(values))
          else:
              value["value"] = repr(value["value"])
          where_clauses.append(f'{key} {value["op"]} {value["value"]}')
  
      if len(where_clauses) > 1:
          return f"WHERE{' AND '.join(where_clauses)}"
      elif len(where_clauses) == 1:
          return f"WHERE {where_clauses[0]}"
      else:
          return ""
  
imports: from collections import OrderedDict
  from typing import List, Union
  import pandas
  import psycopg
  from mindsdb_sql import ASTNode, Parameter, Identifier, Update, BinaryOperation
  from pgvector.psycopg import register_vector
  from mindsdb.integrations.handlers.postgres_handler.postgres_handler import PostgresHandler
  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.vectordatabase_handler import FilterCondition, VectorStoreHandler
  from mindsdb.utilities import log
  from mindsdb.utilities.profiler import profiler
label_desc: Use image node_id 4 for calling the PgVectorHandler obj's underlying member method code with example usage: obj._construct_where_clause(filter_conditions) and returns: str, str, str, str, where_clauses, str