Tag: cws_src680_dba22b User: fs Date: 2006/12/13 03:02:54 Modified: dba/dbaccess/qa/complex/dbaccess/QueryInQuery.java
Log: #i69460# test case for SDB-level statements supporting QiQ File Changes: Directory: /dba/dbaccess/qa/complex/dbaccess/ ============================================= File [changed]: QueryInQuery.java Url: http://dba.openoffice.org/source/browse/dba/dbaccess/qa/complex/dbaccess/QueryInQuery.java?r1=1.2&r2=1.2.98.1 Delta lines: +21 -3 -------------------- --- QueryInQuery.java 10 Jul 2006 14:59:08 -0000 1.2 +++ QueryInQuery.java 13 Dec 2006 11:02:51 -0000 1.2.98.1 @@ -4,9 +4,9 @@ * * $RCSfile: QueryInQuery.java,v $ * - * $Revision: 1.2 $ + * $Revision: 1.2.98.1 $ * - * last change: $Author: obo $ $Date: 2006/07/10 14:59:08 $ + * last change: $Author: fs $ $Date: 2006/12/13 11:02:51 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -45,6 +45,8 @@ import connectivity.tools.HsqlColumnDescriptor; import connectivity.tools.HsqlTableDescriptor; import connectivity.tools.RowSet; +import com.sun.star.sdbc.XStatement; +import com.sun.star.sdbc.XResultSet; public class QueryInQuery extends complexlib.ComplexTestCase { @@ -58,7 +60,8 @@ "executeSimpleSelect", "executeAliasedSelect", "checkNameCollisions", - "checkCyclicReferences" + "checkCyclicReferences", + "checkStatementQiQSupport" }; } @@ -192,6 +195,7 @@ caughtExpected ); } + // -------------------------------------------------------------------------------------------------------- public void checkCyclicReferences() throws ElementExistException, WrappedTargetException, IllegalArgumentException { // some queries which create a cycle in the sub query tree @@ -207,5 +211,19 @@ catch ( SQLException e ) { caughtExpected = e.SQLState.equals( "OB001" ); } assure( "executing a query with cyclic nested sub queries should fail!", caughtExpected ); + } + + // -------------------------------------------------------------------------------------------------------- + public void checkStatementQiQSupport() + { + try + { + XStatement statement = m_database.getConnection().createStatement(); + XResultSet resultSet = statement.executeQuery( "SELECT * FROM \"query products\"" ); + } + catch( SQLException e ) + { + assure( "SDB level statements do not allow for queries in queries", false ); + } } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
