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():
36513651 StringBuilder identifier = new StringBuilder("");
36523652 Expression exp = null;
36533653 List<String> param = new ArrayList<String>();
3654+ ColDataType colDataType;
36543655}
36553656{
36563657 (
@@ -3733,6 +3734,8 @@ List<String> CreateParameter():
37333734 tk=<K_USING> { param.add(tk.image); }
37343735 |
37353736 tk=<K_COLLATE> { param.add(tk.image); }
3737+ |
3738+ tk="::" colDataType = ColDataType() { param.add(tk.image); param.add(colDataType.toString()); }
37363739 )
37373740 {return param;}
37383741}
Original file line number Diff line number Diff line change @@ -537,4 +537,9 @@ public void testCreateTableIssue798_2() throws JSQLParserException {
537537 + "KEY PARENT_DIRTY_IDX (DIRTY_STATUS)\n "
538538 + ") ENGINE=InnoDB AUTO_INCREMENT=2663 DEFAULT CHARSET=utf8" , true );
539539 }
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+ }
540545}
You can’t perform that action at this time.
0 commit comments