Skip to content

SQL Preview document generation

Tako Lee edited this page Apr 22, 2014 · 16 revisions

Generate a "SQL coding standard and guideline" html document based on sql format options user selected via this web app: sql style: http://www.wangz.net/sqlstyle/

User can set format options one by one, or loading from existing json file.

https://github.com/sqlparser/sql-pretty-printer/blob/master/sqlFormatOption.json

  1. Generate a single html file, css should be included inline.
  2. Use Javascript to generate this html file based on format options.
  3. Structure of this html
  • TOC
    • Including only the first and second level nodes
    • Create css for TOC
  • Main content
    • Create dedicated css for each level node title (From 1st to 5th, 5 CSS for 5 level node, the most frequently used css should the first 3 levels)
    • Create css for "format option area"
    • Create css for "sample sql area" (don't use ace editor in this html document)
Clone this wiki locally