public class CurrentOfTest extends BaseJDBCTestCase
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
CurrentOfTest(java.lang.String name)
Public constructor required for running test as standalone JUnit.
|
Modifier and Type | Method and Description |
---|---|
private void |
cursorChange(java.lang.String sqlState,
java.lang.String initialCursor,
java.lang.String positionedStatement,
java.lang.String changeToCursor)
Run cursorChange() with an application provided name
and a system provided name.
|
private void |
cursorChange(java.lang.String sqlState,
java.lang.String cursorName,
java.lang.String initialCursor,
java.lang.String positionedStatement,
java.lang.String changeToCursor)
Test what happens to a positioned update when the cursor
it is compiled against changes to the SQL provided, changeToSQL.
|
static int |
doubleValue(int i) |
private int |
recompile(java.lang.String positionedSQL,
java.lang.String changeSQL1,
java.lang.String changeSQL2)
Execute a select and then the positioned statement against it.
|
protected void |
setUp()
Set the fixture up with tables t and s and insert 4 rows in table t.
|
static junit.framework.Test |
suite()
Create a suite of tests.
|
protected void |
tearDown()
Tear-down the fixture by removing the tables
|
void |
testCursorChangeToDifferentTable()
Change the current cursor from the one the positioned
UPDATE was compiled against to one that is against
a different table.
|
void |
testCursorChangeToReadOnly()
Change the current cursor from the one the positioned
UPDATE/DELETE was compiled against to one that is read only
against the same table.
|
void |
testCursorChangeUpdateList()
Change the current cursor from the one the positioned
UPDATE and DELETE was compiled against to one that only has a
subset of the columns being updatable.
|
void |
testDelete()
Test delete with the current of statements.
|
void |
testDeleteRecompileCreateIndex()
Test the positioned delete correctly recompiles when an index is added.
|
void |
testReadOnlyCursors()
Test read only statements.
|
void |
testUpdate()
Test update with the current of statements.
|
void |
testUpdateRecompileChangeFunction()
Test the positioned update correctly recompiles when the
definition of a function is changed.
|
void |
testUpdateRecompileCreateIndex()
Test the positioned update correctly recompiles when an index is added.
|
static int |
tripleValue(int i) |
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, 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 CurrentOfTest(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
protected void tearDown() throws java.lang.Exception
tearDown
in class BaseJDBCTestCase
java.lang.Exception
public void testReadOnlyCursors() throws java.sql.SQLException
java.sql.SQLException
public void testDelete() throws java.sql.SQLException
java.lang.Exception
java.sql.SQLException
public void testUpdate() throws java.sql.SQLException
java.lang.Exception
java.sql.SQLException
public void testUpdateRecompileCreateIndex() throws java.lang.Exception
java.lang.Exception
public void testUpdateRecompileChangeFunction() throws java.lang.Exception
java.lang.Exception
public void testDeleteRecompileCreateIndex() throws java.lang.Exception
java.lang.Exception
private int recompile(java.lang.String positionedSQL, java.lang.String changeSQL1, java.lang.String changeSQL2) throws java.sql.SQLException
java.sql.SQLException
public void testCursorChangeUpdateList() throws java.sql.SQLException
java.sql.SQLException
public void testCursorChangeToReadOnly() throws java.sql.SQLException
java.sql.SQLException
public void testCursorChangeToDifferentTable() throws java.sql.SQLException
java.sql.SQLException
private void cursorChange(java.lang.String sqlState, java.lang.String initialCursor, java.lang.String positionedStatement, java.lang.String changeToCursor) throws java.sql.SQLException
java.sql.SQLException
private void cursorChange(java.lang.String sqlState, java.lang.String cursorName, java.lang.String initialCursor, java.lang.String positionedStatement, java.lang.String changeToCursor) throws java.sql.SQLException
java.sql.SQLException
public static int doubleValue(int i)
public static int tripleValue(int i)
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.