Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -9705,7 +9705,7 @@ List<String> CreateParameter():
| tk=<K_TYPE> | tk=<K_COMMENT> | tk=<K_USING> | tk=<K_COLLATE> | tk=<K_ASC>
| tk=<K_DESC> | tk=<K_TRUE> | tk=<K_FALSE> | tk=<K_PARALLEL> | tk=<K_BINARY> | tk=<K_START> | tk=<K_ORDER>
| tk=<K_TIME_KEY_EXPR> | tk=<K_RAW> | tk=<K_HASH> | tk=<K_FIRST> | tk=<K_LAST> | tk = <K_SIGNED> | tk = <K_UNSIGNED>
| tk=<K_ENGINE> | tk=<K_IDENTITY> | tk=<K_MATERIALIZED> | tk=<K_SAMPLE>
| tk=<K_ENGINE> | tk=<K_IDENTITY> | tk=<K_MATERIALIZED> | tk=<K_SAMPLE> | tk=<K_ALWAYS>
| tk="="
)
{ param.add(tk.image); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,18 @@ public void testCreateTableIssue1230() throws JSQLParserException {
"CREATE TABLE TABLE_HISTORY (ID bigint generated by default as identity, CREATED_AT timestamp not null, TEXT varchar (255), primary key (ID))");
}

@Test
public void testCreateTableGeneratedAlwaysAsIdentityRegression() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed(
"create table if not exists book_type ( id bigint not null generated always as identity )");
}

@Test
public void testCreateTableGeneratedByDefaultAsIdentityRegression() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed(
"create table if not exists book_type ( id bigint not null generated by default as identity )");
}

@Test
public void testCreateUnionIssue1309() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed(
Expand Down