Merge pull request #743 from cosmix/develop
Adds 'unchanged' option to the SQL beautifier
This commit is contained in:
commit
0ed9e2ae31
|
@ -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"
|
||||||
})
|
})
|
||||||
|
|
|
@ -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"]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue