Skip to content

Commit ac785a4

Browse files
committed
fixes #125 - added values as a column name
1 parent 941952f commit ac785a4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/main/javacc/net/sf/jsqlparser/parser/JSqlParserCC.jj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ String RelObjectName():
535535
| tk=<K_LAST> | tk=<K_MATERIALIZED> | tk=<K_NULLS> | tk=<K_PARTITION> | tk=<K_RANGE>
536536
| tk=<K_ROW> | tk=<K_ROWS> | tk=<K_SIBLINGS> | tk=<K_VALUE> | tk=<K_XML>
537537
| tk=<K_COLUMN> | tk=<K_REPLACE> | tk=<K_TRUNCATE> | tk=<K_KEY> | tk=<K_ANY>
538-
| tk=<K_OPEN> | tk=<K_OVER>
538+
| tk=<K_OPEN> | tk=<K_OVER> | tk=<K_VALUES>
539539
)
540540

541541
{ return tk.image; }

src/test/java/net/sf/jsqlparser/test/create/CreateTableTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ public void testCreateTableArrays() throws JSQLParserException {
149149
public void testCreateTableArrays2() throws JSQLParserException {
150150
assertSqlCanBeParsedAndDeparsed("CREATE TABLE sal_emp (name text, pay_by_quarter integer[5], schedule text[3][2])");
151151
}
152+
153+
public void testCreateTableColumnValues() throws JSQLParserException {
154+
assertSqlCanBeParsedAndDeparsed("CREATE TABLE mytable1 (values INTEGER)");
155+
}
156+
157+
public void testCreateTableColumnValue() throws JSQLParserException {
158+
assertSqlCanBeParsedAndDeparsed("CREATE TABLE mytable1 (value INTEGER)");
159+
}
152160

153161
public void testRUBiSCreateList() throws Exception {
154162
BufferedReader in = new BufferedReader(new InputStreamReader(CreateTableTest.class.getResourceAsStream("/RUBiS-create-requests.txt")));

0 commit comments

Comments
 (0)