public class ResultSetTest extends DatabaseTestCase
Constructor and Description |
---|
ResultSetTest(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
array2String(java.lang.Object[] a) |
static void |
main(java.lang.String[] args) |
void |
testAbsoluteLargeValue()
Test that calling
absolute() with very large positive
values positions the cursor after the last row and with very large
negative values positions the cursor before the first row. |
void |
testAbsoluteMinusOne()
Test that
absolute(-1) works the same as last() . |
void |
testAutoIncrement()
Test for bug #690, IS_AUTOINCREMENT invalid for identity columns.
|
void |
testBug644()
Test for bug #644, updateNull not working with MSSQL DECIMAL field.
|
void |
testCancelResultSet()
Test for bug [1246270] Closing a statement after canceling it throws an
exception.
|
void |
testConcurrentResultSets()
Test for bug [2051585], TDS Protocol error when 2 ResultSets on the
same connection are being iterated at the same time.
|
void |
testCursorFallback()
Test that the cursor fallback logic correctly discriminates between
"real" sql errors and cursor open failures.
|
void |
testCursorFetch()
Test the behavior of
sp_cursorfetch with fetch sizes
greater than 1. |
void |
testCursorMaxRows()
Test that
Statement.setMaxRows() works on cursor
ResultSet s. |
void |
testCursorPrevious()
Test that
ResultSet.previous() works correctly on cursor
ResultSet s. |
void |
testCursorWarning()
Test for bug [1022445] Cursor downgrade warning not raised.
|
void |
testDatePerformance()
Test for bug #548, Select statement very slow with date parameter.
|
void |
testDateType()
Test for the problem reported in feature request #78, columns of type DATE
are returned as String.
|
void |
testDeleteRowMarksDeleted()
Test that deleted rows are not removed but rather marked as deleted.
|
void |
testDistinctBug()
Test bug with Sybase where readonly scrollable result set based on a
SELECT DISTINCT returns duplicate rows.
|
void |
testDynamicCursors()
Test if dynamic cursors (
ResultSet.TYPE_SCROLL_SENSITIVE+1 )
see others' updates. |
void |
testEmptyInsertRow()
Test that
insertRow() works with no values set. |
void |
testGetByName()
Test whether retrieval by name returns the first occurence (that's what
the spec requires).
|
void |
testGetObject1()
Test BIT data type.
|
void |
testGetObject2()
Test TINYINT data type.
|
void |
testGetObject3()
Test SMALLINT data type.
|
void |
testGetObject4()
Test INT data type.
|
void |
testGetObject5()
Test BIGINT data type.
|
void |
testInsertRowVisible()
Test that inserted rows are visible in a scroll sensitive
ResultSet and that they show up at the end. |
void |
testMaxRows()
Check whether
Statement.setMaxRows() works okay, bug
[1812686]. |
void |
testMoreThan255Columns()
Test if COL_INFO packets are processed correctly for
ResultSet s with over 255 columns. |
void |
testNegativeOverflow()
Test for bug [2860742], getByte() causes overflow error for negative
values.
|
void |
testNumericOverflow()
Test for bug [1855125], numeric overflow not reported by jTDS.
|
void |
testOutOfMemory()
Test the behavior of the ResultSet/Statement/Connection when the JVM
runs out of memory (hopefully) in the middle of a packet.
|
void |
testPessimisticConcurrency()
Test pessimistic concurrency for SQL Server (for Sybase optimistic
concurrency will always be used).
|
void |
testRelative()
Test for bug [1182066] regression bug resultset: relative() not working
as expected.
|
void |
testRelativeLargeValue()
Test that calling
absolute() with very large positive
values positions the cursor after the last row and with very large
negative values positions the cursor before the first row. |
void |
testResultSetColumnName1()
Test for bug [1009233] ResultSet getColumnName, getColumnLabel return wrong values
|
void |
testResultSetMetaData()
Test for fixed bugs in ResultSetMetaData:
isNullable() always returns columnNoNulls.
|
void |
testResultSetScroll1()
Test for bug [961594] ResultSet.
|
void |
testResultSetScroll2()
Test for bug [945462] getResultSet() return null if you use scrollable/updatable.
|
void |
testResultSetScroll3()
Test for bug [1028881] statement.execute() causes wrong ResultSet type.
|
void |
testResultSetUpdate1()
Test for bug [1008208] 0.9-rc1 updateNull doesn't work.
|
void |
testRowstat()
Test for bug [1329765] Pseudo column ROWSTAT is back with SQL 2005
(September CTP).
|
void |
testSetObjectScale()
Test for bug [1075977]
setObject() causes SQLException. |
void |
testUnicodeStream()
Test that
read() works ok on the stream returned by
ResultSet.getUnicodeStream() (i.e. it doesn't always fill
the buffer, regardless of whether there's available data or not). |
void |
testUpdateableClientCursor()
Test for bug [1197603] Cursor downgrade error in CachedResultSet --
updateable result sets were incorrectly downgraded to read only forward
only ones when client side cursors were used.
|
void |
testUpdateRowDuplicatesRow()
Test that updated rows are marked as deleted and the new values inserted
at the end of the
ResultSet if the primary key is updated. |
void |
testUpdateRowNoChanges()
Test for bug [1170777] resultSet.updateRow() fails if no row has been
changed.
|
void |
testUpdateRowPosition()
Test that after updateRow() the cursor is positioned correctly.
|
void |
testUpdateRowUpdatesRow()
Test that updated rows are modified in place if the primary key is not
updated.
|
void |
testZeroFetchSize()
Test for bug [1232733] setFetchSize(0) causes exception.
|
compareBytes, getLongString, getLongString, getType, getTypemap
compareInputStreams, compareReaders, connect, dropDatabase, dropFunction, dropProcedure, dropTable, dropTrigger, dropType, dropView, dump, dump, dumpAll, dumpKeys, dumpRow, dumpRow, getConnection, getConnection, makeObjects, makeTestTables, setUp, tearDown
public void testBug644() throws java.lang.Exception
java.lang.Exception
public void testAutoIncrement() throws java.lang.Exception
java.lang.Exception
public void testGetObject1() throws java.lang.Exception
java.lang.Exception
public void testGetObject2() throws java.lang.Exception
java.lang.Exception
public void testGetObject3() throws java.lang.Exception
java.lang.Exception
public void testGetObject4() throws java.lang.Exception
java.lang.Exception
public void testGetObject5() throws java.lang.Exception
java.lang.Exception
public void testDateType() throws java.lang.Exception
java.lang.Exception
public void testResultSetScroll1() throws java.lang.Exception
java.lang.Exception
public void testResultSetScroll2() throws java.lang.Exception
java.lang.Exception
public void testResultSetScroll3() throws java.lang.Exception
java.lang.Exception
public void testResultSetUpdate1() throws java.lang.Exception
java.lang.Exception
public void testResultSetColumnName1() throws java.lang.Exception
java.lang.Exception
public void testResultSetMetaData() throws java.lang.Exception
java.lang.Exception
public void testCursorWarning() throws java.lang.Exception
java.lang.Exception
public void testCursorFallback() throws java.lang.Exception
java.lang.Exception
public void testCancelResultSet() throws java.lang.Exception
java.lang.Exception
public void testGetByName() throws java.lang.Exception
java.lang.Exception
public void testMoreThan255Columns() throws java.lang.Exception
ResultSet
s with over 255 columns.java.lang.Exception
public void testEmptyInsertRow() throws java.lang.Exception
insertRow()
works with no values set.java.lang.Exception
public void testInsertRowVisible() throws java.lang.Exception
ResultSet
and that they show up at the end.java.lang.Exception
public void testUpdateRowDuplicatesRow() throws java.lang.Exception
ResultSet
if the primary key is updated.java.lang.Exception
public void testUpdateRowUpdatesRow() throws java.lang.Exception
java.lang.Exception
public void testDeleteRowMarksDeleted() throws java.lang.Exception
java.lang.Exception
public void testUpdateRowNoChanges() throws java.lang.Exception
java.lang.Exception
public void testCursorFetch() throws java.lang.Exception
sp_cursorfetch
with fetch sizes
greater than 1.
Assertions tested:
ResultSet
the requested number of rows is returned,
starting with row 1 and the error code returned is non-zero (2).
java.lang.Exception
public void testAbsoluteMinusOne() throws java.lang.Exception
absolute(-1)
works the same as last()
.java.lang.Exception
public void testAbsoluteLargeValue() throws java.sql.SQLException
absolute()
with very large positive
values positions the cursor after the last row and with very large
negative values positions the cursor before the first row.java.sql.SQLException
public void testRelativeLargeValue() throws java.sql.SQLException
absolute()
with very large positive
values positions the cursor after the last row and with very large
negative values positions the cursor before the first row.java.sql.SQLException
public void testUnicodeStream() throws java.lang.Exception
read()
works ok on the stream returned by
ResultSet.getUnicodeStream()
(i.e. it doesn't always fill
the buffer, regardless of whether there's available data or not).java.lang.Exception
public void testMaxRows() throws java.lang.Exception
Statement.setMaxRows()
works okay, bug
[1812686].java.lang.Exception
public void testCursorMaxRows() throws java.lang.Exception
Statement.setMaxRows()
works on cursor
ResultSet
s.java.lang.Exception
public void testSetObjectScale() throws java.lang.Exception
setObject()
causes SQLException.
Conversion of float
values to String
adds
grouping to the value, which cannot then be parsed.
java.lang.Exception
public void testCursorPrevious() throws java.lang.Exception
ResultSet.previous()
works correctly on cursor
ResultSet
s.java.lang.Exception
public void testOutOfMemory() throws java.sql.SQLException
java.sql.SQLException
public void testRelative() throws java.lang.Exception
java.lang.Exception
public void testUpdateRowPosition() throws java.lang.Exception
java.lang.Exception
public void testUpdateableClientCursor() throws java.lang.Exception
java.lang.Exception
public void testDistinctBug() throws java.lang.Exception
java.lang.Exception
public void testPessimisticConcurrency() throws java.lang.Exception
java.lang.Exception
public void testDynamicCursors() throws java.lang.Exception
ResultSet.TYPE_SCROLL_SENSITIVE+1
)
see others' updates. SQL Server only.java.lang.Exception
public void testZeroFetchSize() throws java.lang.Exception
java.lang.Exception
public void testRowstat() throws java.lang.Exception
java.lang.Exception
public void testConcurrentResultSets() throws java.lang.Exception
java.lang.Exception
private static java.lang.String array2String(java.lang.Object[] a)
public void testNumericOverflow() throws java.sql.SQLException
java.sql.SQLException
public void testNegativeOverflow() throws java.sql.SQLException
java.sql.SQLException
public void testDatePerformance() throws java.sql.SQLException
java.sql.SQLException
public static void main(java.lang.String[] args)
Generated on June 8 2013