# lawref.query.engine

*module*

Наивный детерминированный join-движок LawQL (Ф2/Ф3).

## lawref.query.engine.QueryEngine

*class*

```python
class QueryEngine
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L148-L582)

### lawref.query.engine.QueryEngine.base_path

*attribute* · *instance attribute*

```python
base_path = base_path or Path.cwd().resolve()
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L157-L157)

### lawref.query.engine.QueryEngine.materialization_engine

*attribute* · *instance attribute*

```python
materialization_engine = materialization_engine
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L159-L159)

### lawref.query.engine.QueryEngine.materialization_limit

*attribute* · *instance attribute*

```python
materialization_limit = materialization_limit
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L158-L158)

### lawref.query.engine.QueryEngine.materializations

*attribute* · *instance attribute*

```python
materializations: dict[str, dict] = {}
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L160-L160)

### lawref.query.engine.QueryEngine.store

*attribute* · *instance attribute*

```python
store = store
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L156-L156)

### lawref.query.engine.QueryEngine.warnings

*attribute* · *instance attribute*

```python
warnings: list[dict] = []
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L161-L161)

### lawref.query.engine.QueryEngine.execute

*method*

```python
def execute(query: Query) -> QueryResult
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L169-L239)

## lawref.query.engine.QueryResult

*class* · *dataclass*

```python
class QueryResult
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L20-L23)

### lawref.query.engine.QueryResult.document

*attribute* · *instance attribute*

```python
document: dict
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L22-L22)

### lawref.query.engine.QueryResult.explain

*attribute* · *instance attribute*

```python
explain: dict
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L23-L23)

## lawref.query.engine.SnapshotIndexes

*class* · *dataclass*

```python
class SnapshotIndexes
```

Shared indexes for a caller-owned immutable FactStore batch.

Opt-in: discard this object before changing the store. Materializations,
bindings and warnings belong to each engine, never to this cache.

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L132-L145)

### lawref.query.engine.SnapshotIndexes.exists

*attribute* · *class attribute* · *instance attribute*

```python
exists: OrderedDict = field(default_factory=OrderedDict)
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L143-L143)

### lawref.query.engine.SnapshotIndexes.membership

*attribute* · *class attribute* · *instance attribute*

```python
membership: dict = field(default_factory=dict)
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L145-L145)

### lawref.query.engine.SnapshotIndexes.nodes

*attribute* · *class attribute* · *instance attribute*

```python
nodes: dict = field(default_factory=dict)
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L144-L144)

### lawref.query.engine.SnapshotIndexes.rows

*attribute* · *class attribute* · *instance attribute*

```python
rows: dict = field(default_factory=dict)
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L140-L140)

### lawref.query.engine.SnapshotIndexes.store

*attribute* · *instance attribute*

```python
store: FactStore
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/query/engine.py#L139-L139)
