Skip to main content

Module render

Module render 

Source
Expand description

Markdown renderers for hover bodies.

Table hover ships both a column-list table AND a synthesised CREATE TABLE block so the user sees the source-level shape (types, NOT NULL, DEFAULT, FK targets) in one glance. Column / function / column-decl hovers each have their own renderer.

Functions§

column
column_decl
Render a column declaration with no implicit-spec data.
column_decl_with_implicit
Render a column declaration plus every implicit spec derived from the parent table (PRIMARY KEY -> NOT NULL + UNIQUE, FOREIGN KEY, SERIAL / IDENTITY -> NOT NULL + auto-increment). The result is the “full spec view” – declared + implicit, in one table.
column_in_tables
column_with_catalog
Variant of [column] that also lists every FK in the catalog pointing at this column. The hover handler uses this when the catalog is in scope.
function_full
Render a DB-side function with signature + return type + body when available. Body is taken from the comment field, where introspection stashes the pg_get_functiondef() output.
table
table_ddl
Synthesise a CREATE TABLE that mirrors the catalog. Columns first, then constraints. Aligned name + type columns for readability. Keywords are cased according to the active hover keyword case (set by dsl_hover::hover_with).
table_with_catalog
Render the table card + every catalog-wide attachment found via cat (inbound FKs from other tables, sequences owned by this table’s columns). Used by the hover handler which has the full catalog in scope; resolver.rs (which doesn’t) keeps calling table() for the bare card.
user_type