Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
pgdesign
command
|
|
|
internal
|
|
|
audit
Package audit provides normal form analysis (1NF through BCNF) for pgdesign schemas using declared functional dependencies and Bernstein synthesis.
|
Package audit provides normal form analysis (1NF through BCNF) for pgdesign schemas using declared functional dependencies and Bernstein synthesis. |
|
catalog
Package catalog is the shared, SCOPED pg_catalog query layer (roadmap 5.5+5.7).
|
Package catalog is the shared, SCOPED pg_catalog query layer (roadmap 5.5+5.7). |
|
chain
Package chain is the pure kernel of pgdesign's migration algebra: revision manifests, the parent-linked edge graph (the free category on edges), and three-way typed invertibility (roadmap kernel 1.4, laws L3 + L4 + L7).
|
Package chain is the pure kernel of pgdesign's migration algebra: revision manifests, the parent-linked edge graph (the free category on edges), and three-way typed invertibility (roadmap kernel 1.4, laws L3 + L4 + L7). |
|
codegen
Package codegen generates type-safe application-layer code from resolved pgdesign schemas across six target languages including Go, TypeScript, and Python.
|
Package codegen generates type-safe application-layer code from resolved pgdesign schemas across six target languages including Go, TypeScript, and Python. |
|
config
Package config loads and validates pgdesign.toml project configuration files including output targets, suppression rules, and extension declarations.
|
Package config loads and validates pgdesign.toml project configuration files including output targets, suppression rules, and extension declarations. |
|
diagnostic
Package diagnostic re-exports shared diagnostic types from pkg/diagnostic for use by internal pgdesign packages.
|
Package diagnostic re-exports shared diagnostic types from pkg/diagnostic for use by internal pgdesign packages. |
|
diff
Package diff compares two resolved schemas or a schema against a live database and produces a structured diff with risk annotations on each change.
|
Package diff compares two resolved schemas or a schema against a live database and produces a structured diff with risk annotations on each change. |
|
discover
Package discover provides automatic functional dependency discovery from live PostgreSQL data using the TANE algorithm (Huhtala et al., 1999).
|
Package discover provides automatic functional dependency discovery from live PostgreSQL data using the TANE algorithm (Huhtala et al., 1999). |
|
enc
Package enc is pgdesign's canonical per-object encoder: it maps each resolved model object to canonical JSON bytes, and decodes those bytes back to the object.
|
Package enc is pgdesign's canonical per-object encoder: it maps each resolved model object to canonical JSON bytes, and decodes those bytes back to the object. |
|
extregistry
Package extregistry implements the PostgreSQL extension capability registry, mapping extension names to the types, opclasses, and functions they provide.
|
Package extregistry implements the PostgreSQL extension capability registry, mapping extension names to the types, opclasses, and functions they provide. |
|
fd
Package fd provides functional dependency primitives including closure computation, minimal cover, candidate keys, and BCNF decomposition for audit.
|
Package fd provides functional dependency primitives including closure computation, minimal cover, candidate keys, and BCNF decomposition for audit. |
|
format
Package format implements canonical TOML formatting for pgdesign schema files, reordering sections via a comment-preserving go-toml-edit AST in place.
|
Package format implements canonical TOML formatting for pgdesign schema files, reordering sections via a comment-preserving go-toml-edit AST in place. |
|
generate
Package generate transforms a resolved model.Schema into PostgreSQL DDL output including tables, views, materialized views, functions, and triggers.
|
Package generate transforms a resolved model.Schema into PostgreSQL DDL output including tables, views, materialized views, functions, and triggers. |
|
graph
Package graph provides generic topological sorting and cycle detection algorithms used by model, generate, and format for dependency ordering.
|
Package graph provides generic topological sorting and cycle detection algorithms used by model, generate, and format for dependency ordering. |
|
imports
Package imports implements cross-repository schema imports (roadmap 7.2): the surface snapshot, pinning, and offline drift check for another pgdesign project's schema referenced via an [imports.<alias>] declaration.
|
Package imports implements cross-repository schema imports (roadmap 7.2): the surface snapshot, pinning, and offline drift check for another pgdesign project's schema referenced via an [imports.<alias>] declaration. |
|
introspect
Package introspect provides live PostgreSQL database introspection, extracting schema information from pg_catalog into the resolved IR model.
|
Package introspect provides live PostgreSQL database introspection, extracting schema information from pg_catalog into the resolved IR model. |
|
livenorm
Package livenorm implements LIVE ROUND-TRIP NORMALIZATION (roadmap 1.2, boundary item 4): the concrete diff.LiveNormalizer that resolves the ≈_pg RESIDUE — catalog-dependent cast materialization — that no pure normalizer can reach.
|
Package livenorm implements LIVE ROUND-TRIP NORMALIZATION (roadmap 1.2, boundary item 4): the concrete diff.LiveNormalizer that resolves the ≈_pg RESIDUE — catalog-dependent cast materialization — that no pure normalizer can reach. |
|
livestats
Package livestats fetches live table statistics from a running PostgreSQL server and shapes them into the generate.D2Options.Stats contract (a map keyed by model.TableKey).
|
Package livestats fetches live table statistics from a running PostgreSQL server and shapes them into the generate.D2Options.Stats contract (a map keyed by model.TableKey). |
|
migrate
Package migrate provides migration generation, application, rollback, squash consolidation, and safety linting with risk classification for schema changes.
|
Package migrate provides migration generation, application, rollback, squash consolidation, and safety linting with risk classification for schema changes. |
|
migrate/design
Package design is the phase-5 DESIGN GATE (roadmap subphase 5.0).
|
Package design is the phase-5 DESIGN GATE (roadmap subphase 5.0). |
|
model
Package model provides the resolved intermediate representation for pgdesign, the canonical in-memory schema that all downstream packages consume.
|
Package model provides the resolved intermediate representation for pgdesign, the canonical in-memory schema that all downstream packages consume. |
|
modelgen
Package modelgen is a pure random generator of VALID pgdesign models, built on pgregory.net/rapid so shrinking is structural and comes for free with the combinators.
|
Package modelgen is a pure random generator of VALID pgdesign models, built on pgregory.net/rapid so shrinking is structural and comes for free with the combinators. |
|
objstore
Package objstore is the content-addressed object store: a hash-keyed put/get map with deduplication, an on-disk layout under a configurable root, and codec-epoch awareness.
|
Package objstore is the content-addressed object store: a hash-keyed put/get map with deduplication, an on-disk layout under a configurable root, and codec-epoch awareness. |
|
parse
Package parse turns pgdesign schema TOML into a RawSchema.
|
Package parse turns pgdesign schema TOML into a RawSchema. |
|
parse/pgschema
Code generated by strictspec.
|
Code generated by strictspec. |
|
predicate
Package predicate is the migration PRECONDITION IR (roadmap 5.5+5.7, law L5's domain check / L1's single ≈_syn / L8).
|
Package predicate is the migration PRECONDITION IR (roadmap 5.5+5.7, law L5's domain check / L1's single ≈_syn / L8). |
|
project
Package project is the shared project-loading core: it reconciles a parsed schema set, the project's pgdesign.toml config, and the vendored import surface into ONE resolved model — the semtype registry (builtin + config [[extensions]] + user types + imported enums), the vendored import reference tables, and the config/toml pg_version tiers folded into schema.PGVersion.
|
Package project is the shared project-loading core: it reconciles a parsed schema set, the project's pgdesign.toml config, and the vendored import surface into ONE resolved model — the semtype registry (builtin + config [[extensions]] + user types + imported enums), the vendored import reference tables, and the config/toml pg_version tiers folded into schema.PGVersion. |
|
rev
Package rev is pgdesign's whole-model canonical form, revision identity, and the single JSON envelope serializer (roadmap kernel 1.5, laws L1 + L7).
|
Package rev is pgdesign's whole-model canonical form, revision identity, and the single JSON envelope serializer (roadmap kernel 1.5, laws L1 + L7). |
|
risk
Package risk provides shared risk classification for schema change operations, categorizing DDL statements by safety level for diff and migrate.
|
Package risk provides shared risk classification for schema change operations, categorizing DDL statements by safety level for diff and migrate. |
|
semtype
Package semtype implements the semantic type system for pgdesign, mapping user-defined enums, scalar domains, composite types, and state machines.
|
Package semtype implements the semantic type system for pgdesign, mapping user-defined enums, scalar domains, composite types, and state machines. |
|
serve
Package serve provides an HTTP API server and web UI for pgdesign schema inspection, validation, database statistics, and interactive exploration.
|
Package serve provides an HTTP API server and web UI for pgdesign schema inspection, validation, database statistics, and interactive exploration. |
|
splitfmt
Package splitfmt implements a sealed, terminal file format for carrying split SQL statements.
|
Package splitfmt implements a sealed, terminal file format for carrying split SQL statements. |
|
sql
Package sql provides shared SQL builder functions for PostgreSQL DDL generation, the single place where SQL text is constructed across all packages.
|
Package sql provides shared SQL builder functions for PostgreSQL DDL generation, the single place where SQL text is constructed across all packages. |
|
sqlexpr
Package sqlexpr is a recursive descent parser for a subset of PostgreSQL SQL expressions.
|
Package sqlexpr is a recursive descent parser for a subset of PostgreSQL SQL expressions. |
|
sqlparse
Package sqlparse wraps wasilibs/go-pgquery, a WASM-based PostgreSQL parser requiring no CGo, for SQL statement splitting and expression deparsing.
|
Package sqlparse wraps wasilibs/go-pgquery, a WASM-based PostgreSQL parser requiring no CGo, for SQL statement splitting and expression deparsing. |
|
sqlutil
Package sqlutil provides a shared adapter between the sqlexpr parser and the diagnostic package for consistent parse-error-to-diagnostic conversion.
|
Package sqlutil provides a shared adapter between the sqlexpr parser and the diagnostic package for consistent parse-error-to-diagnostic conversion. |
|
testenv
Package testenv binds the suite-wide test-environment floor.
|
Package testenv binds the suite-wide test-environment floor. |
|
typeinfo
Package typeinfo provides structured PostgreSQL type representation.
|
Package typeinfo provides structured PostgreSQL type representation. |
|
validate
Package validate provides the strict validation engine for pgdesign schemas, operating on the resolved IR to detect rule violations and anti-patterns.
|
Package validate provides the strict validation engine for pgdesign schemas, operating on the resolved IR to detect rule violations and anti-patterns. |
|
pkg
|
|
|
diagnostic
Package diagnostic provides shared error, warning, and hint reporting types used by schema compiler passes.
|
Package diagnostic provides shared error, warning, and hint reporting types used by schema compiler passes. |
|
genkit
Package genkit provides the generator interface contract and freshness/orphan orchestration for deterministic code generation pipelines.
|
Package genkit provides the generator interface contract and freshness/orphan orchestration for deterministic code generation pipelines. |
Click to show internal directories.
Click to hide internal directories.