Skip to content

Latest commit

 

History

History
123 lines (93 loc) · 12.6 KB

File metadata and controls

123 lines (93 loc) · 12.6 KB
graph LR
    DatabaseAccess["DatabaseAccess"]
    ModelManagement["ModelManagement"]
    QueryAndManipulation["QueryAndManipulation"]
    ReferenceResolution["ReferenceResolution"]
    UtilityAndErrorHandling["UtilityAndErrorHandling"]
    DatabaseAccess -- "Provides database connectivity" --> ModelManagement
    ModelManagement -- "Persists and retrieves model data" --> DatabaseAccess
    DatabaseAccess -- "Provides database connectivity" --> QueryAndManipulation
    QueryAndManipulation -- "Executes operations via" --> DatabaseAccess
    DatabaseAccess -- "Reports errors to" --> UtilityAndErrorHandling
    ModelManagement -- "Defines structure for" --> QueryAndManipulation
    QueryAndManipulation -- "Returns instances of" --> ModelManagement
    ModelManagement -- "Triggers dereferencing" --> ReferenceResolution
    ReferenceResolution -- "Instantiates models for" --> ModelManagement
    ModelManagement -- "Utilizes validation from" --> UtilityAndErrorHandling
    UtilityAndErrorHandling -- "Reports errors to" --> ModelManagement
    ReferenceResolution -- "Fetches documents via" --> DatabaseAccess
    click DatabaseAccess href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/pymodm/DatabaseAccess.md" "Details"
    click ModelManagement href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/pymodm/ModelManagement.md" "Details"
    click QueryAndManipulation href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/pymodm/QueryAndManipulation.md" "Details"
    click ReferenceResolution href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/pymodm/ReferenceResolution.md" "Details"
    click UtilityAndErrorHandling href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/pymodm/UtilityAndErrorHandling.md" "Details"
Loading

CodeBoardingDemoContact

Component Details

The PyMODM architecture is designed around an Object-Document Mapper (ODM) pattern for MongoDB. The core data flow begins with the DatabaseAccess component establishing and managing connections to the MongoDB database. ModelManagement defines the schema and behavior of Python objects that map to MongoDB documents, utilizing UtilityAndErrorHandling for data validation and error reporting. QueryAndManipulation provides the primary interface for users to interact with the database, executing queries and operations on ModelManagement instances through DatabaseAccess. For complex relationships, ReferenceResolution handles the automatic fetching and instantiation of linked documents, also relying on DatabaseAccess for data retrieval and ModelManagement for object creation. UtilityAndErrorHandling serves as a cross-cutting concern, providing essential services like validation and error management to all other components.

DatabaseAccess

Manages connections to MongoDB and handles low-level data storage and retrieval operations, including GridFS for file management.

Related Classes/Methods:

ModelManagement

Defines the structure and behavior of PyMODM models, including field definitions, data serialization/deserialization, validation, and persistence.

Related Classes/Methods:

QueryAndManipulation

Provides the API for building and executing database queries, enabling filtering, ordering, and bulk data operations on models.

Related Classes/Methods:

ReferenceResolution

Handles the automatic resolution and attachment of referenced MongoDB documents (DBRefs) to their corresponding model instances.

Related Classes/Methods:

UtilityAndErrorHandling

Provides common utility functions, general-purpose data validation, and defines a structured system for reporting various operational and validation errors across the library.

Related Classes/Methods: