public class SequenceTest extends GeneratedColumnsHelper
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
ALPHA |
private static java.lang.String |
BETA |
private static java.lang.String[] |
LEGAL_USERS |
private static java.lang.String |
TEST_DBO |
BAD_BEFORE_TRIGGER, BAD_CAST, BAD_FOREIGN_KEY_ACTION, CANT_ADD_IDENTITY, CANT_CONTAIN_NULLS, CANT_MODIFY_IDENTITY, CANT_OVERRIDE_GENERATION_CLAUSE, CANT_REFERENCE_GENERATED_COLUMN, CASCADED_COLUMN_DROP_WARNING, COLUMN_OUT_OF_SCOPE, CONSTRAINT_DROPPED_WARNING, CONSTRAINT_VIOLATION, DUPLICATE_CLAUSE, FORBIDDEN_DROP_TRIGGER, FORBIDDEN_ORDERING_OPERATION, FOREIGN_KEY_VIOLATION, GRANT_REVOKE_NOT_ALLOWED, ILLEGAL_ADD_DEFAULT, ILLEGAL_AGG, ILLEGAL_AGGREGATE, ILLEGAL_COMPARISON, ILLEGAL_DUPLICATE, ILLEGAL_RENAME, ILLEGAL_STORAGE, ILLEGAL_UDT_CLASS, JAVA_EXCEPTION, LACK_COLUMN_PRIV, LACK_EXECUTE_PRIV, LACK_TABLE_PRIV, LACK_USAGE_PRIV, LANG_INVALID_USE_OF_DEFAULT, LOCK_TIMEOUT, MISSING_OBJECT, NEED_EXPLICIT_DATATYPE, NON_EMPTY_SCHEMA, NONEXISTENT_OBJECT, NOT_NULL_NEEDS_DATATYPE, NOT_NULL_VIOLATION, OBJECT_DOES_NOT_EXIST, OPERATION_FORBIDDEN, REDUNDANT_CLAUSE, ROUTINE_CANT_ISSUE_SQL, ROUTINE_DEPENDS_ON_TYPE, STRING_TRUNCATION, SYNTAX_ERROR, TABLE_DEPENDS_ON_TYPE, TOO_MUCH_CONTENTION, TRIGGER_DROPPED_WARNING, UNSTABLE_RESULTS, VIEW_DEPENDENCYDEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE| Constructor and Description |
|---|
SequenceTest(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
private void |
goodSequence(java.sql.Connection conn,
java.lang.String sequenceName,
java.lang.String clauses,
java.lang.String datatype,
long initialValue,
long minValue,
long maxValue,
long stepValue,
boolean cycle) |
static junit.framework.Test |
suite()
Construct top level suite in this JUnit test
|
void |
test_01_CreateSequence() |
void |
test_02_DropSequence() |
void |
test_03_DuplicateCreationFailure() |
void |
test_04_ImplicitSchemaCreation() |
void |
test_05CreateWithSchemaSpecified() |
void |
test_06_CreateWithSchemaSpecifiedCreateTrue() |
void |
test_07_CreateWithSchemaDropWithNoSchema() |
void |
test_08_DropOtherSchemaSequence()
Test trying to drop a sequence in a schema that doesn't belong to one
|
void |
test_09_CreateOtherSchemaSequence()
Test trying to create a sequence in a schema that doesn't belong to one
|
void |
test_09a_createSequenceWithArguments() |
void |
test_10_NextValue()
initial test for next value
|
void |
test_11_forbiddenContexts()
Verify that sequences can't be used in many contexts.
|
void |
test_12_clauseOrder()
Verify that optional clauses can appear in any order and redundant clauses
are forbidden.
|
void |
test_13_restrictedDrop()
Verify that restricted drops prevent objects from being orphaned.
|
void |
test_14_insertSelect()
Verify that you can use sequences in insert statements driven
by selects.
|
void |
test_15_5254()
Verify that the new sequence-related keywords are non-reserved keywords.
|
void |
test_16_6137()
Verify that trigger recompilation doesn't choke trying to create
two nested writable transactions.
|
assertColumnTypes, assertDeterministic, assertResults, assertResults, chattyPrepare, chattyPrepareCall, executeQuery, expectCompilationError, expectCompilationError, expectExecutionError, expectExecutionWarning, expectExecutionWarnings, expectInsertRowError, expectUpdateRowError, fill, goodStatement, verifyRestrictedDrop, verifyRevokePrivilegeassertCallError, 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, tearDown, 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, setUp, toStringprivate static final java.lang.String TEST_DBO
private static final java.lang.String ALPHA
private static final java.lang.String BETA
private static final java.lang.String[] LEGAL_USERS
public static junit.framework.Test suite()
public void test_01_CreateSequence()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void test_02_DropSequence()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void test_03_DuplicateCreationFailure()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void test_04_ImplicitSchemaCreation()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void test_05CreateWithSchemaSpecified()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void test_06_CreateWithSchemaSpecifiedCreateTrue()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void test_07_CreateWithSchemaDropWithNoSchema()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void test_08_DropOtherSchemaSequence()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void test_09_CreateOtherSchemaSequence()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void test_09a_createSequenceWithArguments()
throws java.lang.Exception
java.lang.Exceptionpublic void test_10_NextValue()
throws java.sql.SQLException
java.sql.SQLException - on errorpublic void test_11_forbiddenContexts()
throws java.lang.Exception
java.lang.Exceptionpublic void test_12_clauseOrder()
throws java.lang.Exception
java.lang.Exceptionprivate void goodSequence(java.sql.Connection conn,
java.lang.String sequenceName,
java.lang.String clauses,
java.lang.String datatype,
long initialValue,
long minValue,
long maxValue,
long stepValue,
boolean cycle)
throws java.lang.Exception
java.lang.Exceptionpublic void test_13_restrictedDrop()
throws java.lang.Exception
java.lang.Exceptionpublic void test_14_insertSelect()
throws java.lang.Exception
java.lang.Exceptionpublic void test_15_5254()
throws java.lang.Exception
java.lang.Exceptionpublic void test_16_6137()
throws java.lang.Exception
java.lang.ExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.