File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
main/jjtree/net/sf/jsqlparser/parser
test/java/net/sf/jsqlparser/statement/create Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -3651,6 +3651,7 @@ List<String> CreateParameter():
3651
3651
StringBuilder identifier = new StringBuilder("");
3652
3652
Expression exp = null;
3653
3653
List<String> param = new ArrayList<String>();
3654
+ ColDataType colDataType;
3654
3655
}
3655
3656
{
3656
3657
(
@@ -3733,6 +3734,8 @@ List<String> CreateParameter():
3733
3734
tk=<K_USING> { param.add(tk.image); }
3734
3735
|
3735
3736
tk=<K_COLLATE> { param.add(tk.image); }
3737
+ |
3738
+ tk="::" colDataType = ColDataType() { param.add(tk.image); param.add(colDataType.toString()); }
3736
3739
)
3737
3740
{return param;}
3738
3741
}
Original file line number Diff line number Diff line change @@ -537,4 +537,9 @@ public void testCreateTableIssue798_2() throws JSQLParserException {
537
537
+ "KEY PARENT_DIRTY_IDX (DIRTY_STATUS)\n "
538
538
+ ") ENGINE=InnoDB AUTO_INCREMENT=2663 DEFAULT CHARSET=utf8" , true );
539
539
}
540
+
541
+ @ Test
542
+ public void testCreateTableIssue113 () throws JSQLParserException {
543
+ assertSqlCanBeParsedAndDeparsed ("CREATE TABLE foo (reason character varying (255) DEFAULT 'Test' :: character varying NOT NULL)" );
544
+ }
540
545
}
You can’t perform that action at this time.
0 commit comments