public class SelectDistinctTest extends JDBCPerfTestCase
| Modifier and Type | Field and Description |
|---|---|
private static int |
EXPECTED_DISTINCT_BINARY5
The number of distinct rows to be expected in the test for CHAR(5) FOR
BIT DATA.
|
private static int |
EXPECTED_DISTINCT_CHAR5
The number of distinct rows to be expected in the test for CHAR(5).
|
private java.sql.PreparedStatement |
ps
The prepared statement to be used in the test body.
|
private static java.lang.String |
TEST_BINARY5
Name of the test case for CHAR(5) FOR BIT DATA, and the name of the
table used by that test.
|
private static java.lang.String |
TEST_CHAR5
Name of the test case for CHAR(5), and the name of the table used by
that test.
|
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Modifier | Constructor and Description |
|---|---|
private |
SelectDistinctTest(java.lang.String name,
int iterations,
int repeats)
Create a test case.
|
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
charToBinary(java.lang.String s)
Stored function that converts an SQL CHAR value to an SQL CHAR FOR BIT
DATA value.
|
void |
selectDistinctBinary5()
Test case for SELECT DISTINCT on a CHAR(5) FOR BIT DATA column.
|
void |
selectDistinctChar5()
Test case for SELECT DISTINCT on a CHAR(5) column.
|
protected void |
setUp()
Set up the test environment.
|
static junit.framework.Test |
suite()
Create the suite of all test cases in this class.
|
protected void |
tearDown()
Tear down the test environment.
|
runBareOverridable, runTestassertCallError, 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, runScript, runScript, runSQLCommands, setAutoCommit, 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, setName, toStringprivate java.sql.PreparedStatement ps
private static final java.lang.String TEST_CHAR5
private static final int EXPECTED_DISTINCT_CHAR5
private static final java.lang.String TEST_BINARY5
private static final int EXPECTED_DISTINCT_BINARY5
private SelectDistinctTest(java.lang.String name,
int iterations,
int repeats)
name - the name of the test method, and the name of the table used
in the testiterations - the number of iterations in each testrepeats - the number of times each test should be repeatedpublic static junit.framework.Test suite()
protected void setUp()
throws java.sql.SQLException
setUp in class junit.framework.TestCasejava.sql.SQLExceptionprotected void tearDown()
throws java.lang.Exception
tearDown in class BaseJDBCTestCasejava.lang.Exceptionpublic static byte[] charToBinary(java.lang.String s)
throws java.io.UnsupportedEncodingException
s - the string to convert to binary datajava.io.UnsupportedEncodingExceptionpublic void selectDistinctChar5()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void selectDistinctBinary5()
throws java.sql.SQLException
java.sql.SQLExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.