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)
"--reindent"
"--indent_width=#{options.indent_size}" if options.indent_size?
"--keywords=#{options.keywords}" if options.keywords?
"--identifiers=#{options.identifiers}" if options.identifiers?
"--keywords=#{options.keywords}" if (options.keywords? && options.keywords != 'unchanged')
"--identifiers=#{options.identifiers}" if (options.identifiers? && options.identifiers != 'unchanged')
], help: {
link: "https://github.com/andialbrecht/sqlparse"
})

View File

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