3 ms·
If you use Go and PostgreSQL, I’ve been working on a tool to help you “just use SQL” called sqlc[0]. It generates methods and structs for your queries, automati
by conroy 7y ago
If you use Go and PostgreSQL, I’ve been working on a tool to help you “just use SQL” called sqlc[0]. It generates methods and structs for your queries, automatically. It’s made a dramatic difference in my day-to-day workflow.
[0] https://github.com/kyleconroy/sqlc https://github.com/kyleconroy/sqlc
- brianm 7y agoI really like this! I particularly like that it is oriented around a useful workflow, rather than for just "small code at rest". It looks like it parses the schema to find type information (2 minute skim, so please forgive me if I got it wrong!) Hoe does it handle schema changes?
- conroy 7y agosqlc understands ALTER statements, so it can parse your migrations directory.