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), `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), `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 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 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. |
Click to show internal directories.
Click to hide internal directories.