org.apache.derbyTesting.functionTests.tests.jdbcapi
Class SURTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.derbyTesting.junit.BaseTestCase
              extended by org.apache.derbyTesting.junit.BaseJDBCTestCase
                  extended by org.apache.derbyTesting.functionTests.tests.jdbcapi.SURBaseTest
                      extended by org.apache.derbyTesting.functionTests.tests.jdbcapi.SURTest
All Implemented Interfaces:
junit.framework.Test

public class SURTest
extends SURBaseTest

Tests for variants of scrollable updatable resultsets.


Field Summary
 
Fields inherited from class org.apache.derbyTesting.functionTests.tests.jdbcapi.SURBaseTest
CURSOR_NOT_POSITIONED_ON_INSERT_ROW, CURSOR_NOT_UPDATABLE_SQL_STATE, CURSOR_OPERATION_CONFLICT, FOR_UPDATE_NOT_PERMITTED_SQL_STATE, INVALID_CURSOR_STATE_NO_CURRENT_ROW, LOCK_TIMEOUT_EXPRESSION_SQL_STATE, LOCK_TIMEOUT_SQL_STATE, QUERY_NOT_QUALIFIED_FOR_UPDATABLE_RESULTSET, recordCount, RESULTSET_NOT_UPDATABLE_SQL_STATE
 
Fields inherited from class org.apache.derbyTesting.junit.BaseTestCase
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
 
Constructor Summary
SURTest(java.lang.String name)
          Creates a new instance of SURTest
 
Method Summary
private static junit.framework.Test baseSuite(java.lang.String name)
          The suite contains all testcases in this class running on different data models
private  void checkDetectabilityCallsOutsideRow(java.sql.ResultSet rs, java.lang.String state)
          Check that detectability methods throw the correct exception when called in an illegal row state, that is, somehow not positioned on a row.
private  java.lang.String getNextCursorName()
          Get a cursor name.
static junit.framework.Test suite()
          Run the base suite in embedded and client mode.
 void testConcurrencyModeWarning1()
          Test that you get a warning when specifying a query which is not updatable and concurrency mode CONCUR_UPDATABLE.
 void testConcurrencyModeWarning2()
          Test that you get a warning when specifying a query which is not updatable and concurrency mode CONCUR_UPDATABLE.
 void testCursorOperationConflictWarning1()
          Test that you get cursor operation conflict warning if updating a row which has been deleted from the table.
 void testCursorOperationConflictWarning2()
          Test that you get cursor operation conflict warning if updating a row which has been deleted from the table, now using positioned updates / deletes.
private  void testCursorStateAfterCommit(boolean positioned, int resultSetType)
          Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row.
 void testCursorStateAfterCommit1()
          Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row.
 void testCursorStateAfterCommit2()
          Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row.
 void testCursorStateAfterCommit3()
          Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row.
 void testCursorStateAfterCommit4()
          Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row.
 void testDetectabilityExceptions()
          Test that the JDBC detectability calls throw correct exceptions when called in in wrong row states.
 void testDowngradeToScrollReadOnly()
          DERBY-1481 - ResultSet.beforeFirst() gives protocol error on scrollable, updatable result sets that are downgraded to read-only Check that no exception is thrown when calling positioning methods on a result set that has been downgraded to read-only.
 void testFailOnUpdateOfReadOnlyResultSet1()
          Test that you get an exception if you try to update a ResultSet with concurrency mode CONCUR_READ_ONLY.
 void testFailOnUpdateOfReadOnlyResultSet2()
          Test that you get an exception when attempting to update a ResultSet which has been downgraded to a read only ResultSet.
 void testFailOnUpdateOfReadOnlyResultSet3()
          Test that you get an exception when attempting to update a ResultSet which has been downgraded to a read only ResultSet.
 void testFailOnUpdateOfReadOnlyResultSet4()
          Test that you get an exception when attempting to update a ResultSet which has been downgraded to a read only ResultSet.
 void testFailOnUpdateOfReadOnlyResultSet5()
          Test that you get an exception if you try to update a ResultSet with concurrency mode CONCUR_READ_ONLY.
 void testForUpdateException1()
          Test that you get an exception when specifying update clause "FOR UPDATE" along with a query which is not updatable.
 void testForUpdateException2()
          Test that you get an exception when specifying update clause "FOR UPDATE" along with a query which is not updatable.
 void testForUpdateWithColumnList()
          DERBY-4198 "When using the FOR UPDATE OF clause with SUR (Scroll-insensive updatable result sets), the updateRow() method crashes" This bug revealed missing logic to handle the fact the the ExecRow passed down to ScrollInsensitiveResultSet.updateRow does not always contain all the rows of the basetable, cf. the logic of RowChangerImpl.
 void testForwardOnlyConcurUpdatableWithForUpdate1()
          Test updating a forward only resultset (with FOR UPDATE)
 void testForwardOnlyConcurUpdatableWithoutForUpdate1()
          Test updating a forward only resultset (without FOR UPDATE)
 void testForwardOnlyReadOnly1()
          Test that you can scroll forward and read all records in the ResultSet
 void testIndexedScrollInsensitiveUpdateCursorWithForUpdate1()
          Test that you can scroll forward and update indexed records in the scrollable ResultSet (using FOR UPDATE).
 void testIndexedScrollInsensitiveUpdateCursorWithoutForUpdate1()
          Test that you can scroll forward and update indexed records in the scrollable ResultSet (not using FOR UPDATE).
 void testIndexedUpdateCursor1()
          Test that you can scroll forward and update indexed records in the ResultSet (not using FOR UPDATE)
 void testIndexedUpdateCursor2()
          Test that you can scroll forward and update indexed records in the ResultSet (using FOR UPDATE).
 void testInsertRowWithScrollCursor()
          Tests that it is possible to move using positioning methods after moveToInsertRow and that it is possible to delete a row after positioning back from insertRow.
 void testMultipleKeyUpdates()
          Update multiple keyed records using scrollable updatable resultset
 void testMultiUpdateRow1()
          Test that you can correctly run multiple updateXXX() + updateRow() combined with cancelRowUpdates().
 void testMultiUpdateRow2()
          Test that you can correctly run multiple updateNull() + updateRow() combined with cancelRowUpdates().
 void testOtherAndOwnPrimaryKeyUpdate1()
          Test update of a keyed record using other both the scrollable updatable resultset and using another statement object.
 void testOtherPrimaryKeyUpdate1()
          Test update of a keyed record using other statement object.
 void testOtherSecondaryKeyUpdate1()
          Test update indexed records using other statement object and using resultset.
 void testPositionedUpdateWithForUpdate1()
          Test updating a forward only resultset (with FOR UPDATE) and using positioned update
 void testPositionedUpdateWithoutForUpdate1()
          Test updating a forward only resultset (without FOR UPDATE) and using positioned update
 void testPrimaryKeyUpdate1()
          Test update of a keyed record using scrollable updatable resultset.
 void testRowUpdatedAndRowDeleted()
          Test that rowUpdated() and rowDeleted() methods both return true when the row has first been updated and then deleted using the updateRow() and deleteRow() methods.
 void testScrollablePositionedUpdateWithForUpdate1()
          Test positioned update of a scrollable resultset (with FOR UPDATE)
private  void testScrollInsensistiveConurUpdatable3(java.sql.ResultSet rs)
          Test update of a scrollable resultset Scrolling forward and backward.
 void testScrollInsensitiveConcurUpdatableWithForUpdate1()
          Test update of a scrollable resultset (with FOR UPDATE) Only scrolling forward
 void testScrollInsensitiveConcurUpdatableWithForUpdate2()
          Test update of a scrollable resultset (with FOR UPDATE) Scrolling forward and backward.
 void testScrollInsensitiveConcurUpdatableWithForUpdate3()
          Test update of a scrollable resultset (with FOR UPDATE) Scrolling forward and backward.
 void testScrollInsensitiveConcurUpdatableWithoutForUpdate1()
          Test update of a scrollable resultset (without FOR UPDATE) Scrolling forward only
 void testScrollInsensitiveConcurUpdatableWithoutForUpdate2()
          Test update of a scrollable resultset (without FOR UPDATE) Scrolling forward and backward.
 void testScrollInsensitiveConcurUpdatableWithoutForUpdate3()
          Test update of a scrollable resultset (without FOR UPDATE) Scrolling forward and backward.
 void testScrollInsensitiveReadOnly1()
          Test scrolling in a read only resultset
 void testSecondaryIndexKeyUpdate1()
          Test update indexed records using scrollable updatable resultset
 
Methods inherited from class org.apache.derbyTesting.functionTests.tests.jdbcapi.SURBaseTest
assertFailOnUpdate, assertWarning, initializeConnection, scrollBackward, scrollBackwardAndUpdate, scrollBackwardAndUpdatePositioned, scrollForward, scrollForwardAndUpdate, scrollForwardAndUpdatePositioned, updateTuple, updateTuplePositioned, verifyTuple
 
Methods inherited from class org.apache.derbyTesting.junit.BaseJDBCTestCase
assertCallError, assertCheckTable, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertGetIntError, assertNextError, assertPreparedStatementError, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertTableRowCount, assertUpdateCount, assertUpdateCount, checkAllConsistency, checkEstimatedRowCount, commit, createStatement, createStatement, createStatement, dropTable, dropTable, getConnection, getDatabaseProperty, getLastSQLException, openConnection, openDefaultConnection, openDefaultConnection, openUserConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, rollback, runScript, runScript, runSQLCommands, setAutoCommit, tearDown, usingDB2Client, usingDerbyNetClient, usingEmbedded
 
Methods inherited from class org.apache.derbyTesting.junit.BaseTestCase
alarm, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertSecurityManager, assertThrowableEquals, execJavaCmd, fail, getFailureFolder, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeSystemProperty, runBare, setSystemProperty, traceit
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, setUp, toString
 
Methods inherited from class junit.framework.Assert
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, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SURTest

public SURTest(java.lang.String name)
Creates a new instance of SURTest

Method Detail

testConcurrencyModeWarning1

public void testConcurrencyModeWarning1()
                                 throws java.sql.SQLException
Test that you get a warning when specifying a query which is not updatable and concurrency mode CONCUR_UPDATABLE. In this case, the query contains an "order by"

Throws:
java.sql.SQLException

testConcurrencyModeWarning2

public void testConcurrencyModeWarning2()
                                 throws java.sql.SQLException
Test that you get a warning when specifying a query which is not updatable and concurrency mode CONCUR_UPDATABLE. In this case, the query contains a join.

Throws:
java.sql.SQLException

testForUpdateException1

public void testForUpdateException1()
                             throws java.sql.SQLException
Test that you get an exception when specifying update clause "FOR UPDATE" along with a query which is not updatable. In this case, the query contains and order by.

Throws:
java.sql.SQLException

testForUpdateException2

public void testForUpdateException2()
                             throws java.sql.SQLException
Test that you get an exception when specifying update clause "FOR UPDATE" along with a query which is not updatable. In this case, the query contains a join

Throws:
java.sql.SQLException

testForwardOnlyReadOnly1

public void testForwardOnlyReadOnly1()
                              throws java.sql.SQLException
Test that you can scroll forward and read all records in the ResultSet

Throws:
java.sql.SQLException

testFailOnUpdateOfReadOnlyResultSet1

public void testFailOnUpdateOfReadOnlyResultSet1()
                                          throws java.sql.SQLException
Test that you get an exception if you try to update a ResultSet with concurrency mode CONCUR_READ_ONLY.

Throws:
java.sql.SQLException

testFailOnUpdateOfReadOnlyResultSet2

public void testFailOnUpdateOfReadOnlyResultSet2()
                                          throws java.sql.SQLException
Test that you get an exception when attempting to update a ResultSet which has been downgraded to a read only ResultSet.

Throws:
java.sql.SQLException

testFailOnUpdateOfReadOnlyResultSet3

public void testFailOnUpdateOfReadOnlyResultSet3()
                                          throws java.sql.SQLException
Test that you get an exception when attempting to update a ResultSet which has been downgraded to a read only ResultSet.

Throws:
java.sql.SQLException

testFailOnUpdateOfReadOnlyResultSet4

public void testFailOnUpdateOfReadOnlyResultSet4()
                                          throws java.sql.SQLException
Test that you get an exception when attempting to update a ResultSet which has been downgraded to a read only ResultSet.

Throws:
java.sql.SQLException

testFailOnUpdateOfReadOnlyResultSet5

public void testFailOnUpdateOfReadOnlyResultSet5()
                                          throws java.sql.SQLException
Test that you get an exception if you try to update a ResultSet with concurrency mode CONCUR_READ_ONLY.

Throws:
java.sql.SQLException

testCursorStateAfterCommit1

public void testCursorStateAfterCommit1()
                                 throws java.sql.SQLException
Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row. The test uses a FORWARD_ONLY resultset and ResultSet update methods when doing the update.

Throws:
java.sql.SQLException

testCursorStateAfterCommit2

public void testCursorStateAfterCommit2()
                                 throws java.sql.SQLException
Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row. The test uses a SCROLL_INSENSITIVE resultset and ResultSet update methods when doing the update.

Throws:
java.sql.SQLException

testCursorStateAfterCommit3

public void testCursorStateAfterCommit3()
                                 throws java.sql.SQLException
Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row. The test uses a FORWARD_ONLY resultset and positioned updates.

Throws:
java.sql.SQLException

testCursorStateAfterCommit4

public void testCursorStateAfterCommit4()
                                 throws java.sql.SQLException
Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row. The test uses a SCROLL_INSENSITIVE resultset and positioned updates.

Throws:
java.sql.SQLException

testCursorStateAfterCommit

private void testCursorStateAfterCommit(boolean positioned,
                                        int resultSetType)
                                 throws java.sql.SQLException
Test that when doing an update immediately after a commit, the update fails, because the cursor has been postioned between the current row and the next row. If the cursor gets repositioned, it allows an update.

Parameters:
positioned - true to use positioned update, otherwise use ResultSet.updateRow()
resultSetType - type of result set (as in ResultSet.getType())
Throws:
java.sql.SQLException

testMultiUpdateRow1

public void testMultiUpdateRow1()
                         throws java.sql.SQLException
Test that you can correctly run multiple updateXXX() + updateRow() combined with cancelRowUpdates().

Throws:
java.sql.SQLException

testMultiUpdateRow2

public void testMultiUpdateRow2()
                         throws java.sql.SQLException
Test that you can correctly run multiple updateNull() + updateRow() combined with cancelRowUpdates().

Throws:
java.sql.SQLException

testCursorOperationConflictWarning1

public void testCursorOperationConflictWarning1()
                                         throws java.sql.SQLException
Test that you get cursor operation conflict warning if updating a row which has been deleted from the table.

Throws:
java.sql.SQLException

testCursorOperationConflictWarning2

public void testCursorOperationConflictWarning2()
                                         throws java.sql.SQLException
Test that you get cursor operation conflict warning if updating a row which has been deleted from the table, now using positioned updates / deletes.

Throws:
java.sql.SQLException

testIndexedUpdateCursor1

public void testIndexedUpdateCursor1()
                              throws java.sql.SQLException
Test that you can scroll forward and update indexed records in the ResultSet (not using FOR UPDATE)

Throws:
java.sql.SQLException

testIndexedUpdateCursor2

public void testIndexedUpdateCursor2()
                              throws java.sql.SQLException
Test that you can scroll forward and update indexed records in the ResultSet (using FOR UPDATE).

Throws:
java.sql.SQLException

testInsertRowWithScrollCursor

public void testInsertRowWithScrollCursor()
                                   throws java.sql.SQLException
Tests that it is possible to move using positioning methods after moveToInsertRow and that it is possible to delete a row after positioning back from insertRow. Also tests that it is possible to insert a row when positioned on insert row, that it is not possible to update or delete a row from insertRow and that it also is not possible to insert a row without being on insert row.

Throws:
java.sql.SQLException

testIndexedScrollInsensitiveUpdateCursorWithoutForUpdate1

