livedb

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 6 Imported by: 0

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

func New(driverName, dsn string) verify.Verifier

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL