|9 months ago||3 days ago|
|GNU General Public License v3.0 or later||MIT License|
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Tools to generate type safe code models from Postgres schema?
3 projects | reddit.com/r/PostgreSQL | 27 Mar 2022
I was looking around more and I found this OCaml library: https://github.com/darioteixeira/pgocaml
Ask HN: What is the killer app/library of your favorite language?
2 projects | news.ycombinator.com | 20 Feb 2022
Although I haven't had to use it in several years, I'm quite fond of the OCaml extension I wrote which integrates PostgreSQL statements directly into the language. Values are type-checked across the boundary, SQL commands are validated at compile time, and proper prepared statements get generated (also at compile time). It's a little bit like MS Linq in concept, but it works by using PGSQL "DESCRIBE" to send the statement to the PostgreSQL server when compiling the code to do the validation and get the types. It really made writing database-baked websites less of a grind. https://github.com/darioteixeira/pgocaml
Flyweight: An ORM for SQLite
9 projects | news.ycombinator.com | 29 Sep 2022
How to enforce types on mongoose model
3 projects | reddit.com/r/typescript | 27 Sep 2022
Ask HN: Companies of one, what is your tech stack?
8 projects | news.ycombinator.com | 23 Sep 2022
- Golang + sqlc: I used Rails SQL schema to pair it with golang sqlc https://sqlc.dev/ it makes write SQL way easier
No ORM 1:M Relationship
4 projects | reddit.com/r/golang | 17 Sep 2022
But it’s still worth learning SQL well. Go has a lot of libraries to work with SQL directly, eg sqlc. The Java world has jOOQ.
Ent vs Bun?
2 projects | reddit.com/r/golang | 14 Sep 2022
What about sqlc? You have control over your queries and autogenerated types, and that gives you a lot of flexibility. You can use the standard sql lib or pgx with it.
Why I love Go
2 projects | reddit.com/r/golang | 13 Sep 2022
Recently have started working with sqlc. Generates simple idiomatic go using the standard drivers and lets you focus on the logic rather than wrestling with the framework.
Which ORM framework are you using with golang, and why?
11 projects | reddit.com/r/golang | 10 Sep 2022
I typically use sqlc instead of any other ORM alternatives, in cases where you may need to build queries dynamically, for example when conditions are driven by Go code you may consider using squirrel for those cases.
Decent examples querying models from Postgres
6 projects | reddit.com/r/golang | 5 Sep 2022
For me sqlc work wonders. If you are developing a user facing api and are fine to go with graphql, with gqlgen you can even autobind (search the page for @goModel) the models that sqlc generates from your queries. A glorious match
Learning a new language, or how I gained familiarity with Go
9 projects | news.ycombinator.com | 17 Aug 2022
I wish more people encouraged people new to Go to look at some of the targets you'll arrive at so that people don't come into Go thinking the end result is going to be using the Go version of Laravel, Spring, or Rails.
Go has some interesting ideas about models/ORM's, OpenAPI, validation, templates, embedded binary files and other things. When types mater, like in Go, code generation is often very important as well which isn't as common in scripting languages.
https://goa.design/ for grpc/rest servers based on specs
https://gokit.io/ for microservices
https://github.com/mustafaakin/gongular for object-based validation
https://sqlc.dev/ for generated models based on SQL (skip the whole idea of an ORM)
https://github.com/jmoiron/sqlx for more traditional object population from SQL
https://pkg.go.dev/errors for an understanding of wrapping errors and nested error causes
https://gqlgen.com/ for auto-generated revolvers based on GraphQL schemas
https://pkg.go.dev/io#Reader all the Reader/Writer/Closer's as they are everywhere since Go cares about performance and therefore streaming abilities. No more string passing.
sqlc patterns in production
4 projects | reddit.com/r/golang | 16 Aug 2022
sqlc recently added support custom struct tags. You can read up on it here or check out one of the testdata files for reference
What are some alternatives?
sqlx - general purpose extensions to golang's database/sql
GORM - The fantastic ORM library for Golang, aims to be developer friendly
SQLBoiler - Generate a Go ORM tailored to your database schema.
pgx - PostgreSQL driver and toolkit for Go
ent - An entity framework for Go
go - The Go programming language
xo - Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server
PyPika - PyPika is a python SQL query builder that exposes the full richness of the SQL language using a syntax that reflects the resulting query. PyPika excels at all sorts of SQL queries but is especially useful for data analysis.
goqu - SQL builder and query library for golang
Squirrel - Fluent SQL generation for golang
jet - Type safe SQL builder with code generation and automatic query result data mapping
migrate - Database migrations. CLI and Golang library.