{ "module": "mongo_ops.populate.rules", "content": { "path": "mongo_ops.populate.rules", "docstring": "# Summary\n\nPopulate rules describing which foreign-key fields to resolve.", "objects": { "PopulateRule": { "name": "PopulateRule", "kind": "class", "path": "mongo_ops.populate.rules.PopulateRule", "signature": "PopulateRule(field_name: str, collection_name: str, nested_rules: list[PopulateRule] | None = None, max_depth: int = 1, filter: dict[str, Any] | None = None, projection: dict[str, Any] | None = None)", "docstring": "Describes how a foreign-key field resolves to another collection.\n\nA rule declares the field to resolve, the collection its references\npoint at, and optional nested rules applied to the referenced document\nitself. It also bounds how deep the resolution may recurse.\n\nAttributes:\n field_name (str):\n Name of the FK field on the source document.\n collection_name (str):\n Collection the reference points into.\n nested_rules (Optional[list[PopulateRule]]):\n Sub-rules applied to the referenced document. Defaults to None.\n max_depth (int):\n Maximum recursion depth for this rule. Defaults to 1.\n filter (Optional[dict[str, Any]]):\n Optional Mongo filter applied when fetching the reference.\n Defaults to None.\n projection (Optional[dict[str, Any]]):\n Optional Mongo projection applied when fetching the reference.\n Defaults to None.", "members": { "field_name": { "name": "field_name", "kind": "attribute", "path": "mongo_ops.populate.rules.PopulateRule.field_name", "signature": null, "docstring": null }, "collection_name": { "name": "collection_name", "kind": "attribute", "path": "mongo_ops.populate.rules.PopulateRule.collection_name", "signature": null, "docstring": null }, "nested_rules": { "name": "nested_rules", "kind": "attribute", "path": "mongo_ops.populate.rules.PopulateRule.nested_rules", "signature": null, "docstring": null }, "max_depth": { "name": "max_depth", "kind": "attribute", "path": "mongo_ops.populate.rules.PopulateRule.max_depth", "signature": null, "docstring": null }, "filter": { "name": "filter", "kind": "attribute", "path": "mongo_ops.populate.rules.PopulateRule.filter", "signature": null, "docstring": null }, "projection": { "name": "projection", "kind": "attribute", "path": "mongo_ops.populate.rules.PopulateRule.projection", "signature": null, "docstring": null } } } } } }