net.sourceforge.jtds.jdbc
Class ClientSideCursorTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bynet.sourceforge.jtds.jdbc.TestBase
              extended bynet.sourceforge.jtds.jdbc.DatabaseTestCase
                  extended bynet.sourceforge.jtds.jdbc.ClientSideCursorTest
All Implemented Interfaces:
junit.framework.Test

public class ClientSideCursorTest
extends DatabaseTestCase

Test case to illustrate use of Cached cursor result set.

Version:
1.0
Author:
Mike Hutchinson

Field Summary
 
Fields inherited from class net.sourceforge.jtds.jdbc.DatabaseTestCase
 
Fields inherited from class net.sourceforge.jtds.jdbc.TestBase
con, props
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
ClientSideCursorTest(java.lang.String name)
           
 
Method Summary
static void main(java.lang.String[] args)
           
 void testCachedCursor()
          General test of scrollable cursor functionality.
 void testOptimisticUpdates()
          Test optimistic updates throw exception if row is changed on disk.
 void testPositionedUpdate()
          Test support for JDBC 1 style positioned updates with named cursors.
 void testUpdateNoKeys()
          Test updateable result set where table is not keyed.
 
Methods inherited from class net.sourceforge.jtds.jdbc.DatabaseTestCase
compareBytes, getLongString, getLongString, getType, getTypemap
 
Methods inherited from class net.sourceforge.jtds.jdbc.TestBase
compareInputStreams, compareReaders, connect, dropDatabase, dropFunction, dropProcedure, dropTable, dropTrigger, dropType, dropView, dump, dump, dumpAll, dumpKeys, dumpRow, dumpRow, getConnection, getConnection, makeObjects, makeTestTables, setUp, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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

ClientSideCursorTest

public ClientSideCursorTest(java.lang.String name)
Method Detail

testCachedCursor

public void testCachedCursor()
                      throws java.lang.Exception
General test of scrollable cursor functionality.

When running on SQL Server this test will exercise MSCursorResultSet. When running on Sybase this test will exercise CachedResultSet.

Throws:
java.lang.Exception

testPositionedUpdate

public void testPositionedUpdate()
                          throws java.lang.Exception
Test support for JDBC 1 style positioned updates with named cursors.

When running on SQL Server this test will exercise MSCursorResultSet. When running on Sybase this test will exercise CachedResultSet.

Throws:
java.lang.Exception

testOptimisticUpdates

public void testOptimisticUpdates()
                           throws java.lang.Exception
Test optimistic updates throw exception if row is changed on disk.

When running on SQL Server this test will exercise MSCursorResultSet. When running on Sybase this test will exercise CachedResultSet.

Throws:
java.lang.Exception

testUpdateNoKeys

public void testUpdateNoKeys()
                      throws java.lang.Exception
Test updateable result set where table is not keyed. Uses a server side cursor and positioned updates on Sybase.

Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)


Generated on October 27 2012