{"modulePath":"github.com/kr9ly/sqlshape","version":"v1.2.0","isStandardLibrary":false,"packages":{"items":[{"path":"github.com/kr9ly/sqlshape","name":"sqlshape","synopsis":"Package sqlshape makes SQL a first-class, statically checked citizen of a Go program.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/cmd/sqlshape","name":"main","synopsis":"Command sqlshape checks Go packages (`sqlshape ./...`, or `go vet -vettool=$(which sqlshape) ./...`), and manages the schema: `sqlshape diff`, `apply`, `verify-schema`.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/examples/1-tables","name":"tables","synopsis":"Package tables is the first sqlshape example: an order book on plain tables, the ground an ORM also covers, written as checked SQL instead.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/examples/2-views","name":"views","synopsis":"Package views is the second sqlshape example: the same order book as examples/1-tables, read through views.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/examples/3-database-api","name":"dbapi","synopsis":"Package dbapi is the third sqlshape example: the database as an API.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/examples/4-everything","name":"everything","synopsis":"Package everything is the fourth sqlshape example: a multi-tenant room booking service that uses the whole surface.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/internal/analyze","name":"analyze","synopsis":"Package analyze is the pure-Go PostgreSQL semantic analyzer: given a Schema and one SQL statement it derives parameter types, result columns (type, nullability, provenance) and PG-compatible errors, following the rules of PostgreSQL manual chapter 10 (type conversion) without running PostgreSQL.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/internal/catalog","name":"catalog","synopsis":"Package catalog is the static PostgreSQL system catalog (pg_catalog objects) the analyzer resolves types, functions, operators and casts against.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/internal/catalog/gen","name":"main","synopsis":"Command gen dumps the bootstrap catalog (pg_catalog objects) of the oracle's PostgreSQL into internal/catalog/data/\u003cmajor\u003e/*.tsv, and extension catalogs into internal/catalog/data/\u003cmajor\u003e/ext/\u003cname\u003e/.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/internal/cli","name":"cli","synopsis":"Package cli is the sqlshape command: `vet` (the go/analysis checker, also what a bare invocation runs so `go vet -vettool` keeps working), `check` (SQL outside Go, judged against the schema's obligations), `diff` (the DDL from a database or schema text to schema.sql), `apply` (a DDL file, checked by its end state and by the consumers of what it drops, then run), and `verify-schema` (drift between a database and schema.sql).","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/internal/consumers","name":"consumers","synopsis":"Package consumers indexes which Go statements depend on which relation columns: the side of a schema change a diff tool cannot see.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/internal/diff","name":"diff","synopsis":"Package diff compares two schemas object by object and lists what it takes to turn one into the other.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/internal/dump","name":"dump","synopsis":"Package dump reads a live PostgreSQL database back into a schema.Schema by way of `pg_dump --schema-only`, and gives schema text a canonical form: the dump of a fresh PostgreSQL the text was applied to.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/internal/expand","name":"expand","synopsis":"Package expand enumerates the finite set of SQL strings a query template can produce.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/internal/facts","name":"facts","synopsis":"Package facts is the data contract between a dialect's analyzer and the obligation checker: what one analyzed statement (one expansion) provably does, written down without any parser node, so that internal/obligation can judge declarations against it without knowing which database the statement was written for.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/internal/migrate","name":"migrate","synopsis":"Package migrate turns the difference between two schemas into DDL, and checks DDL by its end state: applied to a PostgreSQL holding the current schema, does the database read back as the target?","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/internal/obligation","name":"obligation","synopsis":"Package obligation checks the boundary rules a schema declares against the facts an analyzer derived from a statement: a table (view, schema) requires something of every statement that touches it, the statement's facts either discharge that requirement or they do not, and the ways they can discharge it are few and named.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/internal/oracle","name":"oracle","synopsis":"Package oracle runs a real PostgreSQL (embedded-postgres) and answers \"what does PG say about this statement?\" via PREPARE / Describe.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/internal/pgparse","name":"pgparse","synopsis":"Package pgparse is the SQL parser: libpg_query compiled to WebAssembly and run by wazero.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/internal/schema","name":"schema","synopsis":"Package schema layers a user's schema.sql (tables, views, enums, domains, composites, functions, indexes) over the bootstrap catalog.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/internal/verify","name":"verify","synopsis":"Package verify compares the analyzer's conclusion about a statement with a running PostgreSQL's: parameter types, result column names and types, and whether the statement is rejected (by SQLSTATE class).","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/internal/vet","name":"vet","synopsis":"Package vet is the go/analysis analyzer: it finds sqlshape.Query[R, P](literal) calls, expands each template, checks every expansion against schema.sql and matches result columns / parameters against R / P.","isRedistributable":true},{"path":"github.com/kr9ly/sqlshape/pgtest","name":"pgtest","synopsis":"Package pgtest starts a real PostgreSQL with a schema.sql applied, for testing the database side of an application (views, functions, triggers, constraints) from Go the same way the checker's oracle does.","isRedistributable":true}],"total":23}}
