Toggle Menu
Prev Up Next

# `langchain_core.structured_query`.Visitor

class langchain_core.structured_query.Visitor

  Defines interface for IR translation using visitor pattern.

  Attributes

  `allowed_comparators` |
  `allowed_operators` |

  Methods

  `__init__`() |
  `visit_comparison`(comparison) | Translate a Comparison.
  `visit_operation`(operation) | Translate an Operation.
  `visit_structured_query`(structured_query) | Translate a StructuredQuery.

  __init__()
  abstract visit_comparison(comparison: Comparison) → Any

    Translate a Comparison.

    Parameters

      comparison (Comparison) –

    Return type

      Any

  abstract visit_operation(operation: Operation) → Any

    Translate an Operation.

    Parameters

      operation (Operation) –

    Return type

      Any

  abstract visit_structured_query(structured_query: StructuredQuery) → Any

    Translate a StructuredQuery.

    Parameters

      structured_query (StructuredQuery) –

    Return type

      Any