Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -2140,6 +2140,7 @@ Token KeywordOrIdentifier():
| tk = <K_STRING>
| tk = <K_DATA>
| tk = <K_TYPE>
| tk = <K_VERSION>
)
{ return tk; }
}
Expand Down Expand Up @@ -11942,7 +11943,7 @@ List<String> CreateParameter():
|
(
//@todo: implement a proper identifier
(tk=<S_IDENTIFIER> | tk=<S_QUOTED_IDENTIFIER> | tk=<K_NAME>)
(tk=<S_IDENTIFIER> | tk=<S_QUOTED_IDENTIFIER> | tk=<K_NAME> | tk=<K_VERSION>)
{ retval+=tk.image; }

[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,15 @@ public void testAlterTableAlterColumnDropNotNullIssue918() throws JSQLParserExce
"ALTER TABLE \"user_table_t\" ALTER COLUMN name DROP NOT NULL");
}

@Test
public void testAlterTableVersionColumn() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed(
"ALTER TABLE test_table DROP COLUMN version, DROP COLUMN other_column");
assertSqlCanBeParsedAndDeparsed(
"ALTER TABLE test_table ALTER COLUMN version TYPE VARCHAR(32) "
+ "USING version::VARCHAR(32)");
}

@Test
public void testAlterTableRenameColumn() throws JSQLParserException {
// With Column Keyword
Expand Down
Loading