Skip to content

Commit b55141b

Browse files
committed
fixes #1006 - included limit / offset test
1 parent 36d0b74 commit b55141b

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,7 @@
99
*/
1010
package net.sf.jsqlparser.statement.select;
1111

12-
import java.io.*;
1312
import java.nio.charset.Charset;
14-
import java.util.*;
15-
import net.sf.jsqlparser.*;
16-
import net.sf.jsqlparser.expression.*;
17-
import net.sf.jsqlparser.expression.operators.arithmetic.*;
18-
import net.sf.jsqlparser.expression.operators.relational.*;
19-
import net.sf.jsqlparser.parser.*;
20-
import net.sf.jsqlparser.schema.*;
21-
import net.sf.jsqlparser.statement.*;
2213
import static net.sf.jsqlparser.test.TestUtils.*;
2314
import org.apache.commons.io.IOUtils;
2415

@@ -4381,4 +4372,10 @@ public void testConditionalParametersForFunctions() throws JSQLParserException {
43814372
public void testCreateTableWithParameterDefaultFalseIssue1088() throws JSQLParserException {
43824373
assertSqlCanBeParsedAndDeparsed("SELECT p.*, rhp.house_id FROM rel_house_person rhp INNER JOIN person p ON rhp.person_id = p.if WHERE rhp.house_id IN (SELECT house_id FROM rel_house_person WHERE person_id = :personId AND current_occupant = :current) AND rhp.current_occupant = :currentOccupant");
43834374
}
4375+
4376+
@Test
4377+
public void testMissingLimitKeywordIssue1006() throws JSQLParserException {
4378+
Statement stmt = CCJSqlParserUtil.parse("SELECT id, name FROM test OFFSET 20 LIMIT 10");
4379+
assertEquals("SELECT id, name FROM test LIMIT 10 OFFSET 20", stmt.toString());
4380+
}
43844381
}

0 commit comments

Comments
 (0)