public class CallableStatementTest extends Wrapper41Test
java.sql.CallableStatement
JDBC40 API.Modifier and Type | Field and Description |
---|---|
private static boolean |
_nullOutArgs |
private java.sql.CallableStatement |
cStmt
Default callable statement used by the tests.
|
BINARY_VALUE, TIME_VALUE, TIMESTAMP_VALUE
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
CallableStatementTest(java.lang.String name)
Create a test with the given name.
|
Modifier and Type | Method and Description |
---|---|
static void |
allTypesProc(java.lang.Long[] bigintarg,
java.sql.Blob[] blobarg,
java.lang.Boolean[] booleanarg,
java.lang.String[] chararg,
byte[][] charforbitdataarg,
java.sql.Clob[] clobarg,
java.sql.Date[] datearg,
java.lang.Double[] doublearg,
java.lang.Double[] floatarg,
java.lang.Integer[] intarg,
java.lang.String[] longvarchararg,
byte[][] longvarcharforbitdataarg,
java.math.BigDecimal[] numericarg,
java.lang.Float[] realarg,
java.lang.Integer[] smallintarg,
java.sql.Time[] timearg,
java.sql.Timestamp[] timestamparg,
java.lang.String[] varchararg,
byte[][] varcharforbitdataarg)
Procedure used by jdbc 4.1 tests.
|
private static junit.framework.Test |
baseSuite(java.lang.String name) |
static void |
blobProc(java.sql.Blob[] blobarg) |
static void |
clobProc(java.sql.Clob[] clobarg) |
protected void |
setUp()
Create a default callable statement and connection.
|
static junit.framework.Test |
suite()
Return suite with all tests of the class.
|
protected void |
tearDown()
Close default callable statement and connection.
|
void |
test_4959()
Regression test for https://issues.apache.org/jira/browse/DERBY-4959, an NPE
trying to return null LOBs as procedure output args.
|
void |
testGetCharacterStreamIntOnInParameterOfInvalidType()
Test which SQLState is thrown when getCharacterStream is called
on an IN parameter of an unsupported type.
|
void |
testGetCharacterStreamIntOnInParameterOfValidType()
Test which SQLState is thrown when getCharacterStream is called
on an IN parameter of a supported type.
|
void |
testGetCharacterStreamIntOnInvalidTypeDOUBLE() |
void |
testGetCharacterStreamIntOnVARBINARYWithNull()
Read a SQL NULL value from a VARBINARY column through a reader.
|
void |
testGetCharacterStreamIntOnVARCHARWithNull()
Read a SQL NULL value from a VARCHAR column through a reader.
|
void |
testGetCharacterStreamIntVARBINARYDirect()
Test basic use of getCharacterStream on binary data.
|
void |
testGetCharacterStreamIntVARBINARYFromDb()
Fetch a string stored as bytes from the database through a reader,
then recreate the string.
|
void |
testGetCharacterStreamIntVARCHAR()
Test basic use of getCharacterStream on character data.
|
void |
testGetCharacterStreamStringNotImplemented() |
void |
testGetDoubleIntOnInParameter() |
void |
testGetNCharacterStreamIntNotImplemented() |
void |
testGetNCharacterStreamStringNotImplemented() |
void |
testGetNClobIntNotImplemented() |
void |
testGetNClobStringNotImplemented() |
void |
testGetNStringIntNotImplemented() |
void |
testGetNStringStringNotImplemented() |
void |
testGetSQLXMLIntNotImplemented() |
void |
testGetSQLXMLStringNotImplemented() |
void |
testIsNotWrapperForResultSet() |
void |
testIsWrapperForCallableStatement() |
void |
testIsWrapperForPreparedStatement() |
void |
testIsWrapperForSelf() |
void |
testIsWrapperForStatement() |
private void |
testIsWrapperForXXXStatement(java.lang.Class klass)
Helper method for testIsWrapperFor*Statement test cases.
|
void |
testJDBC4_1()
Test the JDBC 4.1 extensions.
|
void |
testNamedParametersAreNotSupported() |
void |
testSetAsciiStream()
Tests the setAsciiStream method that accepts length as a long
parameter in the Callable Statement interface
|
void |
testSetBinaryStream()
Tests the setBinaryStream method that accepts length as a long
parameter in the Callable Statement interface
|
void |
testSetBlobNotImplemented() |
void |
testSetCharacterStream()
Tests the setCharacterStream method that accepts length as a long
parameter in the Callable Statement interface
|
void |
testSetClobNotImplemented() |
void |
testSetNCharacterStreamNotImplemented() |
void |
testSetNClobNClobNotImplemented() |
void |
testSetNClobReaderNotImplemented() |
void |
testSetNStringNotImplemented() |
void |
testSetSQLXMLNotImplemented() |
void |
testUnwrapAsSelf() |
void |
testUnwrapCallableStatement() |
void |
testUnwrapPreparedStatement() |
void |
testUnwrapResultSet() |
void |
testUnwrapStatement() |
private void |
vetDataTypeCount(java.sql.Connection conn) |
examineJDBC4_1extensions, prepareCall, prepareStatement
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, 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 java.sql.CallableStatement cStmt
private static boolean _nullOutArgs
public CallableStatementTest(java.lang.String name)
name
- name of the test.protected void setUp() throws java.sql.SQLException
setUp
in class junit.framework.TestCase
java.sql.SQLException
- if creation of connection or callable statement
fail.protected void tearDown() throws java.lang.Exception
tearDown
in class BaseJDBCTestCase
java.sql.SQLException
- if closing of the connection or the callable
statement fail.java.lang.Exception
public void testNamedParametersAreNotSupported() throws java.sql.SQLException
java.sql.SQLException
public void testGetDoubleIntOnInParameter() throws java.sql.SQLException
java.sql.SQLException
public void testGetNClobIntNotImplemented() throws java.sql.SQLException
java.sql.SQLException
public void testGetNClobStringNotImplemented() throws java.sql.SQLException
java.sql.SQLException
public void testGetNStringIntNotImplemented() throws java.sql.SQLException
java.sql.SQLException
public void testGetNStringStringNotImplemented() throws java.sql.SQLException
java.sql.SQLException
public void testGetCharacterStreamIntOnInvalidTypeDOUBLE() throws java.sql.SQLException
java.sql.SQLException
public void testGetCharacterStreamIntOnInParameterOfInvalidType() throws java.sql.SQLException
java.sql.SQLException
public void testGetCharacterStreamIntOnInParameterOfValidType() throws java.sql.SQLException
java.sql.SQLException
public void testGetCharacterStreamIntVARCHAR() throws java.io.IOException, java.sql.SQLException
java.io.IOException
java.sql.SQLException
public void testGetCharacterStreamIntVARBINARYDirect() throws java.io.IOException, java.sql.SQLException
java.io.IOException
java.sql.SQLException
public void testGetCharacterStreamIntVARBINARYFromDb() throws java.io.IOException, java.sql.SQLException
java.io.IOException
java.sql.SQLException
public void testGetCharacterStreamIntOnVARBINARYWithNull() throws java.sql.SQLException
java.sql.SQLException
public void testGetCharacterStreamIntOnVARCHARWithNull() throws java.sql.SQLException
java.sql.SQLException
public void testGetCharacterStreamStringNotImplemented() throws java.sql.SQLException
java.sql.SQLException
public void testGetNCharacterStreamIntNotImplemented() throws java.sql.SQLException
java.sql.SQLException
public void testGetNCharacterStreamStringNotImplemented() throws java.sql.SQLException
java.sql.SQLException
public void testSetBlobNotImplemented() throws java.sql.SQLException
java.sql.SQLException
public void testSetClobNotImplemented() throws java.sql.SQLException
java.sql.SQLException
public void testSetNCharacterStreamNotImplemented() throws java.sql.SQLException
java.sql.SQLException
public void testSetNClobNClobNotImplemented() throws java.sql.SQLException
java.sql.SQLException
public void testSetNClobReaderNotImplemented() throws java.sql.SQLException
java.sql.SQLException
public void testSetNStringNotImplemented() throws java.sql.SQLException
java.sql.SQLException
public void testGetSQLXMLIntNotImplemented() throws java.sql.SQLException
java.sql.SQLException
public void testGetSQLXMLStringNotImplemented() throws java.sql.SQLException
java.sql.SQLException
public void testSetSQLXMLNotImplemented() throws java.sql.SQLException
java.sql.SQLException
private void testIsWrapperForXXXStatement(java.lang.Class klass) throws java.sql.SQLException
java.sql.SQLException
public void testIsWrapperForStatement() throws java.sql.SQLException
java.sql.SQLException
public void testIsWrapperForPreparedStatement() throws java.sql.SQLException
java.sql.SQLException
public void testIsWrapperForCallableStatement() throws java.sql.SQLException
java.sql.SQLException
public void testIsNotWrapperForResultSet() throws java.sql.SQLException
java.sql.SQLException
public void testIsWrapperForSelf() throws java.sql.SQLException
java.sql.SQLException
public void testUnwrapStatement() throws java.sql.SQLException
java.sql.SQLException
public void testUnwrapPreparedStatement() throws java.sql.SQLException
java.sql.SQLException
public void testUnwrapCallableStatement() throws java.sql.SQLException
java.sql.SQLException
public void testUnwrapAsSelf() throws java.sql.SQLException
java.sql.SQLException
public void testUnwrapResultSet()
public void testSetCharacterStream() throws java.sql.SQLException
java.sql.SQLException
- Upon any error that occurs while calling this
methodpublic void testSetAsciiStream() throws java.sql.SQLException
java.sql.SQLException
- Upon any error that occurs while calling this
methodpublic void testSetBinaryStream() throws java.sql.SQLException
java.sql.SQLException
- Upon any error that occurs while calling this
methodpublic void testJDBC4_1() throws java.lang.Exception
java.lang.Exception
private void vetDataTypeCount(java.sql.Connection conn) throws java.lang.Exception
java.lang.Exception
public void test_4959() throws java.lang.Exception
Regression test for https://issues.apache.org/jira/browse/DERBY-4959, an NPE trying to return null LOBs as procedure output args.
java.lang.Exception
public static void allTypesProc(java.lang.Long[] bigintarg, java.sql.Blob[] blobarg, java.lang.Boolean[] booleanarg, java.lang.String[] chararg, byte[][] charforbitdataarg, java.sql.Clob[] clobarg, java.sql.Date[] datearg, java.lang.Double[] doublearg, java.lang.Double[] floatarg, java.lang.Integer[] intarg, java.lang.String[] longvarchararg, byte[][] longvarcharforbitdataarg, java.math.BigDecimal[] numericarg, java.lang.Float[] realarg, java.lang.Integer[] smallintarg, java.sql.Time[] timearg, java.sql.Timestamp[] timestamparg, java.lang.String[] varchararg, byte[][] varcharforbitdataarg) throws java.lang.Exception
Procedure used by jdbc 4.1 tests.
java.lang.Exception
public static void blobProc(java.sql.Blob[] blobarg) throws java.lang.Exception
java.lang.Exception
public static void clobProc(java.sql.Clob[] clobarg) throws java.lang.Exception
java.lang.Exception
public static junit.framework.Test suite()
private static junit.framework.Test baseSuite(java.lang.String name)
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.