Skip to main content

render_table

Function render_table 

Source
pub fn render_table(t: &Table) -> String
Expand description

Render a Table as SQL.

Produces:

  1. CREATE TABLE <qname> (...); — with inline columns and all non-FK constraints.
  2. Optional COMMENT ON TABLE ... IS '...';
  3. Optional COMMENT ON COLUMN ... for each column that has a comment.

FK constraints are NOT included inline; use render_add_fk for those.