File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
main/jjtree/net/sf/jsqlparser/parser
test/java/net/sf/jsqlparser/statement/select Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ Also I would like to know about needed examples or documentation stuff.
7171* allow foreign key definition in alter statements without referenced columns specification
7272* allow datatype ** binary** for column definitions
7373* support for ** ALTER TABLE COLUMN DROP NOT NULL**
74+ * allow ** order** as column name
7475
7576## Extensions of JSqlParser releases
7677
Original file line number Diff line number Diff line change @@ -1003,8 +1003,7 @@ Delete Delete():
10031003 ("," table=TableWithAlias() { tables.add(table); } )*
10041004 <K_FROM> | <K_FROM>)]
10051005
1006- [ table=TableWithAlias()
1007- joins=JoinsList() ]
1006+ [ LOOKAHEAD(3) table=TableWithAlias() joins=JoinsList() ]
10081007 [where=WhereClause() { delete.setWhere(where); } ]
10091008 [orderByElements = OrderByElements() { delete.setOrderByElements(orderByElements); } ]
10101009 [limit=PlainLimit() {delete.setLimit(limit); } ]
@@ -1152,7 +1151,7 @@ String RelObjectName() :
11521151{ Token tk = null; String result = null; }
11531152{
11541153 (result = RelObjectNameWithoutValue() | tk=<K_TOP> | tk=<K_VALUE> | tk=<K_VALUES>
1155- | tk=<K_INTERVAL> | tk=<K_START> | tk=<K_ON>)
1154+ | tk=<K_INTERVAL> | tk=<K_START> | tk=<K_ON> | tk=<K_ORDER> )
11561155
11571156 {
11581157 if (tk!=null) result=tk.image;
Original file line number Diff line number Diff line change @@ -3996,4 +3996,10 @@ public void testCaseWithComplexWhenExpression() throws JSQLParserException {
39963996 + "ELSE 1 = 1\n "
39973997 + "END\n " , true );
39983998 }
3999+
4000+ @ Test
4001+ public void testSessionKeywordIssue932 () throws JSQLParserException {
4002+ assertSqlCanBeParsedAndDeparsed ("SELECT order FROM tmp3" );
4003+ assertSqlCanBeParsedAndDeparsed ("SELECT tmp3.order FROM tmp3" );
4004+ }
39994005}
You can’t perform that action at this time.
0 commit comments