Documentation
¶
Overview ¶
Package drivertest is the reusable conformance suite for a TableX Dialect.
Every rule the rest of the application relies on but cannot enforce with a type — quoting that round-trips, placeholders that are consistently positional or consistently numbered, a LIMIT clause that survives a 64-bit offset, and capability flags that agree with the optional interfaces the dialect actually implements — is asserted here once instead of being rediscovered per engine.
A new engine wires itself in with a single call:
func TestConformance(t *testing.T) { drivertest.RunDialectSuite(t, dialect{}) }
or, for the built-in engines, simply by being registered — the suite in internal/driver runs over driver.All(). RunDialectSuite needs no database. RunConnectionSuite is the second half: it needs a live connection and checks that introspection populates the engine-neutral model the handlers read.
See docs/adding-an-engine.md for the full contract.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunConnectionSuite ¶
RunConnectionSuite is the half that needs a database. It creates a small table through the dialect's own DDL, introspects it, and asserts the engine-neutral model the handlers read is actually populated — which is the part no amount of pure-function testing can prove.
scope is where the table is created (Database, plus Schema on an engine with schemas). The table is dropped on the way out.
Types ¶
This section is empty.