public void testIndexedScrollInsensitiveUpdateCursorWithoutForUpdate1()
                                                               throws java.sql.SQLException
Test that you can scroll forward and update indexed records in the scrollable ResultSet (not using FOR UPDATE).

Throws:
java.sql.SQLException

testIndexedScrollInsensitiveUpdateCursorWithForUpdate1

public void testIndexedScrollInsensitiveUpdateCursorWithForUpdate1()
                                                            throws java.sql.SQLException
Test that you can scroll forward and update indexed records in the scrollable ResultSet (using FOR UPDATE).

Throws:
java.sql.SQLException

testPrimaryKeyUpdate1

public void testPrimaryKeyUpdate1()
                           throws java.sql.SQLException
Test update of a keyed record using scrollable updatable resultset.

Throws:
java.sql.SQLException

testOtherPrimaryKeyUpdate1

public void testOtherPrimaryKeyUpdate1()
                                throws java.sql.SQLException
Test update of a keyed record using other statement object.

Throws:
java.sql.SQLException

testOtherAndOwnPrimaryKeyUpdate1

public void testOtherAndOwnPrimaryKeyUpdate1()
                                      throws java.sql.SQLException
Test update of a keyed record using other both the scrollable updatable resultset and using another statement object.

Throws:
java.sql.SQLException

testMultipleKeyUpdates

public void testMultipleKeyUpdates()
                            throws java.sql.SQLException
Update multiple keyed records using scrollable updatable resultset

Throws:
java.sql.SQLException

testSecondaryIndexKeyUpdate1

public void testSecondaryIndexKeyUpdate1()
                                  throws java.sql.SQLException
Test update indexed records using scrollable updatable resultset

Throws:
java.sql.SQLException

testOtherSecondaryKeyUpdate1

public void testOtherSecondaryKeyUpdate1()
                                  throws java.sql.SQLException
Test update indexed records using other statement object and using resultset.

Throws:
java.sql.SQLException

testScrollInsensitiveReadOnly1

public void testScrollInsensitiveReadOnly1()
                                    throws java.sql.SQLException
Test scrolling in a read only resultset

Throws:
java.sql.SQLException

testForwardOnlyConcurUpdatableWithForUpdate1

public void testForwardOnlyConcurUpdatableWithForUpdate1()
                                                  throws java.sql.SQLException
Test updating a forward only resultset (with FOR UPDATE)

Throws:
java.sql.SQLException

testForwardOnlyConcurUpdatableWithoutForUpdate1

public void testForwardOnlyConcurUpdatableWithoutForUpdate1()
                                                     throws java.sql.SQLException
Test updating a forward only resultset (without FOR UPDATE)

Throws:
java.sql.SQLException

testPositionedUpdateWithoutForUpdate1

public void testPositionedUpdateWithoutForUpdate1()
                                           throws java.sql.SQLException
Test updating a forward only resultset (without FOR UPDATE) and using positioned update

Throws:
java.sql.SQLException

testPositionedUpdateWithForUpdate1

public void testPositionedUpdateWithForUpdate1()
                                        throws java.sql.SQLException
Test updating a forward only resultset (with FOR UPDATE) and using positioned update

Throws:
java.sql.SQLException

testScrollablePositionedUpdateWithForUpdate1

public void testScrollablePositionedUpdateWithForUpdate1()
                                                  throws java.sql.SQLException
Test positioned update of a scrollable resultset (with FOR UPDATE)

Throws:
java.sql.SQLException

testScrollInsensitiveConcurUpdatableWithForUpdate1

public void testScrollInsensitiveConcurUpdatableWithForUpdate1()
                                                        throws java.sql.SQLException
Test update of a scrollable resultset (with FOR UPDATE) Only scrolling forward

Throws:
java.sql.SQLException

testScrollInsensitiveConcurUpdatableWithForUpdate2

public void testScrollInsensitiveConcurUpdatableWithForUpdate2()
                                                        throws java.sql.SQLException
Test update of a scrollable resultset (with FOR UPDATE) Scrolling forward and backward.

Throws:
java.sql.SQLException

testScrollInsensistiveConurUpdatable3

