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, assertCommitError, assertCompileError, assertEquals, assertEquals, assertEquals, assertEquivalentDataType, assertErrorCode, assertGetIntError, assertNextError, assertPreparedStatementError, assertResults, assertResults, assertSQLExceptionEquals, assertSQLState, assertSQLState, assertStatementError, assertStatementError, assertStatementError, assertStatementError, assertStatementErrorUnordered, assertTableRowCount, assertUpdateCount, assertUpdateCount, assertWarning, chattyPrepare, chattyPrepareCall, checkAllConsistency, checkEstimatedRowCount, closeStatement, commit, createStatement, createStatement, createStatement, dropTable, dropTable, dropView, dropView, dumpRs, dumpRs, emptyStatementCache, executeQuery, expectCompilationError, expectCompilationError, expectExecutionError, getClientTransactionID, getConnection, getDatabaseProperty, getLastSQLException, goodStatement, goodUpdate, 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, usingEmbedded
alarm, assertDirectoryDeleted, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertLaunchedJUnitTestMethod, assertLaunchedJUnitTestMethod, assertSameNullness, assertSecurityManager, assertThrowableEquals, currentDirectory, execJavaCmd, execJavaCmd, execJavaCmd, fail, getClassVersionMajor, getEmmaJar, getFailureFolder, getFilesWith, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, hasInterruptibleIO, isCVM, isIBMJVM, isJ9Platform, isJava5, isJava7, isPhoneME, isPlatform, isSunJVM, isWindowsPlatform, newAssertionFailedError, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeFiles, removeSystemProperty, runsWithEmma, runsWithJaCoCo, setSystemErr, setSystemOut, setSystemProperty, sleep, sleepAtLeastOneTick, traceit, vmAtLeast
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, toString
private 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.TestCase
java.sql.SQLException
public static junit.framework.Test suite()
public void testInsertRowOnQuotedTable() throws java.sql.SQLException
java.sql.SQLException
public void testUpdateRowOnQuotedTable() throws java.sql.SQLException
java.sql.SQLException
public void testDeleteRowOnQuotedTable() throws java.sql.SQLException
java.sql.SQLException
public void testInsertRowOnQuotedColumn() throws java.sql.SQLException
java.sql.SQLException
public void testUpdateRowOnQuotedColumn() throws java.sql.SQLException
java.sql.SQLException
public void testDeleteRowOnQuotedColumn() throws java.sql.SQLException
java.sql.SQLException
public void testInsertRowOnQuotedSchema() throws java.sql.SQLException
java.sql.SQLException
public void testUpdateRowOnQuotedSchema() throws java.sql.SQLException
java.sql.SQLException
public void testDeleteRowOnQuotedSchema() throws java.sql.SQLException
java.sql.SQLException
public void testInsertRowOnQuotedCursor() throws java.sql.SQLException
java.sql.SQLException
public void testUpdateRowOnQuotedCursor() throws java.sql.SQLException
java.sql.SQLException
public void testDeleteRowOnQuotedCursor() throws java.sql.SQLException
java.sql.SQLException
public void testUpdateBlob() throws java.lang.Exception
java.lang.Exception
public void testUpdateBlobStringParameterName() throws java.lang.Exception
java.lang.Exception
public void testUpdateClob() throws java.lang.Exception
java.lang.Exception
public void testUpdateClobStringParameterName() throws java.lang.Exception
java.lang.Exception
private 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.SQLException
private 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.SQLException
private 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.SQLException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.