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

3.1 Toc

3.1.1 Including only the first and second level nodes

3.1.2 Create css for Toc

3.2 Main content

3.2.1 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)

3.2.2 Create css for "format option area"

3.2.3 Create css for "sample sql area" (don't use ace editor in this html document)
Clone this wiki locally