How rom-rb/rom-sql works
Main Components Identification
The system should be represented with these key components:
a) Core Components:
• Gateway Layer (SQL Connection Handler)
• Relations Layer
• Commands Layer
• Schema Layer
• Migration System
• Plugin System
b) Database Support:
• PostgreSQL Extensions
• MySQL Extensions
• SQLite Extensions
Top Layer: Application Interface
Middle Layers:
• Relations System
• Reading Operations
• Writing Operations
• Command System
• Create Commands
• Update Commands
• Delete Commands
• Schema System
• Attribute Management
• Index Management
• Type System
Bottom Layer: Gateway (Database Connections)
Key Relationships to Highlight
• Demonstrate how associations (many-to-many, one-to-many, etc.) interact with relations
• Migration system's interaction with the schema layer
Implementation Details
• Association Types (many_to_many, one_to_many, etc.)
• Command Operations (create, update, delete)
• Schema Operations (inferring, attributes, indexes)
• Transaction Support
• Query Interface
┌─────────────────────────────────────────────┐
• Public Interface │
• ┤
• Relations & Commands │
• ┤
• Schema & Types │
• ┤
• Database Adapters │
• ┘
Additional Notes
• Keep the focus on the SQL-specific components rather than the general ROM architecture
• Extensibility points for different databases
• How the plugin system integrates with the core components
• Migration system's relationship with the schema management