Documentation
¶
Overview ¶
Package sqlcdriver runs the pinned sqlc.
unison does not analyze SQL. sqlc does, and this package is the whole of unison's relationship with it: render a config, run the binary, report what it said. The orchestrator uses it to generate; the test suite uses it to prove the plugin round trip against a real analyzer rather than a hand-built protobuf.
Index ¶
Constants ¶
const RequireEnvVar = "UNISON_REQUIRE_SQLC"
RequireEnvVar turns a missing or mismatched sqlc from a skipped test into a failed one.
Locally, a clone without sqlc should still run everything else. In CI, a suite that quietly skips the tests that drive the real analyzer is worse than one that stops, because those are the tests that check anything at all.
Variables ¶
var PinnedVersion = strings.TrimSpace(pinnedVersionFile)
PinnedVersion is the sqlc release unison is built and tested against.
It is a pin rather than a floor because the CodeGenRequest protobuf is a moving target and the analysis it carries is the input to every shape decision here. A consumer whose sqlc differs is generating from a different analyzer than the one the golden files were produced by.
Functions ¶
Types ¶
This section is empty.