Live data from Hacker News

Sqlc: Compile SQL to type-safe code

sqlc.dev

1–10 of 109 posts

Re: Sqlc: Compile SQL to type-safe code

#6
post #2

Have been enjoying go-jet that takes a different approach: analyzes the tables in your DB and generates a set of Golang structs that lets you write 100% Golang code that looks like 99% SQL. Genius! https://github.com/go-jet/jet

Oh, so it's jOOQ but for Go. Nice. Sadly it does not support most custom Postgres things.

Re: Sqlc: Compile SQL to type-safe code

#7
post #2

Have been enjoying go-jet that takes a different approach: analyzes the tables in your DB and generates a set of Golang structs that lets you write 100% Golang code that looks like 99% SQL. Genius! https://github.com/go-jet/jet

Sqlboiler takes a similar approach https://github.com/volatiletech/sqlboiler

Re: Sqlc: Compile SQL to type-safe code

#10
post #2

Have been enjoying go-jet that takes a different approach: analyzes the tables in your DB and generates a set of Golang structs that lets you write 100% Golang code that looks like 99% SQL. Genius! https://github.com/go-jet/jet

Oh, so it's jOOQ but for Go. Nice. Sadly it does not support most custom Postgres things.

XO doesn’t have them built-in, but it uses easily customizable templates.

I added support for a bunch of postgres fancy stuff in a previous app, it wasn’t too difficult

https://github.com/xo/xo

Post reply on HN