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, 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, 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, toStringpublic CurrentOfTest(java.lang.String name)
public 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 void testReadOnlyCursors()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testDelete()
throws java.sql.SQLException
java.lang.Exceptionjava.sql.SQLExceptionpublic void testUpdate()
throws java.sql.SQLException
java.lang.Exceptionjava.sql.SQLExceptionpublic void testUpdateRecompileCreateIndex()
throws java.lang.Exception
java.lang.Exceptionpublic void testUpdateRecompileChangeFunction()
throws java.lang.Exception
java.lang.Exceptionpublic void testDeleteRecompileCreateIndex()
throws java.lang.Exception
java.lang.Exceptionprivate int recompile(java.lang.String positionedSQL,
java.lang.String changeSQL1,
java.lang.String changeSQL2)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testCursorChangeUpdateList()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testCursorChangeToReadOnly()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testCursorChangeToDifferentTable()
throws java.sql.SQLException
java.sql.SQLExceptionprivate void cursorChange(java.lang.String sqlState,
java.lang.String initialCursor,
java.lang.String positionedStatement,
java.lang.String changeToCursor)
throws java.sql.SQLException
java.sql.SQLExceptionprivate 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.SQLExceptionpublic static int doubleValue(int i)
public static int tripleValue(int i)
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.