How tudborg/elixir_interval works
Component Relationships
a) Behavioral Relationships
• Interval.Behaviour as a contract that all interval types implement
• Intervalable protocol to all implementing types
b) Database Integration
• Interval.Support.EctoType connecting to the interval types
• A connection to PostgreSQL's range types (external system)
Specific Elements
a) Core Components (Rectangles):
┌─────────────────┐
• Interval Module │
• ┘
┌─────────────────┐ ┌─────────────────┐
• Integer Type │ │ Float Type │
• ┘ └─────────────────┘
• ...etc...
b) Interfaces (Interfaces/Protocols):
╭─────────────────╮
• Intervalable │
• Protocol │
╰─────────────────╯
c) External Systems:
┌──────────────┐
• PostgreSQL │
• Range Types │
• ┘
Important Details to Capture
• That all interval types can be either discrete or continuous
• Ecto integration capability
• Relationship with PostgreSQL range types
• A note about bound types ([], (), [), (])