schemazen
schemazen copied to clipboard
Fixing bug with ? : not parsing, Add Sql Formatter option to scripting
The logical ordering of ? : ? failed to parse correctly in VS2019 on windows. Added ( ) to resolve issue
Added a Pretty Printer for scripting. This SQL Reformatter supports the following options (read from sqlformat.json). If this file is missing, it is created from the default values.
"Options":{
"KeywordCasing":1,
"IndentationSize":4,
"IncludeSemicolons":false,
"AlignColumnDefinitionFields":true,
"NewLineBeforeFromClause":true,
"NewLineBeforeWhereClause":true,
"NewLineBeforeGroupByClause":true,
"NewLineBeforeOrderByClause":true,
"NewLineBeforeHavingClause":true,
"NewLineBeforeJoinClause":true,
"NewLineBeforeOffsetClause":true,
"NewLineBeforeOutputClause":true,
"AlignClauseBodies":true,
"MultilineSelectElementsList":true,
"MultilineWherePredicatesList":true,
"IndentViewBody":false,
"MultilineViewColumnsList":true,
"AsKeywordOnOwnLine":true,
"IndentSetClause":false,
"AlignSetClauseItem":true,
"MultilineSetClauseItems":true,
"MultilineInsertTargetsList":true,
"MultilineInsertSourcesList":true,
"NewLineBeforeOpenParenthesisInMultilineList":false,
"NewLineBeforeCloseParenthesisInMultilineList":true
}
}
I just discovered this tool today and did the same fix on my own fork. Splitting the build fix commit and reformat feature commit to separate PRs may make them easier to be pulled here.