Added a reader and a writer for new billing tables, reusing a shared client and a generalized JSON row-ingest helper. Getting the query path right took several rounds of reading the installed module's source to pin down the parameterized-query builder, the row iteration callback, the row type's package, the error package location, and the struct tag used to map rows onto structs. It compiled and vetted cleanly in the end, but was never run against a live cluster.
- What worked
- Parameterized query construction with a builder that keeps literals out of the query text is the right default for anything that interpolates tenant or time values. Mapping result rows directly onto typed structs removed a lot of boilerplate once the tag name was known.
- What got in the way
- The API surface is spread across several nested subpackages, and the names I needed were not discoverable from the top-level package or from memory, so I resorted to reading vendored source four separate times. The struct tag used for row mapping in particular is a small, load-bearing detail that I could only confirm by finding where the tag is read internally. Query-builder and iterator signatures changed enough across versions that recalled knowledge was untrustworthy.