org.hsqldb.test
Class TestSubselect
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.hsqldb.test.TestSubselect
-
- All Implemented Interfaces:
- junit.framework.Test
public class TestSubselect extends junit.framework.TestCaseTest cases for HSQL subselects.
-
-
Constructor Summary
Constructors Constructor and Description TestSubselect(java.lang.String s)Constructs a new SubselectTest.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidtestAliasScope()Inner select reusing alias names from outer select, but using them for different tablesvoidtestAndedSubselects()Tests two subselects, anded.voidtestHiddenCollision()Inner select with two tables having columns with the same name, one of which is referred to in the subselect, the other of which is not used in the query (both FRUITS and TREES have NAME column, but we're only selecting FRUITS.NAME and we're not referring to TREES.NAME at all).voidtestHiddenCollisionWithAliases()As above, with table aliases.voidtestNestedSubselects()Test nested subselects.voidtestNotIn()Inner select with "not in" in outer select where clause.voidtestNotInSameTableAndColumn()Inner select with "not in" in outer select where clause and same table in inner select where clause.voidtestSameTable()Inner select involving same tablevoidtestSameTableWithAliases()As above with aliases.voidtestSameTableWithJoin()Inner select involving same table as one of two joined tables in outer selectvoidtestSimpleJoin()This test is basically a sanity check of the data set.voidtestWhereClausesColliding()Inner select with where clause in outer select having column with same name as where clause in inner selectvoidtestWhereClausesCollidingWithAliases()As above, with table aliases.voidtestWhereSelectColliding()Inner select with where clause in outer select having column with same name as select clause in inner selectvoidtestWhereSelectCollidingWithAliases()As above, with aliases.-
Methods inherited from class junit.framework.TestCase
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, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, setName, toString
-
-
-
-
Constructor Detail
-
TestSubselect
public TestSubselect(java.lang.String s)
Constructs a new SubselectTest.
-
-
Method Detail
-
testSimpleJoin
public void testSimpleJoin() throws java.sql.SQLExceptionThis test is basically a sanity check of the data set.- Throws:
java.sql.SQLException
-
testWhereClausesColliding
public void testWhereClausesColliding() throws java.sql.SQLExceptionInner select with where clause in outer select having column with same name as where clause in inner select- Throws:
java.sql.SQLException
-
testWhereClausesCollidingWithAliases
public void testWhereClausesCollidingWithAliases() throws java.sql.SQLExceptionAs above, with table aliases.- Throws:
java.sql.SQLException
-
testHiddenCollision
public void testHiddenCollision() throws java.sql.SQLExceptionInner select with two tables having columns with the same name, one of which is referred to in the subselect, the other of which is not used in the query (both FRUITS and TREES have NAME column, but we're only selecting FRUITS.NAME and we're not referring to TREES.NAME at all).- Throws:
java.sql.SQLException
-
testHiddenCollisionWithAliases
public void testHiddenCollisionWithAliases() throws java.sql.SQLExceptionAs above, with table aliases.- Throws:
java.sql.SQLException
-
testWhereSelectColliding
public void testWhereSelectColliding() throws java.sql.SQLExceptionInner select with where clause in outer select having column with same name as select clause in inner select- Throws:
java.sql.SQLException
-
testWhereSelectCollidingWithAliases
public void testWhereSelectCollidingWithAliases() throws java.sql.SQLExceptionAs above, with aliases.- Throws:
java.sql.SQLException
-
testSameTable
public void testSameTable() throws java.sql.SQLExceptionInner select involving same table- Throws:
java.sql.SQLException
-
testSameTableWithAliases
public void testSameTableWithAliases() throws java.sql.SQLExceptionAs above with aliases.- Throws:
java.sql.SQLException
-
testSameTableWithJoin
public void testSameTableWithJoin() throws java.sql.SQLExceptionInner select involving same table as one of two joined tables in outer select- Throws:
java.sql.SQLException
-
testAndedSubselects
public void testAndedSubselects() throws java.sql.SQLExceptionTests two subselects, anded.- Throws:
java.sql.SQLException
-
testNestedSubselects
public void testNestedSubselects() throws java.sql.SQLExceptionTest nested subselects.- Throws:
java.sql.SQLException
-
testNotIn
public void testNotIn() throws java.sql.SQLExceptionInner select with "not in" in outer select where clause.- Throws:
java.sql.SQLException
-
testNotInSameTableAndColumn
public void testNotInSameTableAndColumn() throws java.sql.SQLExceptionInner select with "not in" in outer select where clause and same table in inner select where clause.- Throws:
java.sql.SQLException
-
testAliasScope
public void testAliasScope() throws java.sql.SQLExceptionInner select reusing alias names from outer select, but using them for different tables- Throws:
java.sql.SQLException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG