Skip to content

Commit 3f91850

Browse files
committed
fixes #962
1 parent aee3947 commit 3f91850

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ Also I would like to know about needed examples or documentation stuff.
6666

6767
## Extensions in the latest SNAPSHOT version 3.2
6868

69+
* allow **VALIDATE** as column name
6970
* first support for **CREATE SCHEMA** and **DROP SCHEMA**
7071
* allow **ON** as a value in a set statement (`SET myvalue = ON`)
7172
* support for **ALTER TABLE ONLY mytable ...**

src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ String RelObjectNameWithoutValue() :
11521152
| tk=<K_ZONE> | tk=<K_COLUMNS> | tk=<K_DESCRIBE> | tk=<K_FN> | tk=<K_PATH>
11531153
| tk=<K_DATE_LITERAL> | tk=<K_NEXTVAL> | tk=<K_TRUE> | tk=<K_FALSE> | tk=<K_DUPLICATE>
11541154
| tk=<K_READ> | tk=<K_SCHEMA> | tk=<K_SIZE> | tk=<K_SESSION>
1155-
| tk=<K_VIEW> | <K_NOLOCK>
1155+
| tk=<K_VIEW> | tk=<K_NOLOCK> | tk=<K_VALIDATE>
11561156
/* | tk=<K_PLACING> | tk=<K_BOTH> | tk=<K_LEADING> | tk=<K_TRAILING> */
11571157
)
11581158

src/test/java/net/sf/jsqlparser/statement/update/UpdateTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,9 @@ public void testUpdateIssue826() throws JSQLParserException {
155155
public void testUpdateIssue750() throws JSQLParserException {
156156
assertSqlCanBeParsedAndDeparsed("update a,(select * from c) b set a.id=b.id where a.id=b.id", true);
157157
}
158+
159+
@Test
160+
public void testUpdateIssue962Validate() throws JSQLParserException {
161+
assertSqlCanBeParsedAndDeparsed("UPDATE tbl_user_card SET validate = '1', identityCodeFlag = 1 WHERE id = 9150000293816");
162+
}
158163
}

0 commit comments

Comments
 (0)