but I use Square's really nice SQLDelight library to generate the SQL itself. If you're really bad at SQL like I am, it's useful. It checks all of your SQL at compile-time and turns it into constants on your Entity class
https://github.com/square/sqldelight