-
However, you can use something like this https://github.com/go-reform/reform to help you with, I will call it automating the code writing. But I have always opted to one of the supported drivers and written a queries myself using for example this https://github.com/go-sql-driver/mysql.
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
go-sql-driver/mysql
Go MySQL Driver is a MySQL driver for Go's (golang) database/sql package (by go-sql-driver)
However, you can use something like this https://github.com/go-reform/reform to help you with, I will call it automating the code writing. But I have always opted to one of the supported drivers and written a queries myself using for example this https://github.com/go-sql-driver/mysql.
-
There's nothing particularly difficult or unusual. I run a small commercial website that has Go hitting a PostgreSQL db. I like https://github.com/jmoiron/sqlx to make the db queries. Yes, you have to know SQL, but that's a feature not a bug. It helps to know *how* and *why* things work. IMHO magic solutions like ORMs will eventually bite you.
-
I prefer pure SQL for ORMs, but string manipulation is a lot of boilerplate. SQL generation https://github.com/Masterminds/squirrel + sqlx + database driver (e.g. pgx) works best for my tasks.