Repository: sql-formatter-org/sql-formatter (ts)

Issue:
[FORMATTING] PLSQL incorrect format of "for update" syntax 
Oracle sql text:
```
 select *  from andy.t_test for update;
```

Expect output:
```sql
 select *  
   from andy.t_test for update;
```

output in demo website:
```sql
   select *
     from andy.t_test for
   update;
```


Pull request description:
Add FOR UPDATE clause support for PL/SQL
Fixes #340

Patch:
diff --git a/src/languages/plsql/plsql.formatter.ts b/src/languages/plsql/plsql.formatter.ts
index 32a8552b..aeb06484 100644
--- a/src/languages/plsql/plsql.formatter.ts
+++ b/src/languages/plsql/plsql.formatter.ts
@@ -18,6 +18,7 @@ const reservedCommands = expandPhrases([
   'ORDER [SIBLINGS] BY',
   'OFFSET',
   'FETCH {FIRST | NEXT}',
+  'FOR UPDATE',
   // Data manipulation
   // - insert:
   'INSERT [INTO | ALL INTO]',


Test patch:
diff --git a/test/plsql.test.ts b/test/plsql.test.ts
index b5c3a921..5ea29995 100644
--- a/test/plsql.test.ts
+++ b/test/plsql.test.ts
@@ -142,4 +142,26 @@ describe('PlSqlFormatter', () => {
         id = 1;
     `);
   });
+
+  // regression test for #340
+  it('formats FOR UPDATE clause', () => {
+    const result = format(`
+      SELECT * FROM tbl FOR UPDATE;
+      SELECT * FROM tbl FOR UPDATE OF tbl.salary;
+    `);
+    expect(result).toBe(dedent`
+      SELECT
+        *
+      FROM
+        tbl
+      FOR UPDATE;
+
+      SELECT
+        *
+      FROM
+        tbl
+      FOR UPDATE
+        OF tbl.salary;
+    `);
+  });
 });