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_VALUEDEFAULT_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, prepareStatementassertCallError, 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, 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 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.TestCasejava.sql.SQLException - if creation of connection or callable statement
fail.protected void tearDown()
throws java.lang.Exception
tearDown in class BaseJDBCTestCasejava.sql.SQLException - if closing of the connection or the callable
statement fail.java.lang.Exceptionpublic void testNamedParametersAreNotSupported()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetDoubleIntOnInParameter()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetNClobIntNotImplemented()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetNClobStringNotImplemented()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetNStringIntNotImplemented()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetNStringStringNotImplemented()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetCharacterStreamIntOnInvalidTypeDOUBLE()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetCharacterStreamIntOnInParameterOfInvalidType()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetCharacterStreamIntOnInParameterOfValidType()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetCharacterStreamIntVARCHAR()
throws java.io.IOException,
java.sql.SQLException
java.io.IOExceptionjava.sql.SQLExceptionpublic void testGetCharacterStreamIntVARBINARYDirect()
throws java.io.IOException,
java.sql.SQLException
java.io.IOExceptionjava.sql.SQLExceptionpublic void testGetCharacterStreamIntVARBINARYFromDb()
throws java.io.IOException,
java.sql.SQLException
java.io.IOExceptionjava.sql.SQLExceptionpublic void testGetCharacterStreamIntOnVARBINARYWithNull()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetCharacterStreamIntOnVARCHARWithNull()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetCharacterStreamStringNotImplemented()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetNCharacterStreamIntNotImplemented()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetNCharacterStreamStringNotImplemented()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testSetBlobNotImplemented()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testSetClobNotImplemented()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testSetNCharacterStreamNotImplemented()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testSetNClobNClobNotImplemented()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testSetNClobReaderNotImplemented()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testSetNStringNotImplemented()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetSQLXMLIntNotImplemented()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetSQLXMLStringNotImplemented()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testSetSQLXMLNotImplemented()
throws java.sql.SQLException
java.sql.SQLExceptionprivate void testIsWrapperForXXXStatement(java.lang.Class klass)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testIsWrapperForStatement()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testIsWrapperForPreparedStatement()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testIsWrapperForCallableStatement()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testIsNotWrapperForResultSet()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testIsWrapperForSelf()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testUnwrapStatement()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testUnwrapPreparedStatement()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testUnwrapCallableStatement()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testUnwrapAsSelf()
throws java.sql.SQLException
java.sql.SQLExceptionpublic 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.Exceptionprivate void vetDataTypeCount(java.sql.Connection conn)
throws java.lang.Exception
java.lang.Exceptionpublic 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.Exceptionpublic 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.Exceptionpublic static void blobProc(java.sql.Blob[] blobarg)
throws java.lang.Exception
java.lang.Exceptionpublic static void clobProc(java.sql.Clob[] clobarg)
throws java.lang.Exception
java.lang.Exceptionpublic static junit.framework.Test suite()
private static junit.framework.Test baseSuite(java.lang.String name)
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.