Database
Comprehensive database abstraction layer built on SQLAlchemy that provides session management, connection pooling, bulk operations, and type engines for seamless database interactions while supporting multiple database backends.
-
Managers
Database manager interface for handling engine configuration, connection establishment, and operation routing with support for read/write splitting and multiple database instances.
-
Routing
Database routing system that directs operations to appropriate engines based on configurable rules, with support for read/write splitting and custom routing strategies.
-
Sessions
Database session management system providing transaction handling, unit of work pattern implementation, and session lifecycle management with both sync and async support.
-
Bulk
Efficient bulk operation system for handling large-scale database operations with optimized memory usage, batching capabilities, and transaction management.
-
Metadata
Database schema tools for table definitions, constraint management, index creation, and schema migrations with support for multiple database dialects.
-
Types
Extensive collection of database type engines and column type definitions supporting standard and custom types with validation and serialization capabilities.
-
Utilities
Comprehensive set of helper functions for database operations, query building, filtering, and result processing with support for common database patterns.
External references
SQLAlchemy provides the foundation for the framework's database layer, offering powerful ORM capabilities, SQL abstraction, and comprehensive database tooling. These components are directly integrated and extended within the framework.
-
Engines
Core database engine functionality providing connection management, dialect support, and execution interface with extensive configuration options for different database backends.
-
Events
Event system for database operations allowing hooks into session, transaction, and model lifecycle events with both synchronous and asynchronous event handling.
-
Expressions
SQL expression language components providing pythonic query construction, column operations, and complex SQL generation with dialect-specific optimizations.
-
Object-Relational Mapping
Comprehensive ORM system handling object persistence, relationship management, inheritance mapping, and query generation with extensive customization options.
-
Pool
Connection pool management system providing connection recycling, overflow handling, and connection lifecycle management with configurable pooling strategies.