Generating read models for arbitrary queries / views
PostgreSQL database is very powerful. Why not to use full power of SQL queries?
...but nodody wants to map each time all columns. We want to get proper data types, right from database...
Let's say we have complex SQL read query. What is the missing parts is strictly typed representation of row of that query and some kind of data mapper.
Stretch goal would be to make support also for parameters. This would make .sql
files more powerful ten using views.
Current workaround could be to build view from query we want to read from and continue with standard table generation procedure.