If you're looking for the ability to generate type-safe SQL – given you write SQL correctly – this project is pretty good.
Aalso a fan of SQLBoiler (https://github.com/volatiletech/sqlboiler) for Golang, for simple type safety:
`models.Accounts(models.AccountWhere.ID.EQ(id)).One(ctx, db)`.
Though SQLBoiler breaks with left joins, as it auto-generates your structs and maps results 1-1 with table definitions. In this case you have to custom type something, either using sqlc or squirrel.