General SQL Parser and SQL Pretty Printer Formatter options (updated in 05/04/2012)

  • Select
  • Insert
  • Update
  • Create table
    • Create table
      • gFmtOpt.BEStyle_createtable_leftBEOnNewline
      • gFmtOpt.BEStyle_createtable_rightBEOnNewline
      • gFmtOpt.Createtable_ListitemInNewLine
      • gFmtOpt.Createtable_Fieldlist_Style_option
      • gFmtOpt.BEStyle_createtable_leftBEIndentSize (new added, 04/27/2012)
      • gFmtOpt.BEStyle_createtable_rightBEIndentSize (new added, 04/27/2012)
      • gFmtOpt.Createtable_Fieldlist_Style (new added, 04/27/2012)
      • gFmtOpt.Createtable_Fieldlist_Comma_option (new added, 04/27/2012)
  • Common Table Expression
  • declare statement
  • Execute statement
    • execute statement
      • gFmtOpt.LinebreakBeforeParamInExec
      • Beautify sql inside execute statement>
  • Expression
  • Parameters in create procedure/function
    • Parameters
      • gFmtOpt.BEStyle_Function_leftBEOnNewline
      • gFmtOpt.BEStyle_Function_leftBEIndentSize
      • gFmtOpt.BEStyle_Function_rightBEOnNewline
      • gFmtOpt.BEStyle_Function_rightBEIndentSize
      • gFmtOpt.BEStyle_Function_FirstParamInNewline
      • gFmtOpt.Parameters_Style
      • gFmtOpt.Parameters_Comma
  • Parameters in function Call
    • Parameters
      • gFmtOpt.FunctionCall_Parameters_Style
      • gFmtOpt.FunctionCall_Parameters_Comma
      • Layout of decode function doesn't controlled by above format options, it always format like this.
  • Case expression/statement
    • When Then clause
      • gFmtOpt.CaseWhenThenInSameLine
      • gFmtOpt.Indent_CaseFromSwitch
      • gFmtOpt.Indent_Case_Then
      • gFmtOpt.CaseWhenInSamelineAsCase (new added, 04/27/2012)
      • gFmtOpt.CaseThenExprInNewline (new added, 04/27/2012)
      • gFmtOpt.CaseElseExprInNewline (new added, 04/27/2012)
  • Alignments
  • Blank lines
    • Blank lines
      • gFmtOpt.EmptyLines, handle of empty lines
      • gFmtOpt.InsertBlankLineInBatchSqls, blank lines between sql statements
      • gFmtOpt.NoEmptyLinesBetweenMultiSetStmts, if this value is true, then don't insert blank lines between multiple set/declare statements when InsertBlankLineInBatchSqls is true. When set to true, this option takes effect even if gFmtOpt.EmptyLines = eloMergeIntoOne or eloPreserve
  • Whitespace
    • Padding
      • gFmtOpt.WSPadding_OperatorArithmetic, space around operator of arithmetic expression.
      • gFmtOpt.WSPadding_ParenthesesInFunction, space inside Parenthesis in create function/procedure
      • gFmtOpt.WSPadding_ParenthesesInExpression, space inside Parenthesis in expression
      • gFmtOpt.WSPadding_ParenthesesOfSubQuery, space inside Parenthesis in subquery
      • gFmtOpt.WSPadding_ParenthesesInFunctionCall, space inside Parenthesis in function call.
      • gFmtOpt.WSPadding_ParenthesesOfTypename, space inside Parenthesis of typename in create table.
  • Indentation
    • General
      • gFmtOpt.IndentLen, general indentation size, used to indent if no specific indent option provided.
      • gFmtOpt.UseTab, Use tab to indent, if other indent size less than gFmtOpt.TabSize, then all that size will be set to gFmtOpt.TabSize. this option works only when output is plain text.
      • gFmtOpt.TabSize
    • Block/Begin..End
      • gFmtOpt.BEStyle_Function_BodyIndent, function body indent size, stmts inside create function/procedure/trigger. indent from top function level. if first statement is a block(begin .. end), then indent was determined by BEStyle_Block_leftBEIndentSize
      • gFmtOpt.BEStyle_Block_leftBEOnNewline, begin keyword in new line, apply to begin keyword in if/while/loop statement only.
      • gFmtOpt.BEStyle_Block_leftBEIndentSize, indent of begin keyword
      • gFmtOpt.BEStyle_Block_rightBEIndentSize,indent of end keyword
      • gFmtOpt.BEStyle_BlockIndentSize, block body indent size, stmts inside begin/end. indent from begin keywords
      • gFmtOpt.BEStyle_IfElseSingleStmtIndentSize, Indent size of single stmt in if stmt.
  • Capitalisation
    • Case options for various token
      • gFmtOpt.case_keywords
      • gFmtOpt.case_identifier
      • gFmtOpt.case_quoted_Identifier
      • gFmtOpt.case_table_name
      • gFmtOpt.case_column_name
      • gFmtOpt.case_alias_name
      • gFmtOpt.case_variable_name
      • gFmtOpt.case_prefix_identitfer
      • gFmtOpt.identifier_prefix_list
      • gFmtOpt.case_funcname
      • gFmtOpt.case_builtinfunc (not available yet)
      • gFmtOpt.case_datatype
      • gFmtOpt.DictionaryFile, used to find word when TCaseOption is set to coInitCapEachWord
  • Syntax highlighting
    • Syntax highlighting for various token(valid when output is html or RTF)
      • gFmtOpt.HighlightingElements[sfkComment_dh]
      • gFmtOpt.HighlightingElements[sfkComment_ss]
      • gFmtOpt.HighlightingElements[sfkIdentifer]
      • gFmtOpt.HighlightingElements[sfkstandardkeyword]
      • gFmtOpt.HighlightingElements[sfkNumber]
      • gFmtOpt.HighlightingElements[sfkDatatype]
      • gFmtOpt.HighlightingElements[sfkFunction]
      • gFmtOpt.HighlightingElements[sfkBuiltInFunction]
      • gFmtOpt.HighlightingElements[sfkSymbol]
      • gFmtOpt.HighlightingElements[sfkSQString]
      • gFmtOpt.HighlightingElements[sfksqlvar]
      • gFmtOpt.HighlightingElements[sfkOpenBracket]
      • gFmtOpt.HighlightingElements[sfkCloseBracket]
      • gFmtOpt.HighlightingElements[sfkmssqlst1]
      • gFmtOpt.HighlightingElements[sfkmssqlsystemvar]
      • gFmtOpt.HighlightingElements[sfkoraclesqlplus]
      • gFmtOpt.HighlightingElements[sfkoracleexception]
      • gFmtOpt.HighlightingElements[sfkbindvar]
  • Comments
    • comment options
      • --begin_no_format, --end_no_format, comment used to keep layout of original sql block.
  • Preprocess
    • Preprocess options
      • gFmtOpt.RemoveLinebreakBeforeParse, remove linebreaks of input before format sql.
      • gFmtOpt.TrimQuotedCharOfEachline, remove quoted char of input before format sql.
      • gFmtOpt.QuotedCharOfEachLine, char need to be removed when gFmtOpt.TrimQuotedCharOfEachline is true.
  • Formatting type and value reference
    • Reference
      • TAlignStyle
      • TAlignOption
      • TLinefeedsCommaOption
      • TCaseOption
      • TEmptyLinesOption
      • TLzHighlightingElement