Documentation
¶
Overview ¶
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).
Every comparison is between canonical forms (dump.Canonical / dump.Load): the live side is read back through pg_dump, the target is applied to an embedded PostgreSQL and read back the same way, so the two compare object by object in PostgreSQL's own spelling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Subcommands = []string{"vet", "check", "diff", "apply", "verify-schema", "version", "help"}
Subcommands lists the names Main handles; anything else is the checker's business.
Functions ¶
func IsSubcommand ¶
IsSubcommand reports whether name is one of Subcommands.
Types ¶
This section is empty.