langchain.chains.query_constructor.ir.Visitor¶

class langchain.chains.query_constructor.ir.Visitor[source]¶

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[source]¶

Translate a Comparison.

Parameters

comparison (Comparison) –

Return type

Any

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

Translate an Operation.

Parameters

operation (Operation) –

Return type

Any

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

Translate a StructuredQuery.

Parameters

structured_query (StructuredQuery) –

Return type

Any