httk.store.mongo.searcher¶
MongoDB query planning for the neutral httk.store.query protocols.
The planner keeps a truth/falsity pair for each predicate. This is important
for embedded arrays: the negation of “some element matches” is “no element
matches”, not MongoDB’s row-like $ne interpretation.
Classes¶
Compare one stored field with a literal or another field. |
|
Test a scalar field for explicit membership. |
|
Match literal text in a scalar string field. |
|
Conjoin two AST nodes. |
|
Disjoin two AST nodes. |
|
Negate an AST node by swapping its truth and falsity filters. |
|
An AST constant that is true for every document. |
|
An AST constant that is false for every document. |
|
A composable MongoDB expression backed by a neutral AST node. |
|
A scalar field, or the value channel of an embedded child field. |
|
A query variable, optionally produced by a lookup from another variable. |
|
Build and execute a MongoDB query over reference-connected variables. |
Module Contents¶
- class httk.store.mongo.searcher.ComparisonNode[source]¶
Compare one stored field with a literal or another field.
- field: MongoField[source]¶
- class httk.store.mongo.searcher.IsInNode[source]¶
Test a scalar field for explicit membership.
- field: MongoField[source]¶
- class httk.store.mongo.searcher.StringMatchNode[source]¶
Match literal text in a scalar string field.
- field: MongoField[source]¶
- class httk.store.mongo.searcher.NotNode[source]¶
Negate an AST node by swapping its truth and falsity filters.
- class httk.store.mongo.searcher.AlwaysTrueNode[source]¶
An AST constant that is true for every document.
- class httk.store.mongo.searcher.AlwaysFalseNode[source]¶
An AST constant that is false for every document.
- class httk.store.mongo.searcher.MongoExpression(node)[source]¶
A composable MongoDB expression backed by a neutral AST node.
- class httk.store.mongo.searcher.MongoField(variable, key_path, spec, codec=None, child_keys=(), presentation_prefix='')[source]¶
A scalar field, or the value channel of an embedded child field.
- class httk.store.mongo.searcher.MongoVariable(searcher, cls, schema, alias)[source]¶
A query variable, optionally produced by a lookup from another variable.
- property sid: MongoField[source]¶
Return the store-managed sid field.
- class httk.store.mongo.searcher.MongoSearcher(store)[source]¶
Build and execute a MongoDB query over reference-connected variables.
- set_row_verifier(verifier, identity)[source]¶
Attach the client-authoritative candidate verifier and its frozen identity.
The identity must be the canonical logical predicate payload, including every verifier constant. It is folded into continuation fingerprints, so cursors never cross between otherwise identical server plans.
- add_sort(field, descending=False, *, nulls='last')[source]¶
Append a stable scalar sort with an explicit null rank.
- results(**outputs)[source]¶
Return a materialized
MongoResultSetfor this query.