httk.store.mongo.optimade

Serve OPTIMADE filters over stored dataclasses through MongoDB.

The property and filter translation layers are backend-neutral. This module only supplies Mongo-specific field handlers for stored properties and for relationship ids, plus the semi-join that resolves dotted relationship filters through a nested Mongo searcher.

Functions

optimade_filter_searcher(store, cls, filter_string, *)

Build a Mongo searcher over cls from an OPTIMADE filter.

Module Contents

httk.store.mongo.optimade.optimade_filter_searcher(store, cls, filter_string, *, prefix='_httk_', definition=None, extra_handlers=None, related_classes=None)[source]

Build a Mongo searcher over cls from an OPTIMADE filter.

Parameters:
Returns:

A Mongo searcher yielding matching stored instances.

Raises:
Return type:

httk.store.query.Searcher