private void testScrollInsensistiveConurUpdatable3(java.sql.ResultSet rs)
                                            throws java.sql.SQLException
Test update of a scrollable resultset Scrolling forward and backward. Then open another resultset and verify the data.

Throws:
java.sql.SQLException

testScrollInsensitiveConcurUpdatableWithForUpdate3

public void testScrollInsensitiveConcurUpdatableWithForUpdate3()
                                                        throws java.sql.SQLException
Test update of a scrollable resultset (with FOR UPDATE) Scrolling forward and backward. Then open another resultset and verify the data.

Throws:
java.sql.SQLException

testScrollInsensitiveConcurUpdatableWithoutForUpdate1

public void testScrollInsensitiveConcurUpdatableWithoutForUpdate1()
                                                           throws java.sql.SQLException
Test update of a scrollable resultset (without FOR UPDATE) Scrolling forward only

Throws:
java.sql.SQLException

testScrollInsensitiveConcurUpdatableWithoutForUpdate2

public void testScrollInsensitiveConcurUpdatableWithoutForUpdate2()
                                                           throws java.sql.SQLException
Test update of a scrollable resultset (without FOR UPDATE) Scrolling forward and backward.

Throws:
java.sql.SQLException

testScrollInsensitiveConcurUpdatableWithoutForUpdate3

public void testScrollInsensitiveConcurUpdatableWithoutForUpdate3()
                                                           throws java.sql.SQLException
Test update of a scrollable resultset (without FOR UPDATE) Scrolling forward and backward. Then open another resultset and verify the data.

Throws:
java.sql.SQLException

testForUpdateWithColumnList

public void testForUpdateWithColumnList()
                                 throws java.sql.SQLException
DERBY-4198 "When using the FOR UPDATE OF clause with SUR (Scroll-insensive updatable result sets), the updateRow() method crashes" This bug revealed missing logic to handle the fact the the ExecRow passed down to ScrollInsensitiveResultSet.updateRow does not always contain all the rows of the basetable, cf. the logic of RowChangerImpl. When an explicit list of columns is given as in FOR UPDATE OF , the ExecRow may contains a subset of the the base table columns and ScrollInsensitiveResultSet was not ready to handle that. Test some of the cases which went wrong before the fix.

Throws:
java.sql.SQLException

checkDetectabilityCallsOutsideRow

private void checkDetectabilityCallsOutsideRow(java.sql.ResultSet rs,
                                               java.lang.String state)
Check that detectability methods throw the correct exception when called in an illegal row state, that is, somehow not positioned on a row. Minion of testDetectabilityExceptions.

Parameters:
rs - An open updatable result set.
state - A string describing the illegal state.

testRowUpdatedAndRowDeleted

public void testRowUpdatedAndRowDeleted()
                                 throws java.sql.SQLException
Test that rowUpdated() and rowDeleted() methods both return true when the row has first been updated and then deleted using the updateRow() and deleteRow() methods.

Throws:
java.sql.SQLException

testDetectabilityExceptions

public void testDetectabilityExceptions()
                                 throws java.sql.SQLException
Test that the JDBC detectability calls throw correct exceptions when called in in wrong row states. This is done for both supported updatable result set types.

Throws:
java.sql.SQLException

testDowngradeToScrollReadOnly

public void testDowngradeToScrollReadOnly()
                                   throws java.sql.SQLException
DERBY-1481 - ResultSet.beforeFirst() gives protocol error on scrollable, updatable result sets that are downgraded to read-only Check that no exception is thrown when calling positioning methods on a result set that has been downgraded to read-only.

Throws:
java.sql.SQLException

getNextCursorName

private final java.lang.String getNextCursorName()
Get a cursor name. We use the same cursor name for all cursors.


suite

public static junit.framework.Test suite()
Run the base suite in embedded and client mode.


baseSuite

private static junit.framework.Test baseSuite(java.lang.String name)
The suite contains all testcases in this class running on different data models


Built on Sat 2009-11-28 18:44:18-0800, from revision 885187

Apache Derby V10.6 Internals - Copyright © 2004,2008 The Apache Software Foundation. All Rights Reserved.