# QueryTransformer

> **Class** in `langchain_classic`

📖 [View in docs](https://reference.langchain.com/python/langchain-classic/chains/query_constructor/parser/QueryTransformer)

Transform a query string into an intermediate representation.

## Signature

```python
QueryTransformer(
    self,
    *args: Any = (),
    allowed_comparators: Sequence[Comparator] | None = None,
    allowed_operators: Sequence[Operator] | None = None,
    allowed_attributes: Sequence[str] | None = None,
    **kwargs: Any = {},
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `*args` | `Any` | No | Positional arguments. (default: `()`) |
| `allowed_comparators` | `Sequence[Comparator] \| None` | No | Optional sequence of allowed comparators. (default: `None`) |
| `allowed_operators` | `Sequence[Operator] \| None` | No | Optional sequence of allowed operators. (default: `None`) |
| `allowed_attributes` | `Sequence[str] \| None` | No | Optional sequence of allowed attributes for comparators. (default: `None`) |
| `**kwargs` | `Any` | No | Additional keyword arguments. (default: `{}`) |

## Extends

- `Transformer`

## Constructors

```python
__init__(
    self,
    *args: Any = (),
    allowed_comparators: Sequence[Comparator] | None = None,
    allowed_operators: Sequence[Operator] | None = None,
    allowed_attributes: Sequence[str] | None = None,
    **kwargs: Any = {},
)
```

| Name | Type |
|------|------|
| `allowed_comparators` | `Sequence[Comparator] \| None` |
| `allowed_operators` | `Sequence[Operator] \| None` |
| `allowed_attributes` | `Sequence[str] \| None` |


## Properties

- `allowed_comparators`
- `allowed_operators`
- `allowed_attributes`

## Methods

- [`program()`](https://reference.langchain.com/python/langchain-classic/chains/query_constructor/parser/QueryTransformer/program)
- [`func_call()`](https://reference.langchain.com/python/langchain-classic/chains/query_constructor/parser/QueryTransformer/func_call)
- [`args()`](https://reference.langchain.com/python/langchain-classic/chains/query_constructor/parser/QueryTransformer/args)
- [`false()`](https://reference.langchain.com/python/langchain-classic/chains/query_constructor/parser/QueryTransformer/false)
- [`true()`](https://reference.langchain.com/python/langchain-classic/chains/query_constructor/parser/QueryTransformer/true)
- [`list()`](https://reference.langchain.com/python/langchain-classic/chains/query_constructor/parser/QueryTransformer/list)
- [`int()`](https://reference.langchain.com/python/langchain-classic/chains/query_constructor/parser/QueryTransformer/int)
- [`float()`](https://reference.langchain.com/python/langchain-classic/chains/query_constructor/parser/QueryTransformer/float)
- [`date()`](https://reference.langchain.com/python/langchain-classic/chains/query_constructor/parser/QueryTransformer/date)
- [`datetime()`](https://reference.langchain.com/python/langchain-classic/chains/query_constructor/parser/QueryTransformer/datetime)
- [`string()`](https://reference.langchain.com/python/langchain-classic/chains/query_constructor/parser/QueryTransformer/string)

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/f0c5a28fa05adcda89aebcb449d897245ab21fa4/libs/langchain/langchain_classic/chains/query_constructor/parser.py#L77)