Merge pull request #743 from cosmix/develop

Adds 'unchanged' option to the SQL beautifier
This commit is contained in:
Glavin Wiechert 2016-02-20 15:26:18 -04:00
commit 0ed9e2ae31
2 changed files with 5 additions and 5 deletions

View File

@ -17,8 +17,8 @@ module.exports = class Sqlformat extends Beautifier
@tempFile("input", text) @tempFile("input", text)
"--reindent" "--reindent"
"--indent_width=#{options.indent_size}" if options.indent_size? "--indent_width=#{options.indent_size}" if options.indent_size?
"--keywords=#{options.keywords}" if options.keywords? "--keywords=#{options.keywords}" if (options.keywords? && options.keywords != 'unchanged')
"--identifiers=#{options.identifiers}" if options.identifiers? "--identifiers=#{options.identifiers}" if (options.identifiers? && options.identifiers != 'unchanged')
], help: { ], help: {
link: "https://github.com/andialbrecht/sqlparse" link: "https://github.com/andialbrecht/sqlparse"
}) })

View File

@ -37,11 +37,11 @@ module.exports = {
type: 'string' type: 'string'
default: "upper" default: "upper"
description: "Change case of keywords" description: "Change case of keywords"
enum: ["lower","upper","capitalize"] enum: ["unchanged","lower","upper","capitalize"]
identifiers: identifiers:
type: 'string' type: 'string'
default: "lower" default: "unchanged"
description: "Change case of identifiers" description: "Change case of identifiers"
enum: ["lower","upper","capitalize"] enum: ["unchanged","lower","upper","capitalize"]
} }