public class DynamicLikeOptimizationTest extends BaseJDBCTestCase
NOTE: the metadata test does a bunch of likes with parameters.
Modifier and Type | Field and Description |
---|---|
private static java.lang.Object[][] |
CEI_ROWS
All rows in the cei table.
|
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
DynamicLikeOptimizationTest(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
setUp() |
static junit.framework.Test |
suite() |
void |
testCast() |
void |
testDynamicLikeOptimization()
Test that dynamic like optimization is performed.
|
void |
testEscapedEscapeCharacterPrecedingFirstWildcard()
Test that it is possible to escape an escape character that is before
the first wildcard (% or _) in the pattern (DERBY-1386).
|
void |
testEscapeSyntax() |
void |
testEscapeSyntax2() |
void |
testEscapeSyntax3() |
void |
testEscapeSyntax4() |
void |
testEscapeSyntax5() |
void |
testEscapeWithBackslash()
Test defect 6002/6039.
|
private void |
testGeneratedPredicates(java.sql.PreparedStatement ps,
java.lang.String[][][] rows)
Helper method for
testGeneratedPredicates* . |
void |
testGeneratedPredicatesCHAR() |
void |
testGeneratedPredicatesVARCHAR() |
void |
testLikeWithHighestValidCharacter() |
void |
testSimpleLikePredicates() |
void |
testStringAndPatternAndEscapeFromTable() |
void |
testTabs()
Test that % matches tab characters (DERBY-1262).
|
void |
testWildcardAsEscape() |
assertCallError, assertCheckTable, assertCommitError, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertResults, assertResults, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, chattyPrepare, chattyPrepareCall, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, dumpRs, dumpRs, emptyStatementCache, executeQuery, expectCompilationError, expectCompilationError, expectExecutionError, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, goodStatement, goodUpdate, 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, usingEmbedded
alarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSameNullness, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, newAssertionFailedError, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemErr, setSystemOut, setSystemProperty, sleep, sleepAtLeastOneTick, traceit, vmAtLeast
assertEquals, 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, toString
public DynamicLikeOptimizationTest(java.lang.String name)
public static junit.framework.Test suite()
protected void setUp() throws java.sql.SQLException
setUp
in class junit.framework.TestCase
java.sql.SQLException
public void testSimpleLikePredicates() throws java.sql.SQLException
java.sql.SQLException
public void testEscapeSyntax() throws java.sql.SQLException
java.sql.SQLException
public void testWildcardAsEscape() throws java.sql.SQLException
java.sql.SQLException
public void testEscapeSyntax2() throws java.sql.SQLException
java.sql.SQLException
public void testEscapeSyntax3() throws java.sql.SQLException
java.sql.SQLException
public void testEscapeSyntax4() throws java.sql.SQLException
java.sql.SQLException
public void testEscapeSyntax5() throws java.sql.SQLException
java.sql.SQLException
public void testLikeWithHighestValidCharacter() throws java.sql.SQLException
java.sql.SQLException
public void testGeneratedPredicatesCHAR() throws java.sql.SQLException
java.sql.SQLException
public void testGeneratedPredicatesVARCHAR() throws java.sql.SQLException
java.sql.SQLException
private void testGeneratedPredicates(java.sql.PreparedStatement ps, java.lang.String[][][] rows) throws java.sql.SQLException
testGeneratedPredicates*
. Executes a
prepared statement with different parameter values and compares result
to an array of expected rows.ps
- the prepared statement to executerows
- array of expected rows to be returned for the different
executionsjava.sql.SQLException
public void testStringAndPatternAndEscapeFromTable() throws java.sql.SQLException
java.sql.SQLException
public void testEscapeWithBackslash() throws java.sql.SQLException
java.sql.SQLException
public void testTabs() throws java.sql.SQLException
java.sql.SQLException
public void testEscapedEscapeCharacterPrecedingFirstWildcard() throws java.sql.SQLException
java.sql.SQLException
public void testDynamicLikeOptimization() throws java.sql.SQLException
java.sql.SQLException
public void testCast() throws java.sql.SQLException
java.sql.SQLException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.