Skip to content

Latest commit

 

History

History
82 lines (46 loc) · 4.8 KB

File metadata and controls

82 lines (46 loc) · 4.8 KB
graph LR
    Connection_Manager["Connection Manager"]
    Low_Level_SQL_Executor["Low-Level SQL Executor"]
    Query_Executor["Query Executor"]
    Single_Record_Fetcher["Single Record Fetcher"]
    Schema_Manager["Schema Manager"]
    Schema_Definition_Holder["Schema Definition Holder"]
    Query_Executor -- "utilizes" --> Low_Level_SQL_Executor
    Query_Executor -- "utilizes" --> Single_Record_Fetcher
    Query_Executor -- "depends on" --> Connection_Manager
    Low_Level_SQL_Executor -- "depends on" --> Connection_Manager
    Schema_Manager -- "depends on" --> Connection_Manager
    Schema_Manager -- "uses" --> Low_Level_SQL_Executor
    Schema_Manager -- "requires" --> Schema_Definition_Holder
Loading

CodeBoardingDemoContact

Details

The orm subsystem provides a lightweight Object-Relational Mapping (ORM) solution, abstracting direct database interactions. It centers around the Query Executor, which orchestrates DML operations by leveraging a Low-Level SQL Executor for raw SQL execution and a Single Record Fetcher for result processing. Database connectivity is managed by the Connection Manager, which provides the necessary session for all database operations. Schema management, including creation and deletion of tables, is handled by the Schema Manager, which relies on the Schema Definition Holder for metadata. This design ensures a clear separation of concerns, with components focused on specific aspects of database interaction, from connection handling to query execution and schema management.

Connection Manager

Manages the retrieval of the database connection string and handles the establishment and lifecycle of database connections, including connection pooling and session management. It provides the foundational database access.

Related Classes/Methods:

Low-Level SQL Executor

Provides the fundamental capability to directly execute raw SQL statements against the database. It acts as a core primitive that higher-level components leverage for all database operations.

Related Classes/Methods:

Query Executor

Serves as the primary interface for executing Data Manipulation Language (DML) operations (e.g., select, insert, update, delete) against the database. It abstracts the underlying database interaction for higher-level ORM methods, translating ORM queries into executable SQL.

Related Classes/Methods:

Single Record Fetcher

A utility component responsible for efficiently retrieving and processing a single record from a database result set. It's specialized for scenarios where only one row is expected.

Related Classes/Methods:

Schema Manager

Manages the database schema lifecycle, including the creation (create_all) and deletion (drop_all) of all defined tables based on the ORM's metadata. It handles Data Definition Language (DDL) operations.

Related Classes/Methods:

Schema Definition Holder

Holds the metadata defining the database schema structure, including table definitions, columns, and relationships. This metadata is used by the Schema Manager and potentially other components to understand the database layout.

Related Classes/Methods: