3 ms·
This does look like it's a little bit better than a lot of the other options in the Go ecosystem for database access, but this introduction misses something imp
by jchw 3y ago
This does look like it's a little bit better than a lot of the other options in the Go ecosystem for database access, but this introduction misses something important: what SQL dialects does this support? It appears to be partly a wrapper around Squirrel. Squirrel is not new (and apparently also no longer being updated) but I actually have no idea which and how much of each SQL dialect Squirrel supports.
Every time I see SQL and Go stuff, I feel literally obligated to introduce people to sqlc. That said, sqlc only has good support for PostgreSQL, and you'd have to generate code for each dialect... so that's something worth considering. (I still find it to be one of my favorite SQL tools, even with its issues.)
https://sqlc.dev/ https://sqlc.dev/
- superb_dev 3y agoSQLc is amazing, I think it should be the gold standard for SQL in Go
- deleted 3y ago[deleted]
- resharpe105 3y agoI can atest to this. Sqlc is awesome.
- dgb23 3y agoI used sqlc with sqlite. The support seems fine there. In general, sqlc is very nice to use. It works well out of the box with a standard config. You can also override a lot of things. One of the nice extras about sqlc is that it doesn't feel like a real dependency. You don't actually include sqlc anywhere. You just use a config and the cli to generate Go code that relies on the std library. The generated code is very straight forward std Go code that you could write by hand. A couple of reasons to use Go in a project would be great support for IO, stability, great tooling, low operational complexity and minimal dependencies. sqlc fits nicely in there.