Open-sourcing SQX, a way to build flexible database models in Go

  • This looks interesting. The only db libraries I can stand are sql query builders. I have experienced way too much pain with orms over the years. They work until you have to do anything slightly complicated and they either get very difficult to use or very slow

  • I like goqu (https://github.com/doug-martin/goqu), which has support for most SQL dialects. How does this compare?

  • 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/

  • Does this support loading nested models? Lack of this has been a huge pain point with other DB tooling for Go.

  • i like xo's approach https://github.com/xo/xo but it is as is. I would love if something similar comes along that is used by db practititoners that is actively used and supported.

  • We are really happy using jet. It lets you write type safe SQL and can read the results into structs- including joins into slice fields.

    https://github.com/go-jet/jet

  • [flagged]