-
use some lib that facilitates SQL generation, like Squirrel
-
InfluxDB
InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
-
db.go - contains the interfaces, structs, and constructors
-
For that, I used the lib go-sqlmock. So, for example, the following snippet is part of the person/service_test.go file:
-
I will present in this post a project that fits in the last category: sqlc.
-
Implement the Repository interface by writing the queries in code, perhaps using some solution like Squirrel or sqlx.
-
Sevalla
Deploy and host your apps and databases, now with $50 credit! Sevalla is the PaaS you have been looking for! Advanced deployment pipelines, usage-based pricing, preview apps, templates, human support by developers, and much more!