Skip to content

lawref.query.engine

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

Classes

NameDescription
QueryEngineNo description.
QueryResultNo description.
SnapshotIndexesShared indexes for a caller-owned immutable FactStore batch.

QueryEngineclass#

class QueryEngine(store: FactStore, *, base_path: Path | None = None, materialization_limit: int | None = None, materialization_engine: str = 'lawref', indexes: SnapshotIndexes | None = None)

base_pathattributeinstance attribute#

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

materialization_engineattributeinstance attribute#

materialization_engine = materialization_engine

materialization_limitattributeinstance attribute#

materialization_limit = materialization_limit

materializationsattributeinstance attribute#

materializations: dict[str, dict] = {}

storeattributeinstance attribute#

store = store

warningsattributeinstance attribute#

warnings: list[dict] = []

executemethod#

def execute(query: Query) -> QueryResult

QueryResultclassdataclass#

class QueryResult(document: dict, explain: dict)

documentattributeinstance attribute#

document: dict

explainattributeinstance attribute#

explain: dict

SnapshotIndexesclassdataclass#

class SnapshotIndexes(store: FactStore, rows: dict = dict(), exists: OrderedDict = OrderedDict(), nodes: dict = dict(), membership: dict = dict())

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.

existsattributeclass attributeinstance attribute#

exists: OrderedDict = field(default_factory=OrderedDict)

membershipattributeclass attributeinstance attribute#

membership: dict = field(default_factory=dict)

nodesattributeclass attributeinstance attribute#

nodes: dict = field(default_factory=dict)

rowsattributeclass attributeinstance attribute#

rows: dict = field(default_factory=dict)

storeattributeinstance attribute#

store: FactStore

Documentation for Arxo. Writings — blog.arxo.io.

Anonymous visit counts on stats.arxo.io, no cookies.