httk.store.mongo.entry_provider¶
Serve MongoDB-backed records through the neutral entry-provider contract.
Mongo entry identities are content identities rather than SQL row identities. Configured entry families are rendered through their Mongo stored-property plan; configured backing records are also accepted for the schema-derived provider surface used by the SQL provider’s parity tests.
Classes¶
Serve configured Mongo entry families or their concrete backings. |
Functions¶
|
Return the served |
|
Build a definition for the JSON-able fields of one backing class. |
Module Contents¶
- httk.store.mongo.entry_provider.served_specs(schema, prefix)[source]¶
Return the served
(name, field spec, fulltype)triples.- Parameters:
schema (httk.store.db.schema.TableSchema) – The resolved schema whose fields are inspected.
prefix (str) – The registered prefix used for served property names.
- Returns:
One triple for every schema field with an OPTIMADE value type.
- Return type:
- httk.store.mongo.entry_provider.auto_definition(entry_type, schema, prefix)[source]¶
Build a definition for the JSON-able fields of one backing class.
- class httk.store.mongo.entry_provider.StoreEntryProvider(store, classes, *, definitions=None, prefix='_httk_', id_of=None, link_classes=())[source]¶
Bases:
httk.core.EntryProviderServe configured Mongo entry families or their concrete backings.
classesmaps public entry-type names to either configured entry-family classes or configured concrete backing classes. Family classes use the family’sMongoStoredPropertyPlan; backing classes use the same schema-derived property contract as the SQL provider.id_ofreceives(entry_type, sid, hydrated_record)and defaults to the record’s content identity.