abstract class AbstractCompatibilityTest extends BaseJDBCTestCase
Modifier and Type | Field and Description |
---|---|
private static Version |
_clientVMLevel |
private static DerbyVersion |
_driverLevel |
private static Version |
_serverVMLevel |
private static java.lang.String |
FUNCTION |
private static int |
JDBC_BOOLEAN
Read a column from a ResultSet given its column name and expected jdbc
type.
|
private static java.lang.String |
PROCEDURE |
static java.lang.String |
SERVER_VERSION_FUNCTION |
private static java.lang.String |
TYPE |
private static java.lang.String |
VERSION_PROPERTY |
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
Constructor and Description |
---|
AbstractCompatibilityTest(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
compareBytes(java.lang.String message,
java.lang.Object left,
java.lang.Object right)
Assert two byte arrays are equal, allowing nulls to be equal.
|
void |
compareDates(java.lang.String message,
java.lang.Object left,
java.lang.Object right)
Assert two Dates are equal, allowing nulls to be equal.
|
void |
compareObjects(java.lang.String message,
java.lang.Object left,
java.lang.Object right)
Assert two objects are equal, allowing nulls to be equal.
|
protected void |
dropFunction(java.lang.String name)
Drop a function regardless of whether it exists.
|
protected void |
dropProcedure(java.lang.String name)
Drop a procedure regardless of whether it exists.
|
protected void |
dropSchemaObject(java.lang.String genus,
java.lang.String objectName,
boolean restrict) |
protected void |
dropUDT(java.lang.String name)
Drop a UDT regardless of whether it exists.
|
Version |
getClientVMVersion()
Get the vm level of the client.
|
protected java.lang.Object |
getColumn(java.sql.ResultSet rs,
java.lang.String columnName,
int jdbcType) |
DerbyVersion |
getDriverVersion()
Get the version of the client.
|
DerbyVersion |
getServerVersion() |
protected static DerbyVersion |
getServerVersion(java.sql.Connection con)
Get the version of the server.
|
static Version |
getServerVMVersion()
Get the vm level of the server.
|
static java.lang.String |
getVMVersion()
Get the vm level of the server.
|
boolean |
serverSupportsUDTs()
Report whether the server supports ANSI UDTs.
|
static boolean |
serverSupportsUDTs(java.sql.Connection con) |
protected void |
setParameter(java.sql.PreparedStatement ps,
int param,
int jdbcType,
java.lang.Object value)
Stuff a PreparedStatement parameter given its 1-based parameter position
and expected jdbc type.
|
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, setUp, toString
public static final java.lang.String SERVER_VERSION_FUNCTION
private static final java.lang.String VERSION_PROPERTY
private static Version _clientVMLevel
private static Version _serverVMLevel
private static DerbyVersion _driverLevel
private static final int JDBC_BOOLEAN
Read a column from a ResultSet given its column name and expected jdbc type. This method is useful if you are want to verify the getXXX() logic most naturally fitting the declared SQL type.
private static final java.lang.String FUNCTION
private static final java.lang.String PROCEDURE
private static final java.lang.String TYPE
public AbstractCompatibilityTest(java.lang.String name)
public DerbyVersion getServerVersion() throws java.sql.SQLException
java.sql.SQLException
protected static DerbyVersion getServerVersion(java.sql.Connection con) throws java.sql.SQLException
Get the version of the server.
java.sql.SQLException
public DerbyVersion getDriverVersion() throws java.sql.SQLException
Get the version of the client.
java.sql.SQLException
public static Version getServerVMVersion()
Get the vm level of the server.
public Version getClientVMVersion()
Get the vm level of the client.
public boolean serverSupportsUDTs() throws java.sql.SQLException
Report whether the server supports ANSI UDTs.
java.sql.SQLException
public static boolean serverSupportsUDTs(java.sql.Connection con) throws java.sql.SQLException
java.sql.SQLException
public static java.lang.String getVMVersion()
Get the vm level of the server.
public void compareObjects(java.lang.String message, java.lang.Object left, java.lang.Object right) throws java.sql.SQLException
Assert two objects are equal, allowing nulls to be equal.
java.sql.SQLException
public void compareBytes(java.lang.String message, java.lang.Object left, java.lang.Object right)
Assert two byte arrays are equal, allowing nulls to be equal.
public void compareDates(java.lang.String message, java.lang.Object left, java.lang.Object right)
Assert two Dates are equal, allowing nulls to be equal.
protected java.lang.Object getColumn(java.sql.ResultSet rs, java.lang.String columnName, int jdbcType) throws java.sql.SQLException
java.sql.SQLException
protected void setParameter(java.sql.PreparedStatement ps, int param, int jdbcType, java.lang.Object value) throws java.sql.SQLException
Stuff a PreparedStatement parameter given its 1-based parameter position and expected jdbc type. This method is useful for testing the setXXX() methods most natural for a declared SQL type.
java.sql.SQLException
protected void dropFunction(java.lang.String name)
Drop a function regardless of whether it exists. If the function does not exist, don't log an error unless running in debug mode. This method is to be used for reinitializing a schema in case a previous test run failed to clean up after itself. Do not use this method if you need to verify that the function really exists.
protected void dropProcedure(java.lang.String name)
Drop a procedure regardless of whether it exists. If the procedure does not exist, don't log an error unless running in debug mode. This method is to be used for reinitializing a schema in case a previous test run failed to clean up after itself. Do not use this method if you need to verify that the procedure really exists.
protected void dropUDT(java.lang.String name)
Drop a UDT regardless of whether it exists. If the UDT does not exist, don't log an error unless running in debug mode. This method is to be used for reinitializing a schema in case a previous test run failed to clean up after itself. Do not use this method if you need to verify that the UDT really exists.
protected void dropSchemaObject(java.lang.String genus, java.lang.String objectName, boolean restrict)
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.