Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I'd stick with this approach rather than trying to learn Gorm as well. Simple is really your friend at this point. Note that because you aren't using Gorm you will need some other way of creating your tables. The simplest way of doing this is just to execute SQL table creation DDL statements manually using `psql`. There are separate migration packages for Go, but all that can come later I think. Note also that the old `pq` driver for Postgres is in maintenance mode, so maybe look at https://github.com/jackc/pgx which seems to be the recommended way of connecting to Postgres going forward.
My advice I think would be to try and break this down into stages. First of all I think you need to get comfortable with how to work with a database from Go, so separately from your main application just create a new throwaway folder and start messing about with connecting and then inserting/retrieving data. This site has some good basic info about that part of things: http://go-database-sql.org/
Related posts
- Setting up a Database Driver, Repository and Implementation of a transaction function for your Go App
- Replacing Complicated Hashmaps with SQLite
- The DDD Hamburger for Go
- Show HN: Sqinn-Go is a Golang library for accessing SQLite databases in pure Go
- Show HN: Sqinn-Go is a Golang library for accessing SQLite databases in pure Go