public class TestDbMetaData extends BaseJDBCTestCase
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.Object[][] |
ALL_FUNCTIONS
Expected rows from getFunctions() when all functions match.
|
private static java.lang.Integer |
FUNCTION_NO_TABLE_VALUE |
private static JDBC.GeneratedId |
GENERIC_NAME |
private java.sql.DatabaseMetaData |
meta |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Constructor and Description |
|---|
TestDbMetaData(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
private void |
assertGetFunctionColumnsRs(java.sql.ResultSet rs)
Check that the column names are as expected from
getFunctionColumns().
|
private void |
assertGetFunctionsRs(java.sql.ResultSet rs)
Check that the column names are as expected from getFunctions().
|
private void |
assertGetSchemasRs(java.sql.ResultSet rs)
Check that the column names are as expected from getSchemas().
|
private static junit.framework.Test |
baseSuite(java.lang.String name) |
private static void |
createFunctions(java.sql.Statement s) |
private static java.lang.Object[][] |
getGetFunctions()
From the list of all functions extract the ones with GET in the name.
|
private static java.lang.Object[][] |
getSysFunctions()
From the list of all functions extract the ones in schemas
starting with SYS.
|
protected void |
setUp() |
static junit.framework.Test |
suite() |
protected void |
tearDown()
Tear down this fixture, sub-classes should call
super.tearDown().
|
void |
testAutoCommitFailure()
Test autoCommitFailureClosesAllResultSets() by checking whether
a failure in auto-commit mode will close all result sets, even
holdable ones.
|
void |
testAutoCommitFailureClosesAllResultSets() |
void |
testFunctionNullable()
Since JDBC40Translation cannot be accessed in queries in
metadata.properties, the query has to use
DatabaseMetaData.procedureNullable.
|
void |
testGetClientInfoProperties() |
void |
testGetFunctionColumnsForDummyFunctions() |
void |
testGetFunctionColumnsStartingWithDUMMY() |
void |
testGetFunctionsContainingGET() |
void |
testGetFunctionsDummySchema() |
void |
testGetFunctionsFromSysSchemas() |
void |
testGetFunctionsNoSchemaNoCatalog() |
void |
testGetFunctionsNullNullNull() |
void |
testGetSchemasMatchingAPP() |
void |
testGetSchemasMatchingBLAH() |
void |
testGetSchemasNullNull() |
void |
testGetSchemasStartingWithSYS() |
void |
testGetWrapperNegative() |
void |
testGetWrapperPositive() |
void |
testIsWrapperForNegative() |
void |
testIsWrapperForPositive() |
void |
testStoredProcEscapeSyntax()
Test supportsStoredFunctionsUsingCallSyntax() by checking
whether calling a stored procedure using the escape syntax
succeeds.
|
void |
testSupportsStoredFunctionsUsingCallSyntax() |
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, 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 java.lang.Integer FUNCTION_NO_TABLE_VALUE
private java.sql.DatabaseMetaData meta
private static final JDBC.GeneratedId GENERIC_NAME
private static final java.lang.Object[][] ALL_FUNCTIONS
protected void setUp()
throws java.sql.SQLException
setUp in class junit.framework.TestCasejava.sql.SQLExceptionprotected void tearDown()
throws java.lang.Exception
BaseJDBCTestCasetearDown in class BaseJDBCTestCasejava.lang.Exceptionprivate static void createFunctions(java.sql.Statement s)
throws java.sql.SQLException
java.sql.SQLExceptionprivate static junit.framework.Test baseSuite(java.lang.String name)
public static junit.framework.Test suite()
public void testSupportsStoredFunctionsUsingCallSyntax()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testAutoCommitFailureClosesAllResultSets()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetClientInfoProperties()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testFunctionNullable()
private void assertGetFunctionsRs(java.sql.ResultSet rs)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetFunctionsNullNullNull()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetFunctionsDummySchema()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetFunctionsFromSysSchemas()
throws java.sql.SQLException
java.sql.SQLExceptionprivate static java.lang.Object[][] getSysFunctions()
private static java.lang.Object[][] getGetFunctions()
public void testGetFunctionsContainingGET()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetFunctionsNoSchemaNoCatalog()
throws java.sql.SQLException
java.sql.SQLExceptionprivate void assertGetFunctionColumnsRs(java.sql.ResultSet rs)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetFunctionColumnsStartingWithDUMMY()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetFunctionColumnsForDummyFunctions()
throws java.sql.SQLException
java.sql.SQLExceptionprivate void assertGetSchemasRs(java.sql.ResultSet rs)
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetSchemasNullNull()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetSchemasStartingWithSYS()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetSchemasMatchingAPP()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetSchemasMatchingBLAH()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testStoredProcEscapeSyntax()
throws java.sql.SQLException
java.sql.SQLException - if an unexpected database error occurspublic void testAutoCommitFailure()
throws java.sql.SQLException
java.sql.SQLException - if an unexpected database error occurspublic void testIsWrapperForPositive()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testIsWrapperForNegative()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetWrapperPositive()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void testGetWrapperNegative()
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.