Documentation
¶
Overview ¶
Package livedb implements a verify.Verifier backed by a real database via database/sql. It issues a Prepare for each query against the live server; a prepare failure becomes a per-query diagnostic with SeverityError.
This is a validity-only verifier: it confirms that queries can be parsed and prepared by the server but does not extract column-origin metadata or parameter types. For PostgreSQL and MySQL, origin/type refinement (the equivalent of what the SQLite verifier does with ColumnInfo) is future work. Consequently, the verified cache for these dialects records no verified column types — codegen falls back to the static type-mapping path.
Connectivity errors ¶
If the database cannot be reached (sql.Open succeeds but PingContext fails), Verify returns a non-nil error so the caller can report "could not connect" rather than silently producing an empty result set.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New returns a Verifier that prepares each query using the given database/sql driver and DSN. The driver must have been registered (via sql.Register or an init() blank-import) before calling Verify.
Dialect() returns driverName verbatim; callers that want a canonical name (e.g. "postgres" for pgx) should use the wrapper packages in internal/verify/postgres and internal/verify/mysql instead.
Types ¶
This section is empty.