Visitor#

class langchain_core.structured_query.Visitor[source]#

Defines interface for IR translation using a visitor pattern.

Attributes

allowed_comparators

Allowed comparators for the visitor.

allowed_operators

Allowed operators for the visitor.

Methods

visit_comparison(comparison)

Translate a Comparison.

visit_operation(operation)

Translate an Operation.

visit_structured_query(structured_query)

Translate a StructuredQuery.

abstract visit_comparison(comparison: Comparison) Any[source]#

Translate a Comparison.

Parameters:

comparison (Comparison) – Comparison to translate.

Return type:

Any

abstract visit_operation(operation: Operation) Any[source]#

Translate an Operation.

Parameters:

operation (Operation) – Operation to translate.

Return type:

Any

abstract visit_structured_query(structured_query: StructuredQuery) Any[source]#

Translate a StructuredQuery.

Parameters:

structured_query (StructuredQuery) – StructuredQuery to translate.

Return type:

Any