public class OrderByAndOffsetFetchInSubqueries extends BaseJDBCTestCase
ORDER BY in subqueries
and DERBY-4398 Allow OFFSET/FETCH in subqueries.| Modifier and Type | Field and Description |
|---|---|
(package private) static java.lang.String |
COLUMN_NOT_FOUND |
(package private) static java.lang.String |
COLUMN_OUT_OF_RANGE |
(package private) static java.lang.String |
ORDER_BY_COLUMN_NOT_FOUND |
(package private) static java.lang.String |
SYNTAX_ERROR |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Constructor and Description |
|---|
OrderByAndOffsetFetchInSubqueries(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
private static junit.framework.Test |
makeSuite()
Construct suite of tests
|
static junit.framework.Test |
suite()
Construct top level suite in this JUnit test
|
void |
testInsertSelectOrderBy()
Test {@code INSERT INTO t SELECT ..
|
void |
testInsertSelectOrderByOffsetFetch()
Same test as
testInsertSelectOrderBy but with use of
OFFSET/FETCH FIRST. |
void |
testJoinsWithOffsetFetch()
Test JOIN with delimited subqueries
|
void |
testNestingInsideSetOperation()
Test nesting inside set operands, cf. this production in SQL
2011, section 7.12:
sqlgrammar.jj is
nonJoinQueryPrimary. |
void |
testPushAvoidance()
Prevent pushing of where predicates into selects with fetch
and/or offset (DERBY-5911).
|
void |
testSelectSubqueriesOrderBy()
SELECT subqueries with ORDER BY |
void |
testSelectSubqueriesOrderByAndOffsetFetch()
SELECT subqueries with ORDER BY and OFFSET/FETCH. |
void |
testSelectSubqueriesOrderByNegative()
SELECT subqueries with ORDER BY - negative tests |
void |
testSelectSubqueriesSortAvoidance()
SELECT subqueries with ORDER BY - check sort avoidance |
void |
testView()
Test
ORDER BY in a view definition |
void |
testViewFetchOffset()
Test
ORDER BY + FETCH/OFFSET in a view definition
This test is a variant made my modifying testView with suitable
OFFSET/FETCH FIRST clauses. |
assertCallError, assertCheckTable, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, emptyStatementCache, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, initializeConnection, openConnection, openDefaultConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runBare, runBareOverridable, runScript, runScript, runSQLCommands, setAutoCommit, tearDown, usingDB2Client, usingDerbyNetClient, usingEmbeddedalarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isJava8, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemProperty, sleep, sleepAtLeastOneTick, traceitassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, setUp, toStringstatic final java.lang.String SYNTAX_ERROR
static final java.lang.String COLUMN_NOT_FOUND
static final java.lang.String COLUMN_OUT_OF_RANGE
static final java.lang.String ORDER_BY_COLUMN_NOT_FOUND
public OrderByAndOffsetFetchInSubqueries(java.lang.String name)
public static junit.framework.Test suite()
private static junit.framework.Test makeSuite()
public void testInsertSelectOrderBy()
throws java.sql.SQLException
INSERT INTO t SELECT .. FROM .. ORDER BY.java.sql.SQLExceptionpublic void testInsertSelectOrderByOffsetFetch()
throws java.sql.SQLException
testInsertSelectOrderBy but with use of
OFFSET/FETCH FIRST.
Test INSERT INTO t SELECT .. FROM .. ORDER BY + OFFSET
FETCH
This test is a variant made my modifying testInsertSelectOrderBy
with suitable OFFSET/FETCH FIRST clauses.java.sql.SQLExceptionpublic void testSelectSubqueriesOrderBy()
throws java.sql.SQLException
SELECT subqueries with ORDER BYjava.sql.SQLExceptionpublic void testSelectSubqueriesOrderByAndOffsetFetch()
throws java.sql.SQLException
SELECT subqueries with ORDER BY and OFFSET/FETCH.
This test is a variant made my modifying testSelectSubqueriesOrderBy with suitable OFFSET/FETCH FIRST
clauses.java.sql.SQLExceptionpublic void testJoinsWithOffsetFetch()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testView()
throws java.sql.SQLException
ORDER BY in a view definitionjava.sql.SQLExceptionpublic void testViewFetchOffset()
throws java.sql.SQLException
ORDER BY + FETCH/OFFSET in a view definition
This test is a variant made my modifying testView with suitable
OFFSET/FETCH FIRST clauses.java.sql.SQLExceptionpublic void testSelectSubqueriesOrderByNegative()
throws java.sql.SQLException
SELECT subqueries with ORDER BY - negative testsjava.sql.SQLExceptionpublic void testSelectSubqueriesSortAvoidance()
throws java.sql.SQLException
SELECT subqueries with ORDER BY - check sort avoidancejava.sql.SQLExceptionpublic void testPushAvoidance()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testNestingInsideSetOperation()
throws java.sql.SQLException
The corresponding production in::= | [ ] [ ] [ ]
sqlgrammar.jj is
nonJoinQueryPrimary.
Cf. DERBY-6008.java.sql.SQLExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.