Our great sponsors
-
https://github.com/kyleconroy/sqlc will generate Go structs for inputs & outputs of Postgres queries, that'll get you type safety.
-
Hi fellow Gophers, I have a question involving both (Postgre-) SQL and Go. For a hobby project, I so far have used plain SQL with some additional filtering logic and pgx to to retrieve rows and mapped these rows to structs manually. This worked quite well as the types were rather simple and only involved 1-3 SQL tables.However, I now do have a more complex struct type with 10 underlying SQL tables including some nested structs and slices. I feel that my prior strategy of plain SQL query strings doesn't scale to retrieve data from the SQL DB even for this moderatly complex struct type.
-
InfluxDB
Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
-
Check https://github.com/go-jet/jet. It supports arbitrary nested structs. Also it works well with pgx, as a driver.
-
bun and go-pg both seem to work fairly well for these kind of purposes.
-
bun and go-pg both seem to work fairly well for these kind of purposes.
-
didn’t know jet, any major difference with https://github.com/volatiletech/sqlboiler?
-
I like to use pgxscan from https://github.com/georgysavva/scany
-
SonarLint
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
-
https://github.com/avelino/awesome-go is good place to start.