3 ms·
If the macro can open a connection to a database, query the schema, and use the results to construct/inject types into the source, all at compile time, then yes
by saosebastiao 11y ago
If the macro can open a connection to a database, query the schema, and use the results to construct/inject types into the source, all at compile time, then yes. That is basically what Slick's type-checked SQL API is doing in Scala.
It sounds like something that might be a practical disaster if you don't have incremental compilation though.