Type-Checking SQL Queries With Crystal Macros

The aim of the game here is to use as few macros as possible. I could just have one macro that parses an SQL query, but the fun here is to use the Crystal type system to check the query for us, similar to how I used the type system to implement dependency injection . I’ll be avoiding macros, but I’ll be using macro methods heavily, as they let you introspect on the types of variables. The API…