This repository contains various tests/spikes with SQL databases in Go.
The idea we're chasing here is to use be able to connect to a MySQL instance regardless where the code is running (local, dockerized, GCP, AWS, Azure, you name it) and without additional infrastructure components.
- You change the connection string only.
- The code doesn't change.
- The infrastructure doesn't change. E.g. you don't run a CloudSQL Proxy on GCP. Everything is self-contained.
Notice that this doesn't work in a Dockerized environment yet. We need to wait for this issue.
The code will create a people
table in a database with a Created
column that has microsecond precision.
Notice that we cannot have nanosecond precision, as there is no
database I know of that supports nanosecond precision. However,
the Go time.Time
has nanosecond precision. So there might be dragons.
MIT.