Skip to content

Commit 48737e2

Browse files
committed
Lowercase the PL/SQL string, just like the others are.
1 parent d5a5bb9 commit 48737e2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/sqlFormatter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default {
2222
return new Db2Formatter(cfg).format(query);
2323
case "n1ql":
2424
return new N1qlFormatter(cfg).format(query);
25-
case "PL/SQL":
25+
case "pl/sql":
2626
return new PlSqlFormatter(cfg).format(query);
2727
case "sql":
2828
case undefined:

test/PlSqlFormatterTest.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import sqlFormatter from "./../src/sqlFormatter";
22
import behavesLikeSqlFormatter from "./behavesLikeSqlFormatter";
33

44
describe("PlSqlFormatter", function() {
5-
behavesLikeSqlFormatter("PL/SQL");
5+
behavesLikeSqlFormatter("pl/sql");
66

77
it("formats FETCH FIRST like LIMIT", function() {
88
expect(sqlFormatter.format(
99
"SELECT col1 FROM tbl ORDER BY col2 DESC FETCH FIRST 20 ROWS ONLY;",
10-
{language: "PL/SQL"}
10+
{language: "pl/sql"}
1111
)).toBe(
1212
"SELECT\n" +
1313
" col1\n" +
@@ -25,7 +25,7 @@ describe("PlSqlFormatter", function() {
2525
"SELECT col FROM\n" +
2626
"-- This is a comment\n" +
2727
"MyTable;\n",
28-
{language: "PL/SQL"}
28+
{language: "pl/sql"}
2929
);
3030
expect(result).toBe(
3131
"SELECT\n" +
@@ -39,7 +39,7 @@ describe("PlSqlFormatter", function() {
3939
it("recognizes _, $, #, . and @ as part of identifiers", function() {
4040
const result = sqlFormatter.format(
4141
"SELECT my_col$1#, col.2@ FROM tbl\n",
42-
{language: "PL/SQL"}
42+
{language: "pl/sql"}
4343
);
4444
expect(result).toBe(
4545
"SELECT\n" +

0 commit comments

Comments
 (0)