public class UpdatableResultSetTest extends BaseJDBCTestCase
| Modifier and Type | Field and Description |
|---|---|
private static byte[] |
BYTES1 |
private static byte[] |
BYTES2 |
private static int |
insertKey
Key used to identify inserted rows.
|
private int |
key |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Constructor and Description |
|---|
UpdatableResultSetTest(java.lang.String name)
Creates a new instance of UpdatableResultSetTest
|
| Modifier and Type | Method and Description |
|---|---|
private java.sql.ResultSet |
fetch(java.lang.String colName,
int key)
Fetch the specified row.
|
private java.sql.ResultSet |
fetchUpd(java.lang.String colName,
int key)
Fetch the specified row for update.
|
private java.sql.PreparedStatement |
prep(java.lang.String colName)
Prepare commonly used statement to insert a row.
|
private static int |
requestKey()
Get a key that is used to identify an inserted row.
|
protected void |
setUp()
Create require objects and data.
|
static junit.framework.Test |
suite()
Create a test suite with all tests in this class.
|
void |
testDeleteRowOnQuotedColumn()
Tests deleteRow with column name containing quotes
|
void |
testDeleteRowOnQuotedCursor()
Tests deleteRow with cursor name containing quotes
|
void |
testDeleteRowOnQuotedSchema()
Tests deleteRow with schema name containing quotes
|
void |
testDeleteRowOnQuotedTable()
Tests deleteRow with table name containing quotes
|
void |
testInsertRowOnQuotedColumn()
Tests insertRow with column name containing quotes
|
void |
testInsertRowOnQuotedCursor()
Tests insertRow with cursor name containing quotes
|
void |
testInsertRowOnQuotedSchema()
Tests insertRow with schema name containing quotes
|
void |
testInsertRowOnQuotedTable()
Tests insertRow with table name containing quotes
|
void |
testUpdateBlob()
This methods tests the ResultSet interface method
updateBlob
|
void |
testUpdateBlobStringParameterName()
This methods tests the ResultSet interface method
updateBlob
|
void |
testUpdateClob()
This methods tests the ResultSet interface method
updateClob
|
void |
testUpdateClobStringParameterName()
This methods tests the ResultSet interface method
updateClob
|
void |
testUpdateRowOnQuotedColumn()
Tests updateRow with column name containing quotes
|
void |
testUpdateRowOnQuotedCursor()
Tests updateRow with cursor name containing quotes
|
void |
testUpdateRowOnQuotedSchema()
Tests updateRow with schema name containing quotes
|
void |
testUpdateRowOnQuotedTable()
Tests updateRow with table name containing quotes
|
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, tearDown, 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, toStringprivate static final byte[] BYTES1
private static final byte[] BYTES2
private static int insertKey
requestKey to obtain it.private int key
public UpdatableResultSetTest(java.lang.String name)
protected void setUp()
throws java.sql.SQLException
setUp in class junit.framework.TestCasejava.sql.SQLExceptionpublic static junit.framework.Test suite()
public void testInsertRowOnQuotedTable()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testUpdateRowOnQuotedTable()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testDeleteRowOnQuotedTable()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testInsertRowOnQuotedColumn()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testUpdateRowOnQuotedColumn()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testDeleteRowOnQuotedColumn()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testInsertRowOnQuotedSchema()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testUpdateRowOnQuotedSchema()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testDeleteRowOnQuotedSchema()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testInsertRowOnQuotedCursor()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testUpdateRowOnQuotedCursor()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testDeleteRowOnQuotedCursor()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testUpdateBlob()
throws java.lang.Exception
java.lang.Exceptionpublic void testUpdateBlobStringParameterName()
throws java.lang.Exception
java.lang.Exceptionpublic void testUpdateClob()
throws java.lang.Exception
java.lang.Exceptionpublic void testUpdateClobStringParameterName()
throws java.lang.Exception
java.lang.Exceptionprivate static final int requestKey()
private java.sql.PreparedStatement prep(java.lang.String colName)
throws java.sql.SQLException
colName - name of the column to insert intojava.sql.SQLExceptionprivate java.sql.ResultSet fetchUpd(java.lang.String colName,
int key)
throws java.sql.SQLException
colName - name of the column to fetchkey - identifier for row to fetchResultSet with zero or one row, depending on
the key usedjava.sql.SQLExceptionprivate java.sql.ResultSet fetch(java.lang.String colName,
int key)
throws java.sql.SQLException
colName - name of the column to fetchkey - identifier for row to fetchResultSet with zero or one row, depending on
the key usedjava.sql.SQLExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.