graph LR
Connection_Pool["Connection Pool"]
Asynchronous_Connection["Asynchronous Connection"]
Asynchronous_Cursor["Asynchronous Cursor"]
SQLAlchemy_Engine_Integration["SQLAlchemy Engine Integration"]
SQLAlchemy_Connection_Adapter["SQLAlchemy Connection Adapter"]
SQLAlchemy_Transaction_Management["SQLAlchemy Transaction Management"]
SQLAlchemy_Result_Processing["SQLAlchemy Result Processing"]
Connection_Pool -- "Manages/Acquires" --> Asynchronous_Connection
Asynchronous_Connection -- "Provides Connection To" --> Asynchronous_Cursor
Asynchronous_Cursor -- "Executes Queries Via" --> Asynchronous_Connection
SQLAlchemy_Engine_Integration -- "Acquires/Manages" --> SQLAlchemy_Connection_Adapter
SQLAlchemy_Connection_Adapter -- "Delegates Query Execution To" --> Asynchronous_Cursor
SQLAlchemy_Connection_Adapter -- "Manages Transactions Via" --> SQLAlchemy_Transaction_Management
SQLAlchemy_Connection_Adapter -- "Processes Results With" --> SQLAlchemy_Result_Processing
SQLAlchemy_Result_Processing -- "Fetches Raw Data From" --> Asynchronous_Cursor
click Connection_Pool href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/aiomysql/Connection_Pool.md" "Details"
click Asynchronous_Connection href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/aiomysql/Asynchronous_Connection.md" "Details"
click Asynchronous_Cursor href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/aiomysql/Asynchronous_Cursor.md" "Details"
click SQLAlchemy_Engine_Integration href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/aiomysql/SQLAlchemy_Engine_Integration.md" "Details"
click SQLAlchemy_Connection_Adapter href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/aiomysql/SQLAlchemy_Connection_Adapter.md" "Details"
click SQLAlchemy_Transaction_Management href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/aiomysql/SQLAlchemy_Transaction_Management.md" "Details"
The aiomysql architecture is a layered, asynchronous database driver designed for Python applications. It primarily consists of a Connection Pool for efficient resource management, providing Asynchronous Connection objects that handle direct, low-level asynchronous communication with the MySQL server. Asynchronous Cursor objects offer a higher-level interface for query execution and result processing. An optional, yet significant, layer provides seamless integration with SQLAlchemy, featuring a SQLAlchemy Engine Integration as the entry point, SQLAlchemy Connection Adapter for translating SQLAlchemy operations, SQLAlchemy Transaction Management for transaction control, and SQLAlchemy Result Processing for ORM-compatible result handling. This design emphasizes asynchronous operations, resource efficiency, and clear separation of concerns, making it ideal for high-performance, concurrent database interactions in an asyncio environment.
Connection Pool [Expand]
Manages a pool of aiomysql connections, providing efficient reuse, limiting concurrent connections, and handling connection lifecycle (creation, release, closure). This is central to resource efficiency.
Related Classes/Methods:
Asynchronous Connection [Expand]
Handles the direct asynchronous communication with the MySQL server. This includes establishing the network connection, authentication, sending commands, and receiving raw responses. It acts as the low-level asynchronous interface to the database.
Related Classes/Methods:
Asynchronous Cursor [Expand]
Provides a high-level asynchronous interface for executing SQL queries and retrieving results. It abstracts the underlying connection details and handles result set processing.
Related Classes/Methods:
SQLAlchemy Engine Integration [Expand]
The primary entry point for SQLAlchemy applications. It is responsible for creating and managing SQLAlchemy-compatible database engines that utilize aiomysql for asynchronous operations.
Related Classes/Methods:
SQLAlchemy Connection Adapter [Expand]
Wraps the core aiomysql asynchronous connection to provide a SQLAlchemy-compliant connection interface. It translates SQLAlchemy's connection requests into aiomysql's asynchronous operations.
Related Classes/Methods:
SQLAlchemy Transaction Management [Expand]
Manages the transaction lifecycle (begin, commit, rollback) within the SQLAlchemy integration layer, ensuring atomicity and consistency of database operations.
Related Classes/Methods:
Transforms raw query results obtained from aiomysql cursors into SQLAlchemy ResultProxy objects, enabling ORM-style result access and row manipulation.
Related Classes/Methods: