Namespace Plugins
sqldoc uses namespace plugins to transform SQL tags into additional SQL statements. Each namespace handles a specific concern -- audit trails, row-level security, validation, documentation, and more.
Tags are written as SQL comments (-- @namespace.tag(args)) and compiled into dialect-correct SQL at build time.
Available Namespaces
@anon
PostgreSQL Anonymizer security labels
@audit
Audit log tables and row-change triggers across supported database engines
@codegen
Project-level template execution for generated code and typed artifacts
@comment
SQL comments for Postgres tables, columns, and other schema objects
@deprecated
Marks schema objects as deprecated in SQL comments and generated docs
@docs
Schema documentation metadata plus project-level HTML/Markdown rendering
@history
History tables and change-tracking triggers for update/delete workflows
@lint
Tag-level lint suppressions for sqldoc rules
@pg
PostGraphile smart comments for PostgreSQL
@rls
Row-level security policies for PostgreSQL tables
@softdelete
Soft-delete columns, active views, and optional cascade triggers
@temporal
Temporal tables with current-row views and versioning triggers
@validate
Column-level validation constraints plus documentation and schema linting
Created a plugin?
If you've built a namespace plugin for sqldoc, we'd love to list it here. Open an issue and we can add it to this page.
