httk.store.backend.mongo.evaluator¶
Exact three-valued evaluation for Mongo stored-property predicates.
The Mongo query path deliberately evaluates this small, frozen AST over
hydrated records. That is important for child records: document storage keeps
their content-addressed SID links, while MongoStore.fetch gives the
evaluator their exact Python values.
Classes¶
A root, child, reference, or filtered record-object scope. |
|
A field, aggregate, null, or literal value in the neutral AST. |
|
A frozen three-valued predicate in the neutral stored-property AST. |
Functions¶
|
Evaluate |
|
Return canonical JSON used as the verifier identity and cursor input. |
Module Contents¶
- class httk.store.backend.mongo.evaluator.MongoScope[source]¶
A root, child, reference, or filtered record-object scope.
- parent: MongoScope | None = None[source]¶
- relationship: httk.store.backend.schema.FieldSpec | None = None[source]¶
- filter_predicate: MongoPredicate | None = None[source]¶
- class httk.store.backend.mongo.evaluator.MongoValue[source]¶
A field, aggregate, null, or literal value in the neutral AST.
- kind: Literal['field', 'store_timestamp', 'logical_id', 'alt_kind', 'alternative_id', 'present', 'constant', 'null', 'count', 'distinct_count'][source]¶
- scope: MongoScope | None = None[source]¶
- spec: httk.store.backend.schema.FieldSpec | None = None[source]¶
- value: MongoValue | None = None[source]¶
- class httk.store.backend.mongo.evaluator.MongoPredicate[source]¶
A frozen three-valued predicate in the neutral stored-property AST.
- httk.store.backend.mongo.evaluator.evaluate(predicate, record, store_timestamp_resolver=None, logical_id_resolver=None, alt_kind_resolver=None)[source]¶
Evaluate
predicateexactly over a hydrated backing object.- Parameters:
predicate (MongoPredicate) – Frozen predicate produced by
_MongoQueryContext.record (object) – Hydrated backing record for the candidate SID.
store_timestamp_resolver (collections.abc.Callable[[], object] | None) – Optional resolver for the candidate’s store timestamp.
logical_id_resolver (collections.abc.Callable[[], object] | None) – Optional resolver for the candidate’s store-managed lineage id.
alt_kind_resolver (collections.abc.Callable[[], object] | None) – Optional resolver for the candidate’s store-managed alternative kind.
- Returns:
True,False, orNonefor SQL UNKNOWN.- Return type:
bool | None