internal/

directory
v1.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: Apache-2.0

Directories

Path 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.
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.
Package catalog is the static PostgreSQL system catalog (pg_catalog objects) the analyzer resolves types, functions, operators and casts against.
Package catalog is the static PostgreSQL system catalog (pg_catalog objects) the analyzer resolves types, functions, operators and casts against.
gen command
Command gen dumps the bootstrap catalog (pg_catalog objects) of the oracle's PostgreSQL into internal/catalog/data/*.tsv, and extension catalogs into internal/catalog/data/ext/<name>/.
Command gen dumps the bootstrap catalog (pg_catalog objects) of the oracle's PostgreSQL into internal/catalog/data/*.tsv, and extension catalogs into internal/catalog/data/ext/<name>/.
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).
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).
Package consumers indexes which Go statements depend on which relation columns: the side of a schema change a diff tool cannot see.
Package consumers indexes which Go statements depend on which relation columns: the side of a schema change a diff tool cannot see.
Package diff compares two schemas object by object and lists what it takes to turn one into the other.
Package diff compares two schemas object by object and lists what it takes to turn one into the other.
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.
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.
Package expand enumerates the finite set of SQL strings a query template can produce.
Package expand enumerates the finite set of SQL strings a query template can produce.
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.
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.
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?
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?
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.
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.
Package oracle runs a real PostgreSQL (embedded-postgres) and answers "what does PG say about this statement?" via PREPARE / Describe.
Package oracle runs a real PostgreSQL (embedded-postgres) and answers "what does PG say about this statement?" via PREPARE / Describe.
Package schema layers a user's schema.sql (tables, views, enums, domains, composites, functions, indexes) over the bootstrap catalog.
Package schema layers a user's schema.sql (tables, views, enums, domains, composites, functions, indexes) over the bootstrap catalog.
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).
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).
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.
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.

Jump to

Keyboard shortcuts

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