Hacker GitHub

← All repos

jschaf/pggen

View on GitHub ↗ ★ 317 Go

Generate type-safe Go for any Postgres query. If Postgres can run the query, pggen can generate code for it.

8 mentions on Hacker News by 2 people: 0 stories, 8 comments · first 2021-03-10 · latest 2023-01-06

Mentions per year 8 mentions · busiest year 2021 (7)
20082026
  1. …layer needs a mechanism to template SQL. I haven't built this out yet but would like to. [1]: https://github.com/jschaf/pggen
    comment by sa46 · 2023-01-06 · in Ask HN: ORM or Native SQL?
  2. …statements, 120 "UPDATE" statements, 120 "DELETE" statements as raw strings Yes. For example: https://github.com/jschaf/pggen/blob/main/example/erp/order/... . > that is also using an ORM ORM as a term covers a wide swathe of usage. In the…
  3. …Some things are easier with an ORM, like dynamic ordering or dynamic group-by clauses. [1]: https://github.com/jschaf/pggen Similar comment from a few months ago comparing Go approaches to SQL: https://news.ycombinator.com/item?id=28463938
  4. You might like pggen (I’m the author) which only supports Postgres and pgx. https://github.com/jschaf/pggen pggen occupies the same design space as sqlc but the implementations are quite different. Sqlc figures out the query types using…
  5. …. https://github.com/gnormal/gnorm . [1]: https://github.com/opendoor/pggen [2]: https://github.com/jschaf/pggen
  6. …[1]: https://docs.google.com/document/d/1NvVKD6cyXvJLWUfqFYad76CW... Disclaimer: author of pggen ( https://github.com/jschaf/pggen ), inspired by sqlc
  7. …directly to protobuf to avoid the serialization dance of Go structs to Proto structs. [1]: https://github.com/jschaf/pggen
  8. …model; it's just SQL and the tools automate the mapping between database rows and Go structs. [1]: https://github.com/jschaf/pggen [2]: https://github.com/kyleconroy/sqlc