@@ -197,6 +197,18 @@ public void testInsertMultiRowValueDifferent() throws JSQLParserException {
197197 fail ("should not work" );
198198 }
199199
200+ @ Test
201+ @ Ignore
202+ public void testOracleInsertMultiRowValue () throws JSQLParserException {
203+ String sqlStr
204+ = "INSERT ALL\n "
205+ + " INTO suppliers (supplier_id, supplier_name) VALUES (1000, 'IBM')\n "
206+ + " INTO suppliers (supplier_id, supplier_name) VALUES (2000, 'Microsoft')\n "
207+ + " INTO suppliers (supplier_id, supplier_name) VALUES (3000, 'Google')\n "
208+ + "SELECT * FROM dual;" ;
209+ assertSqlCanBeParsedAndDeparsed (sqlStr , true );
210+ }
211+
200212 @ Test
201213 public void testSimpleInsert () throws JSQLParserException {
202214 assertSqlCanBeParsedAndDeparsed ("INSERT INTO example (num, name, address, tel) VALUES (1, 'name', 'test ', '1234-1234')" );
@@ -332,6 +344,11 @@ public void testNextVal() throws JSQLParserException {
332344 assertSqlCanBeParsedAndDeparsed ("INSERT INTO tracker (monitor_id, user_id, module_name, item_id, item_summary, team_id, date_modified, action, visible, id) VALUES (?, ?, ?, ?, ?, ?, to_date(?, 'YYYY-MM-DD HH24:MI:SS'), ?, ?, NEXTVAL FOR TRACKER_ID_SEQ)" );
333345 }
334346
347+ @ Test
348+ public void testNextValueFor () throws JSQLParserException {
349+ assertSqlCanBeParsedAndDeparsed ("INSERT INTO tracker (monitor_id, user_id, module_name, item_id, item_summary, team_id, date_modified, action, visible, id) VALUES (?, ?, ?, ?, ?, ?, to_date(?, 'YYYY-MM-DD HH24:MI:SS'), ?, ?, NEXT VALUE FOR TRACKER_ID_SEQ)" );
350+ }
351+
335352 @ Test
336353 public void testNextValIssue773 () throws JSQLParserException {
337354 assertSqlCanBeParsedAndDeparsed ("INSERT INTO tableA (ID, c1, c2) SELECT hibernate_sequence.nextval, c1, c2 FROM tableB" );
@@ -358,4 +375,14 @@ public void testOracleHint() throws JSQLParserException {
358375
359376 //@todo: add a testcase supposed to not finding a misplaced hint
360377 }
378+
379+ @ Test
380+ public void testInsertTableArrays4 () throws JSQLParserException {
381+ assertSqlCanBeParsedAndDeparsed (
382+ "INSERT INTO sal_emp\n "
383+ + " VALUES ('Carol',\n "
384+ + " ARRAY[20000, 25000, 25000, 25000],\n "
385+ + " ARRAY[['breakfast', 'consulting'], ['meeting', 'lunch']])" ,
386+ true );
387+ }
361388}
0 commit comments