Skip to content

Commit

Permalink
feat: Optional COLUMN in ALTER TABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoniePhiline committed Feb 3, 2023
1 parent 30e15d4 commit a2533b2
Show file tree
Hide file tree
Showing 3 changed files with 91,579 additions and 90,926 deletions.
12 changes: 9 additions & 3 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -660,15 +660,19 @@ module.exports = grammar({

add_column: $ => seq(
$.keyword_add,
$.keyword_column,
optional(
$.keyword_column,
),
optional($._if_not_exists),
$.column_definition,
),

alter_column: $ => seq(
// TODO constraint management
$.keyword_alter,
$.keyword_column,
optional(
$.keyword_column,
),
field('name', $.identifier),
choice(
seq(
Expand Down Expand Up @@ -703,7 +707,9 @@ module.exports = grammar({

drop_column: $ => seq(
$.keyword_drop,
$.keyword_column,
optional(
$.keyword_column,
),
optional($._if_exists),
field('name', $.identifier),
),
Expand Down
36 changes: 30 additions & 6 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a2533b2

Please sign in to comment.