3 ms·
I wasn't happy with the current database access packages (https://github.com/jmoiron/sqlx https://github.com/jmoiron/sqlx, https://gorm.io https://gorm.io), so
by conroy 7y ago
I wasn't happy with the current database access packages (https://github.com/jmoiron/sqlx https://github.com/jmoiron/sqlx, https://gorm.io https://gorm.io), so I wrote my own for PostgreSQL. It takes existing queries and generates type-safe Go methods (https://github.com/kyleconroy/sqlc https://github.com/kyleconroy/sqlc). I enjoy using it and thought others might too.
As for migrations, I've had success with https://github.com/pressly/goose https://github.com/pressly/goose. It's lightweight and is also just SQL.
- erik_seaberg 7y agoNice, much like people would use Pro*C to generate C to talk to Oracle. I think converting a DSL to boilerplate (which should rarely be read and never edited) is key to living with a language that isn't good at reusable abstractions.
- badrequest 7y agoI've been using Darwin(1) for migrations, personally. ^1: https://github.com/GuiaBolso/darwin https://github.com/GuiaBolso/darwin