Skip to content

Commit 0fe33a2

Browse files
committed
Merge branch 'master' into function-names
2 parents 66f7ebd + b5d66d4 commit 0fe33a2

22 files changed

Lines changed: 952 additions & 15 deletions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sql-formatter",
3-
"version": "8.1.0",
3+
"version": "8.2.0",
44
"description": "Format whitespace in a SQL query to make it more readable",
55
"license": "MIT",
66
"main": "lib/index.js",

sql/alter-table.md

Lines changed: 863 additions & 0 deletions
Large diffs are not rendered by default.

sql/syntax.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ Reference of SQL syntax variations.
2727
- [DELETE](./delete.md)
2828
- [CREATE TABLE](./create-table.md)
2929
- [CREATE VIEW](./create-view.md)
30+
- [ALTER TABLE](./alter-table.md)

src/languages/bigquery.formatter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,7 @@ const reservedCommands = [
699699
'ORDER BY',
700700
'QUALIFY',
701701
'WINDOW',
702+
'PARTITION BY',
702703
'LIMIT',
703704
'OFFSET',
704705
'WITH',

src/languages/hive.formatter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,8 @@ const reservedCommands = [
577577
'VALUES',
578578
'WHERE',
579579
'WITH',
580+
'WINDOW',
581+
'PARTITION BY',
580582

581583
// newline keywords
582584
'STORED AS',

src/languages/mysql.formatter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,6 +1306,8 @@ const reservedCommands = [
13061306
'OFFSET',
13071307
'ORDER BY',
13081308
'WHERE',
1309+
'WINDOW',
1310+
'PARTITION BY',
13091311
];
13101312

13111313
const reservedBinaryCommands = [

src/languages/n1ql.formatter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,8 @@ const reservedCommands = [
476476
'VALUES',
477477
'WHERE',
478478
'WITH',
479+
'WINDOW',
480+
'PARTITION BY',
479481
];
480482

481483
const reservedBinaryCommands = [

src/languages/postgresql.formatter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,6 +1598,8 @@ const reservedCommands = [
15981598
'ORDER BY',
15991599
'WHERE',
16001600
'WITH',
1601+
'WINDOW',
1602+
'PARTITION BY',
16011603
];
16021604

16031605
const reservedBinaryCommands = [

src/languages/spark.formatter.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,6 @@ const reservedCommands = [
677677
'WITH',
678678
'CLUSTER BY',
679679
'DISTRIBUTE BY',
680-
'PARTITION BY', // verify
681680
'GROUP BY',
682681
'HAVING',
683682
'VALUES',
@@ -723,7 +722,7 @@ const reservedCommands = [
723722
'INSERT',
724723
'LATERAL VIEW',
725724
'UPDATE',
726-
'WINDOW', // verify
725+
'WINDOW',
727726
];
728727

729728
const reservedBinaryCommands = [

src/languages/sql.formatter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,8 @@ const reservedCommands = [
385385
'VALUES',
386386
'WHERE',
387387
'WITH',
388+
'WINDOW',
389+
'PARTITION BY',
388390
];
389391

390392
const reservedBinaryCommands = [

0 commit comments

Comments
 (0)