Skip to content

Commit b57fded

Browse files
committed
Add sqlLiteralCase option
1 parent b6d7eb6 commit b57fded

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/options.ts

+24
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Node, ParserOptions as CstParserOptions } from "sql-parser-cst";
33

44
export interface SqlPluginOptions {
55
sqlKeywordCase: "preserve" | "upper" | "lower";
6+
sqlLiteralCase: "preserve" | "upper" | "lower";
67
sqlParamTypes: NonNullable<CstParserOptions["paramTypes"]>;
78
sqlCanonicalSyntax: boolean;
89
sqlFinalSemicolon: boolean;
@@ -36,6 +37,29 @@ export const options: SupportOptions = {
3637
},
3738
],
3839
},
40+
sqlLiteralCase: {
41+
type: "choice",
42+
category: "SQL",
43+
default: "upper",
44+
description: "Enforces upper/lower case for SQL literals",
45+
choices: [
46+
{
47+
value: "preserve",
48+
description: "preserves the existing case",
49+
since: "0.14.0",
50+
},
51+
{
52+
value: "upper",
53+
description: "forces all keywords to uppercase",
54+
since: "0.14.0",
55+
},
56+
{
57+
value: "lower",
58+
description: "forces all keywords to lowercase",
59+
since: "0.14.0",
60+
},
61+
],
62+
},
3963
sqlParamTypes: {
4064
type: "string",
4165
array: true,

0 commit comments

Comments
 (0)