teiid SVN: r1932 - in trunk: connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/translator and 42 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-03-06 12:12:02 -0500 (Sat, 06 Mar 2010)
New Revision: 1932
Added:
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/BaseQueryTest.java
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/TestSQLConversionVisitor.java
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/TestTPCR.java
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/TestXMLTypeTranslations.java
trunk/connectors/connector-jdbc/src/test/resources/TPCR_3.vdb
trunk/connectors/connector-jdbc/src/test/resources/TPC_R.vdb
trunk/connectors/connector-jdbc/src/test/resources/test.vdb
trunk/engine/src/test/java/com/metamatrix/query/sql/lang/TestJDBCExecutionHelper.java
trunk/test-integration/common/src/test/resources/partssupplier/PartsSupplier.vdb
trunk/test-integration/db/resources/
trunk/test-integration/db/resources/3473/
trunk/test-integration/db/resources/3473/3473.properties
trunk/test-integration/db/resources/3473/test.vdb
trunk/test-integration/db/resources/3473/testGetCrossReference.expected
trunk/test-integration/db/resources/3473/testGetExportedKeys.expected
trunk/test-integration/db/resources/3473/testGetImportedKeys.expected
trunk/test-integration/db/resources/3473/testGetPrimaryKeys.expected
trunk/test-integration/db/resources/3473/testGetTables.expected
trunk/test-integration/db/resources/bqt/
trunk/test-integration/db/resources/bqt/bqt.properties
trunk/test-integration/db/resources/bqt/bqt.vdb
trunk/test-integration/db/resources/bqt/loopback.DEF
trunk/test-integration/db/resources/metadata/
trunk/test-integration/db/resources/metadata/ConfigurationInfo.def
trunk/test-integration/db/resources/metadata/TestExtensions.vdb
trunk/test-integration/db/resources/metadata/dqp.properties
trunk/test-integration/db/resources/partsupplier/
trunk/test-integration/db/resources/partsupplier/PartsSupplier.vdb
trunk/test-integration/db/resources/partsupplier/dqp.properties
trunk/test-integration/db/resources/partsupplier/expected/
trunk/test-integration/db/resources/partsupplier/expected/Catalogs.metadata.txt
trunk/test-integration/db/resources/partsupplier/expected/Catalogs.txt
trunk/test-integration/db/resources/partsupplier/expected/Columns.metadata.txt
trunk/test-integration/db/resources/partsupplier/expected/Columns.txt
trunk/test-integration/db/resources/partsupplier/expected/CrossReference.metadata.txt
trunk/test-integration/db/resources/partsupplier/expected/CrossReference.txt
trunk/test-integration/db/resources/partsupplier/expected/ExportedKeys.metadata.txt
trunk/test-integration/db/resources/partsupplier/expected/ExportedKeys.txt
trunk/test-integration/db/resources/partsupplier/expected/ImportedKeys.metadata.txt
trunk/test-integration/db/resources/partsupplier/expected/ImportedKeys.txt
trunk/test-integration/db/resources/partsupplier/expected/IndexInfo.metadata.txt
trunk/test-integration/db/resources/partsupplier/expected/IndexInfo.txt
trunk/test-integration/db/resources/partsupplier/expected/PrimaryKeys.metadata.txt
trunk/test-integration/db/resources/partsupplier/expected/PrimaryKeys.txt
trunk/test-integration/db/resources/partsupplier/expected/ProcedureColumns.metadata.txt
trunk/test-integration/db/resources/partsupplier/expected/ProcedureColumns.txt
trunk/test-integration/db/resources/partsupplier/expected/Procedures.metadata.txt
trunk/test-integration/db/resources/partsupplier/expected/Procedures.txt
trunk/test-integration/db/resources/partsupplier/expected/Schemas.metadata.txt
trunk/test-integration/db/resources/partsupplier/expected/Schemas.txt
trunk/test-integration/db/resources/partsupplier/expected/Tables.metadata.txt
trunk/test-integration/db/resources/partsupplier/expected/Tables.txt
trunk/test-integration/db/resources/partsupplier/expected/TypeInfo.metadata.txt
trunk/test-integration/db/resources/partsupplier/expected/TypeInfo.txt
trunk/test-integration/db/resources/partsupplier/expected/UDTs.metadata.txt
trunk/test-integration/db/resources/partsupplier/expected/UDTs.txt
trunk/test-integration/db/resources/vdbless/
trunk/test-integration/db/resources/vdbless/ConfigurationInfo.def
trunk/test-integration/db/resources/vdbless/TextData.txt
trunk/test-integration/db/resources/vdbless/TextDescriptor.txt
trunk/test-integration/db/resources/vdbless/dqp.properties
trunk/test-integration/db/resources/xml-vp/
trunk/test-integration/db/resources/xml-vp/xmlvp.DEF
trunk/test-integration/db/resources/xml-vp/xmlvp.properties
trunk/test-integration/db/resources/xml-vp/xmlvp_1.vdb
trunk/test-integration/db/src/test/java/com/
trunk/test-integration/db/src/test/java/com/metamatrix/
trunk/test-integration/db/src/test/java/com/metamatrix/jdbc/
trunk/test-integration/db/src/test/java/com/metamatrix/jdbc/TestCase3473.java
trunk/test-integration/db/src/test/java/com/metamatrix/jdbc/TestMMDatabaseMetaData.java
trunk/test-integration/db/src/test/java/org/teiid/connector/
trunk/test-integration/db/src/test/java/org/teiid/connector/metadata/
trunk/test-integration/db/src/test/java/org/teiid/connector/metadata/TestMetadataInConnector.java
trunk/test-integration/db/src/test/java/org/teiid/dynamicvdb/
trunk/test-integration/db/src/test/java/org/teiid/dynamicvdb/TestVDBLessExecution.java
trunk/test-integration/db/src/test/java/org/teiid/systemmodel/
trunk/test-integration/db/src/test/java/org/teiid/systemmodel/TestPartsDatabaseMetadata.java
trunk/test-integration/db/src/test/java/org/teiid/systemmodel/TestResultSetMetadata.java
trunk/test-integration/db/src/test/java/org/teiid/systemmodel/TestSystemVirtualModel.java
trunk/test-integration/db/src/test/java/org/teiid/systemmodel/TestVirtualDocWithVirtualProc.java
Removed:
trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/JDBCPropertyNames.java
trunk/test-integration/common/src/test/java/com/metamatrix/cdk/TestLoopbackConnector.java
trunk/test-integration/common/src/test/java/com/metamatrix/connector/jdbc/extension/TestSQLConversionVisitor.java
trunk/test-integration/common/src/test/java/com/metamatrix/connector/jdbc/util/TestJDBCExecutionHelper.java
trunk/test-integration/common/src/test/java/com/metamatrix/jdbc/TestCase3473.java
trunk/test-integration/common/src/test/java/com/metamatrix/jdbc/TestMMDatabaseMetaData.java
trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/BaseQueryTest.java
trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestDataEntitlements.java
trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestEmbeddedShutdown.java
trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestTPCR.java
trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestVDBLessExecution.java
trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestXMLTypeTranslations.java
trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestXQueryServices.java
trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestPartsDatabaseMetadata.java
trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestResultSetMetadata.java
trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestSystemVirtualModel.java
trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestVirtualDocWithVirtualProc.java
trunk/test-integration/common/src/test/java/org/teiid/connector/metadata/runtime/TestMetadataInConnector.java
trunk/test-integration/common/src/test/java/org/teiid/runtime/adminapi/
trunk/test-integration/common/src/test/resources/3473/3473.properties
trunk/test-integration/common/src/test/resources/3473/test.vdb
trunk/test-integration/common/src/test/resources/3473/testGetCrossReference.expected
trunk/test-integration/common/src/test/resources/3473/testGetExportedKeys.expected
trunk/test-integration/common/src/test/resources/3473/testGetImportedKeys.expected
trunk/test-integration/common/src/test/resources/3473/testGetPrimaryKeys.expected
trunk/test-integration/common/src/test/resources/3473/testGetTables.expected
trunk/test-integration/common/src/test/resources/bqt/bqt.properties
trunk/test-integration/common/src/test/resources/bqt/bqt.vdb
trunk/test-integration/common/src/test/resources/bqt/loopback.DEF
trunk/test-integration/common/src/test/resources/metadata/ConfigurationInfo.def
trunk/test-integration/common/src/test/resources/metadata/TestExtensions.vdb
trunk/test-integration/common/src/test/resources/metadata/dqp.properties
trunk/test-integration/common/src/test/resources/partssupplier/PartsSupplier.vdb
trunk/test-integration/common/src/test/resources/partssupplier/dqp.properties
trunk/test-integration/common/src/test/resources/partssupplier/expected/Catalogs.metadata.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/Catalogs.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/Columns.metadata.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/Columns.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/CrossReference.metadata.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/CrossReference.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/ExportedKeys.metadata.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/ExportedKeys.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/ImportedKeys.metadata.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/ImportedKeys.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/IndexInfo.metadata.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/IndexInfo.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/PrimaryKeys.metadata.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/PrimaryKeys.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/ProcedureColumns.metadata.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/ProcedureColumns.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/Procedures.metadata.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/Procedures.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/Schemas.metadata.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/Schemas.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/Tables.metadata.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/Tables.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/TypeInfo.metadata.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/TypeInfo.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/UDTs.metadata.txt
trunk/test-integration/common/src/test/resources/partssupplier/expected/UDTs.txt
trunk/test-integration/common/src/test/resources/tpcr/
trunk/test-integration/common/src/test/resources/vdbless/ConfigurationInfo.def
trunk/test-integration/common/src/test/resources/vdbless/TextData.txt
trunk/test-integration/common/src/test/resources/vdbless/TextDescriptor.txt
trunk/test-integration/common/src/test/resources/vdbless/dqp.properties
trunk/test-integration/common/src/test/resources/xml-vp/xmlvp.DEF
trunk/test-integration/common/src/test/resources/xml-vp/xmlvp.properties
trunk/test-integration/common/src/test/resources/xml-vp/xmlvp_1.vdb
trunk/test-integration/common/src/test/resources/xmltypes/
Modified:
trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/translator/Translator.java
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/oracle/TestOracleTranslator.java
trunk/engine/src/test/java/com/metamatrix/common/queue/TestStatsCapturingWorkManager.java
trunk/test-integration/db/.classpath
trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/DataSourceConnection.java
trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/DriverConnection.java
trunk/test-integration/pom.xml
Log:
TEIID-833: moving the tests written using the embedded to "integration-db" project.
Deleted: trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/JDBCPropertyNames.java
===================================================================
--- trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/JDBCPropertyNames.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/JDBCPropertyNames.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,93 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package org.teiid.connector.jdbc;
-
-public class JDBCPropertyNames {
- public static final String CONNECTION_SOURCE_CLASS = "ConnectionSource"; //$NON-NLS-1$
- public static final String URL = "URL"; //$NON-NLS-1$
- public static final String USERNAME = "User"; //$NON-NLS-1$
- public static final String PASSWORD = "Password"; //$NON-NLS-1$
-
- /**
- * This is the property name of the ConnectorService property that defines
- * whether or not String type values in Criteria statements in SQL queries to
- * the data source should have spaces trimmed from them.
- */
- public static final String TRIM_STRINGS = "TrimStrings"; //$NON-NLS-1$
-
- /**
- * This is the property name used to set the transaction isolation level on
- * a connector's data source. The value string must be the the same as one of the
- * names of the values of the transaction isolation levels defined in
- * <code>java.sql.Connection</code>.
- * @see java.sql.Connection#setTransactionIsolation(int)
- */
- public static final String TRANSACTION_ISOLATION_LEVEL = "TransactionIsolationLevel"; //$NON-NLS-1$
-
- /**
- * This is the property name of the ConnectorService property that defines
- * the time zone of the source database. This property should only be used in
- * cases where the source database is in a different time zone than the
- * ConnectorService VM and the database/driver is not already handling
- * time zones correctly.
- */
- public static final String DATABASE_TIME_ZONE = "DatabaseTimeZone"; //$NON-NLS-1$
-
- //***** Extension properties *****//
- /**
- * This property is used to specify the implementation of
- * com.metamatrix.data.ConnectorCapabilities.
- */
- public static final String EXT_CAPABILITY_CLASS= "ExtensionCapabilityClass"; //$NON-NLS-1$
-
- /**
- * This property is used to specify the implementation of
- * com.metamatrix.connector.jdbc.extension.Translator
- */
- public static final String EXT_TRANSLATOR_CLASS= "ExtensionTranslationClass"; //$NON-NLS-1$
-
- /**
- * This property can be used to specify the fetch size used from the connector to
- * its underlying source.
- */
- public static final String FETCH_SIZE = "FetchSize"; //$NON-NLS-1$
-
- /**
- * This property can be used to indicate that prepared statements should be used.
- * This means Literals will be substituted for
- * bind variables.
- * @since 5.0.1
- */
- public static final String USE_BIND_VARIABLES = "UseBindVariables"; //$NON-NLS-1$
-
- /**
- * This property is used to turn on/off the use of the default comments like
- * connection id and requestid in the source SQL query.
- */
- public static final String USE_COMMENTS_SOURCE_QUERY= "UseCommentsInSourceQuery"; //$NON-NLS-1$
-
- public static final String CONNECTION_TEST_QUERY = "ConnectionTestQuery"; //$NON-NLS-1$
-
- public static final String IS_VALID_TIMEOUT = "IsValidTimeout"; //$NON-NLS-1$
-
-}
Modified: trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/translator/Translator.java
===================================================================
--- trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/translator/Translator.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/connectors/connector-jdbc/src/main/java/org/teiid/connector/jdbc/translator/Translator.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -50,16 +50,15 @@
import org.teiid.connector.jdbc.JDBCCapabilities;
import org.teiid.connector.jdbc.JDBCManagedConnectionFactory;
import org.teiid.connector.jdbc.JDBCPlugin;
-import org.teiid.connector.jdbc.JDBCPropertyNames;
-import org.teiid.connector.language.Command;
+import org.teiid.connector.language.Argument;
import org.teiid.connector.language.ColumnReference;
+import org.teiid.connector.language.Command;
import org.teiid.connector.language.Expression;
import org.teiid.connector.language.Function;
import org.teiid.connector.language.LanguageFactory;
import org.teiid.connector.language.LanguageObject;
import org.teiid.connector.language.Limit;
import org.teiid.connector.language.Literal;
-import org.teiid.connector.language.Argument;
import org.teiid.connector.language.SetQuery;
import org.teiid.connector.language.Argument.Direction;
Copied: trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/BaseQueryTest.java (from rev 1930, trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/BaseQueryTest.java)
===================================================================
--- trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/BaseQueryTest.java (rev 0)
+++ trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/BaseQueryTest.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.connector.jdbc.extension;
+
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.teiid.metadata.index.VDBMetadataFactory;
+
+import com.metamatrix.query.analysis.AnalysisRecord;
+import com.metamatrix.query.metadata.QueryMetadataInterface;
+import com.metamatrix.query.optimizer.QueryOptimizer;
+import com.metamatrix.query.optimizer.TestOptimizer;
+import com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder;
+import com.metamatrix.query.processor.ProcessorDataManager;
+import com.metamatrix.query.processor.ProcessorPlan;
+import com.metamatrix.query.processor.TestProcessor;
+import com.metamatrix.query.sql.lang.Command;
+import com.metamatrix.query.util.CommandContext;
+
+
+/**
+ * @since 4.2
+ */
+public abstract class BaseQueryTest extends TestCase {
+
+ public BaseQueryTest(String name) {
+ super(name);
+ }
+
+ public static QueryMetadataInterface createMetadata(String vdbFile) {
+ return VDBMetadataFactory.getVDBMetadata(vdbFile);
+ }
+
+ protected void doProcess(QueryMetadataInterface metadata, String sql, CapabilitiesFinder capFinder, ProcessorDataManager dataManager, List[] expectedResults, boolean debug) throws Exception {
+ CommandContext context = createCommandContext();
+ context.setProcessDebug(debug);
+ Command command = TestOptimizer.helpGetCommand(sql, metadata, null);
+
+ // plan
+ AnalysisRecord analysisRecord = new AnalysisRecord(false, debug, debug);
+ ProcessorPlan plan = null;
+ try {
+ plan = QueryOptimizer.optimizePlan(command, metadata, null, capFinder, analysisRecord, createCommandContext());
+ } finally {
+ if(debug) {
+ System.out.println(analysisRecord.getDebugLog());
+ }
+ }
+
+ TestProcessor.doProcess(plan, dataManager, expectedResults, context);
+ }
+
+ protected CommandContext createCommandContext() {
+ CommandContext context = new CommandContext("0", "test", "user", "myvdb", 1); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ return context;
+ }
+
+}
Added: trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/TestSQLConversionVisitor.java
===================================================================
--- trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/TestSQLConversionVisitor.java (rev 0)
+++ trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/TestSQLConversionVisitor.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,451 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.connector.jdbc.extension;
+
+import static org.junit.Assert.*;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.teiid.connector.api.ConnectorException;
+import org.teiid.connector.api.ExecutionContext;
+import org.teiid.connector.jdbc.JDBCManagedConnectionFactory;
+import org.teiid.connector.jdbc.TranslationHelper;
+import org.teiid.connector.jdbc.translator.SQLConversionVisitor;
+import org.teiid.connector.jdbc.translator.Translator;
+import org.teiid.connector.language.LanguageObject;
+import org.teiid.connector.metadata.runtime.RuntimeMetadata;
+import org.teiid.dqp.internal.datamgr.impl.ExecutionContextImpl;
+import org.teiid.dqp.internal.datamgr.language.TestDeleteImpl;
+import org.teiid.dqp.internal.datamgr.language.TestInsertImpl;
+import org.teiid.dqp.internal.datamgr.language.TestProcedureImpl;
+import org.teiid.dqp.internal.datamgr.language.TestQueryImpl;
+import org.teiid.dqp.internal.datamgr.language.TestUpdateImpl;
+import org.teiid.dqp.internal.datamgr.language.TstLanguageBridgeFactory;
+
+/**
+ */
+public class TestSQLConversionVisitor {
+
+ public static final ExecutionContext context = new ExecutionContextImpl("VDB", //$NON-NLS-1$
+ 1,
+ "Payload", //$NON-NLS-1$
+ "ConnectionID", //$NON-NLS-1$
+ "Connector", //$NON-NLS-1$
+ "RequestID", //$NON-NLS-1$
+ "PartID", //$NON-NLS-1$
+ "ExecCount"); //$NON-NLS-1$
+
+ private static Translator TRANSLATOR;
+
+ @BeforeClass public static void oneTimeSetup() throws ConnectorException {
+ TRANSLATOR = new Translator();
+ JDBCManagedConnectionFactory env = new JDBCManagedConnectionFactory();
+ env.setTrimStrings(true);
+ TRANSLATOR.initialize(env);
+ }
+
+ public String getTestVDB() {
+ return TranslationHelper.PARTS_VDB;
+ }
+
+ public void helpTestVisitor(String vdb, String input, String expectedOutput) {
+ helpTestVisitor(vdb, input, expectedOutput, false);
+ }
+
+ public void helpTestVisitor(String vdb, String input, String expectedOutput, boolean usePreparedStatement) {
+ Translator trans = new Translator();
+ JDBCManagedConnectionFactory env = new JDBCManagedConnectionFactory();
+ if (usePreparedStatement) {
+ env.setUseBindVariables(true);
+ }
+ try {
+ trans.initialize(env);
+ TranslationHelper.helpTestVisitor(vdb, input, expectedOutput, trans);
+ } catch (ConnectorException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public static final RuntimeMetadata metadata = TstLanguageBridgeFactory.metadataFactory;
+
+ private String getStringWithContext(LanguageObject obj) throws ConnectorException {
+ JDBCManagedConnectionFactory env = new JDBCManagedConnectionFactory();
+ env.setUseCommentsInSourceQuery(true);
+ Translator trans = new Translator();
+ trans.initialize(env);
+ SQLConversionVisitor visitor = trans.getSQLConversionVisitor();
+ visitor.setExecutionContext(context);
+ visitor.append(obj);
+ return visitor.toString();
+ }
+
+ @Test public void testSimple() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name from parts", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS"); //$NON-NLS-1$
+ }
+
+ @Test public void testAliasInSelect() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name as x from parts", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME AS x FROM PARTS"); //$NON-NLS-1$
+ }
+
+ @Test public void testAliasedGroup() {
+ helpTestVisitor(getTestVDB(),
+ "select y.part_name from parts y", //$NON-NLS-1$
+ "SELECT y.PART_NAME FROM PARTS AS y"); //$NON-NLS-1$
+ }
+
+ @Test public void testAliasedGroupAndElement() {
+ helpTestVisitor(getTestVDB(),
+ "select y.part_name AS z from parts y", //$NON-NLS-1$
+ "SELECT y.PART_NAME AS z FROM PARTS AS y"); //$NON-NLS-1$
+ }
+
+ @Test public void testLiteralString() {
+ helpTestVisitor(getTestVDB(),
+ "select 'x' from parts", //$NON-NLS-1$
+ "SELECT 'x' FROM PARTS"); //$NON-NLS-1$
+ }
+
+ @Test public void testLiteralInteger() {
+ helpTestVisitor(getTestVDB(),
+ "select 5 from parts", //$NON-NLS-1$
+ "SELECT 5 FROM PARTS"); //$NON-NLS-1$
+ }
+
+ @Test public void testLiteralFloat() {
+ helpTestVisitor(getTestVDB(),
+ "select 5.2 from parts", //$NON-NLS-1$
+ "SELECT 5.2 FROM PARTS"); //$NON-NLS-1$
+ }
+
+ @Test public void testLiteralLowFloat() {
+ helpTestVisitor(getTestVDB(),
+ "select 0.012 from parts", //$NON-NLS-1$
+ "SELECT 0.012 FROM PARTS"); //$NON-NLS-1$
+ }
+
+ @Test public void testLiteralLowFloat2() {
+ helpTestVisitor(getTestVDB(),
+ "select 0.00012 from parts", //$NON-NLS-1$
+ "SELECT 0.00012 FROM PARTS"); //$NON-NLS-1$
+ }
+
+ @Test public void testLiteralHighFloat() {
+ helpTestVisitor(getTestVDB(),
+ "select 12345.123 from parts", //$NON-NLS-1$
+ "SELECT 12345.123 FROM PARTS"); //$NON-NLS-1$
+ }
+
+ @Test public void testLiteralHighFloat2() {
+ helpTestVisitor(getTestVDB(),
+ "select 1234567890.1234567 from parts", //$NON-NLS-1$
+ "SELECT 1234567890.1234567 FROM PARTS"); //$NON-NLS-1$
+ }
+
+ @Test public void testLiteralBoolean() {
+ helpTestVisitor(getTestVDB(),
+ "select {b'true'}, {b'false'} from parts", //$NON-NLS-1$
+ "SELECT 1, 0 FROM PARTS"); //$NON-NLS-1$
+ }
+
+ @Test public void testLiteralDate() {
+ helpTestVisitor(getTestVDB(),
+ "select {d '2003-12-31'} from parts", //$NON-NLS-1$
+ "SELECT {d '2003-12-31'} FROM PARTS"); //$NON-NLS-1$
+ }
+
+ @Test public void testLiteralTime() {
+ helpTestVisitor(getTestVDB(),
+ "select {t '23:59:59'} from parts", //$NON-NLS-1$
+ "SELECT {t '23:59:59'} FROM PARTS"); //$NON-NLS-1$
+ }
+
+ @Test public void testLiteralNull() {
+ helpTestVisitor(getTestVDB(),
+ "select null from parts", //$NON-NLS-1$
+ "SELECT NULL FROM PARTS"); //$NON-NLS-1$
+ }
+
+ @Test public void testLiteralTimestamp() {
+ helpTestVisitor(getTestVDB(),
+ "select {ts '2003-12-31 23:59:59.123'} from parts", //$NON-NLS-1$
+ "SELECT {ts '2003-12-31 23:59:59.123'} FROM PARTS"); //$NON-NLS-1$
+ }
+
+ @Test public void testSQL89Join() {
+ helpTestVisitor(getTestVDB(),
+ "select p.part_name from parts p, supplier_parts s where p.part_id = s.part_id", //$NON-NLS-1$
+ "SELECT p.PART_NAME FROM PARTS AS p, SUPPLIER_PARTS AS s WHERE p.PART_ID = s.PART_ID"); //$NON-NLS-1$
+ }
+
+ @Test public void testSQL92Join() {
+ helpTestVisitor(getTestVDB(),
+ "select p.part_name from parts p join supplier_parts s on p.part_id = s.part_id", //$NON-NLS-1$
+ "SELECT p.PART_NAME FROM PARTS AS p INNER JOIN SUPPLIER_PARTS AS s ON p.PART_ID = s.PART_ID"); //$NON-NLS-1$
+ }
+
+ @Test public void testSelfJoin() {
+ helpTestVisitor(getTestVDB(),
+ "select p.part_name from parts p join parts p2 on p.part_id = p2.part_id", //$NON-NLS-1$
+ "SELECT p.PART_NAME FROM PARTS AS p INNER JOIN PARTS AS p2 ON p.PART_ID = p2.PART_ID"); //$NON-NLS-1$
+ }
+
+ @Test public void testRightOuterJoin() {
+ helpTestVisitor(getTestVDB(),
+ "select p.part_name from parts p right join supplier_parts s on p.part_id = s.part_id", //$NON-NLS-1$
+ "SELECT p.PART_NAME FROM SUPPLIER_PARTS AS s LEFT OUTER JOIN PARTS AS p ON p.PART_ID = s.PART_ID"); //$NON-NLS-1$
+ }
+
+ @Test public void testLeftOuterJoin() {
+ helpTestVisitor(getTestVDB(),
+ "select p.part_name from parts p left join supplier_parts s on p.part_id = s.part_id", //$NON-NLS-1$
+ "SELECT p.PART_NAME FROM PARTS AS p LEFT OUTER JOIN SUPPLIER_PARTS AS s ON p.PART_ID = s.PART_ID"); //$NON-NLS-1$
+ }
+
+ @Test public void testFullOuterJoin() {
+ helpTestVisitor(getTestVDB(),
+ "select p.part_name from parts p full join supplier_parts s on p.part_id = s.part_id", //$NON-NLS-1$
+ "SELECT p.PART_NAME FROM PARTS AS p FULL OUTER JOIN SUPPLIER_PARTS AS s ON p.PART_ID = s.PART_ID"); //$NON-NLS-1$
+ }
+
+ @Test public void testCompare1() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name from parts where part_id = 'x'", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID = 'x'"); //$NON-NLS-1$
+ }
+
+ @Test public void testCompare2() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name from parts where part_id <> 'x'", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID <> 'x'"); //$NON-NLS-1$
+ }
+
+ @Test public void testCompare3() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name from parts where part_id < 'x'", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID < 'x'"); //$NON-NLS-1$
+ }
+
+ @Test public void testCompare4() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name from parts where part_id <= 'x'", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID <= 'x'"); //$NON-NLS-1$
+ }
+
+ @Test public void testCompare5() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name from parts where part_id > 'x'", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID > 'x'"); //$NON-NLS-1$
+ }
+
+ @Test public void testCompare6() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name from parts where part_id >= 'x'", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID >= 'x'"); //$NON-NLS-1$
+ }
+
+ @Test public void testIn1() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name from parts where part_id in ('x')", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID = 'x'"); //$NON-NLS-1$
+ }
+
+ @Test public void testIn2() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name from parts where part_id in ('x', 'y')", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID IN ('x', 'y')"); //$NON-NLS-1$
+ }
+
+ @Test public void testIn3() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name from parts where part_id not in ('x', 'y')", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID NOT IN ('x', 'y')"); //$NON-NLS-1$
+ }
+
+ @Test public void testIsNull1() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name from parts where part_id is null", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID IS NULL"); //$NON-NLS-1$
+ }
+
+ @Test public void testIsNull2() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name from parts where part_id is not null", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID IS NOT NULL"); //$NON-NLS-1$
+ }
+
+ @Test public void testInsertNull() {
+ helpTestVisitor(getTestVDB(),
+ "insert into parts (part_id, part_name, part_color, part_weight) values ('a', null, 'c', 'd')", //$NON-NLS-1$
+ "INSERT INTO PARTS (PART_ID, PART_NAME, PART_COLOR, PART_WEIGHT) VALUES ('a', NULL, 'c', 'd')"); //$NON-NLS-1$
+ }
+
+ @Test public void testUpdateNull() {
+ helpTestVisitor(getTestVDB(),
+ "update parts set part_weight = null where part_color = 'b'", //$NON-NLS-1$
+ "UPDATE PARTS SET PART_WEIGHT = NULL WHERE PARTS.PART_COLOR = 'b'"); //$NON-NLS-1$
+ }
+
+ @Test public void testUpdateWhereNull() {
+ helpTestVisitor(getTestVDB(),
+ "update parts set part_weight = 'a' where part_weight = null", //$NON-NLS-1$
+ "UPDATE PARTS SET PART_WEIGHT = 'a' WHERE NULL <> NULL"); //$NON-NLS-1$
+ }
+
+ @Test public void testPreparedStatementCreationWithUpdate() {
+ helpTestVisitor(getTestVDB(),
+ "update parts set part_weight = 'a' where part_weight < 5", //$NON-NLS-1$
+ "UPDATE PARTS SET PART_WEIGHT = ? WHERE PARTS.PART_WEIGHT < ?", //$NON-NLS-1$
+ true);
+ }
+
+ @Test public void testPreparedStatementCreationWithInsert() {
+ helpTestVisitor(getTestVDB(),
+ "insert into parts (part_weight) values (5)", //$NON-NLS-1$
+ "INSERT INTO PARTS (PART_WEIGHT) VALUES (?)", //$NON-NLS-1$
+ true);
+ }
+
+ @Test public void testPreparedStatementCreationWithSelect() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name from parts where part_id not in ('x', 'y') and part_weight < 6", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID NOT IN (?, ?) AND PARTS.PART_WEIGHT < ?", //$NON-NLS-1$
+ true);
+ }
+
+ @Test public void testPreparedStatementCreationWithLike() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name from parts where part_name like '%foo'", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_NAME LIKE ?", //$NON-NLS-1$
+ true);
+ }
+
+ /**
+ * ideally this should not happen, but to be on the safe side
+ * only the right side should get replaced
+ */
+ public void defer_testPreparedStatementCreationWithLeftConstant() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name from parts where 'x' = 'y'", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE 1 = ?", //$NON-NLS-1$
+ true);
+ }
+
+ /**
+ * In the future, functions can be made smarter about which of their literal arguments
+ * either are (or are not) eligible to be bind variables
+ */
+ @Test public void testPreparedStatementCreationWithFunction() {
+ helpTestVisitor(getTestVDB(),
+ "select part_name from parts where concat(part_name, 'x') = concat('y', part_weight)", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE concat(PARTS.PART_NAME, 'x') = concat('y', PARTS.PART_WEIGHT)", //$NON-NLS-1$
+ true);
+ }
+
+ @Test public void testPreparedStatementCreationWithCase() {
+ helpTestVisitor(getTestVDB(),
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_WEIGHT = CASE WHEN PARTS.PART_NAME='a' THEN 'b' ELSE 'c' END", //$NON-NLS-1$
+ "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_WEIGHT = CASE WHEN PARTS.PART_NAME = ? THEN 'b' ELSE 'c' END", //$NON-NLS-1$
+ true);
+ }
+
+ @Test public void testVisitIDeleteWithComment() throws Exception {
+ String expected = "DELETE /*teiid sessionid:ConnectionID, requestid:RequestID.PartID*/ FROM g1 WHERE (100 >= 200) AND (500 < 600)"; //$NON-NLS-1$
+ assertEquals(expected, getStringWithContext(TestDeleteImpl.example()));
+ }
+
+ @Test public void testVisitIInsertWithComment() throws Exception {
+ String expected = "INSERT /*teiid sessionid:ConnectionID, requestid:RequestID.PartID*/ INTO g1 (e1, e2, e3, e4) VALUES (1, 2, 3, 4)"; //$NON-NLS-1$
+ assertEquals(expected, getStringWithContext(TestInsertImpl.example("g1"))); //$NON-NLS-1$
+ }
+
+ @Test public void testVisitISelectWithComment() throws Exception {
+ String expected = "SELECT /*teiid sessionid:ConnectionID, requestid:RequestID.PartID*/ g1.e1, g1.e2, g1.e3, g1.e4"; //$NON-NLS-1$
+ assertEquals(expected, getStringWithContext(TestQueryImpl.example(false)));
+ expected = "SELECT /*teiid sessionid:ConnectionID, requestid:RequestID.PartID*/ DISTINCT g1.e1, g1.e2, g1.e3, g1.e4"; //$NON-NLS-1$
+ assertEquals(expected, getStringWithContext(TestQueryImpl.example(true)));
+ }
+
+ @Test public void testVisitIUpdateWithComment() throws Exception {
+ String expected = "UPDATE /*teiid sessionid:ConnectionID, requestid:RequestID.PartID*/ g1 SET e1 = 1, e2 = 1, e3 = 1, e4 = 1 WHERE 1 = 1"; //$NON-NLS-1$
+ assertEquals(expected, getStringWithContext(TestUpdateImpl.example()));
+ }
+
+ @Test public void testVisitIProcedureWithComment() throws Exception {
+ String expected = "{ /*teiid sessionid:ConnectionID, requestid:RequestID.PartID*/ call sq3(?,?)}"; //$NON-NLS-1$
+ assertEquals(expected, getStringWithContext(TestProcedureImpl.example()));
+ }
+
+ @Test public void testTrimStrings() throws Exception {
+ TranslationHelper.helpTestVisitor(TranslationHelper.BQT_VDB, "select stringkey from bqt1.smalla", "SELECT rtrim(SmallA.StringKey) FROM SmallA", TRANSLATOR); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test public void testNestedSetQuery() throws Exception {
+ String input = "select part_id id FROM parts UNION ALL (select part_name FROM parts UNION select part_id FROM parts)"; //$NON-NLS-1$
+ String output = "SELECT rtrim(PARTS.PART_ID) AS id FROM PARTS UNION ALL (SELECT PARTS.PART_NAME FROM PARTS UNION SELECT rtrim(PARTS.PART_ID) FROM PARTS)"; //$NON-NLS-1$
+
+ TranslationHelper.helpTestVisitor(TranslationHelper.PARTS_VDB,
+ input,
+ output, TRANSLATOR);
+ }
+
+ @Test public void testNestedSetQuery1() throws Exception {
+ String input = "select part_id id FROM parts UNION (select part_name FROM parts EXCEPT select part_id FROM parts)"; //$NON-NLS-1$
+ String output = "SELECT rtrim(PARTS.PART_ID) AS id FROM PARTS UNION (SELECT PARTS.PART_NAME FROM PARTS EXCEPT SELECT rtrim(PARTS.PART_ID) FROM PARTS)"; //$NON-NLS-1$
+
+ TranslationHelper.helpTestVisitor(TranslationHelper.PARTS_VDB,
+ input,
+ output, TRANSLATOR);
+ }
+
+ @Test public void testNestedSetQuery2() throws Exception {
+ String input = "select part_id id FROM parts UNION select part_name FROM parts EXCEPT select part_id FROM parts"; //$NON-NLS-1$
+ String output = "SELECT rtrim(PARTS.PART_ID) AS id FROM PARTS UNION SELECT PARTS.PART_NAME FROM PARTS EXCEPT SELECT rtrim(PARTS.PART_ID) FROM PARTS"; //$NON-NLS-1$
+
+ TranslationHelper.helpTestVisitor(TranslationHelper.PARTS_VDB,
+ input,
+ output, TRANSLATOR);
+ }
+
+ @Test public void testNestedSetQuery3() throws Exception {
+ String input = "select part_id id FROM parts UNION (select part_name FROM parts Union ALL select part_id FROM parts)"; //$NON-NLS-1$
+ String output = "SELECT rtrim(PARTS.PART_ID) AS id FROM PARTS UNION SELECT PARTS.PART_NAME FROM PARTS UNION SELECT rtrim(PARTS.PART_ID) FROM PARTS"; //$NON-NLS-1$
+
+ TranslationHelper.helpTestVisitor(TranslationHelper.PARTS_VDB,
+ input,
+ output, TRANSLATOR);
+ }
+
+ @Test public void testOrderByUnrelated() throws Exception {
+ String input = "select part_id id FROM parts order by part_name"; //$NON-NLS-1$
+ String output = "SELECT rtrim(PARTS.PART_ID) AS id FROM PARTS ORDER BY PARTS.PART_NAME"; //$NON-NLS-1$
+
+ TranslationHelper.helpTestVisitor(TranslationHelper.PARTS_VDB,
+ input,
+ output, TRANSLATOR);
+ }
+
+}
Property changes on: trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/TestSQLConversionVisitor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/TestTPCR.java (from rev 1930, trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestTPCR.java)
===================================================================
--- trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/TestTPCR.java (rev 0)
+++ trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/TestTPCR.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,209 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+package org.teiid.connector.jdbc.extension;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.List;
+
+import org.teiid.connector.jdbc.oracle.OracleCapabilities;
+import org.teiid.connector.jdbc.sqlserver.SqlServerCapabilities;
+import org.teiid.dqp.internal.datamgr.CapabilitiesConverter;
+
+import com.metamatrix.core.util.UnitTestUtil;
+import com.metamatrix.query.metadata.QueryMetadataInterface;
+import com.metamatrix.query.optimizer.TestOptimizer;
+import com.metamatrix.query.optimizer.TestOptimizer.ComparisonMode;
+import com.metamatrix.query.optimizer.capabilities.FakeCapabilitiesFinder;
+import com.metamatrix.query.processor.HardcodedDataManager;
+import com.metamatrix.query.processor.ProcessorPlan;
+import com.metamatrix.query.unittest.TimestampUtil;
+
+
+public class TestTPCR extends BaseQueryTest {
+
+ private static final boolean DEBUG = false;
+
+ private static final QueryMetadataInterface METADATA = createMetadata(UnitTestUtil.getTestDataPath()+"/TPC_R.vdb"); //$NON-NLS-1$
+
+ public TestTPCR(String name) {
+ super(name);
+ }
+
+ /**
+ * Will create a full push down query
+ */
+ public void testQuery3() throws Exception{
+ FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
+ finder.addCapabilities("TPCR_Oracle_9i", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
+
+ HardcodedDataManager dataMgr = new HardcodedDataManager();
+
+ List[] expected =
+ new List[] { Arrays.asList(new Object[] { new Double(2456423.0), new BigDecimal("406181.0111"), TimestampUtil.createDate(95, 2, 5), new Double(0.0) }), //$NON-NLS-1$
+ Arrays.asList(new Object[] { new Double(3459808.0), new BigDecimal("405838.6989"), TimestampUtil.createDate(95, 2, 4), new Double(0.0) }), //$NON-NLS-1$
+ Arrays.asList(new Object[] { new Double(492164.0), new BigDecimal("390324.0610"), TimestampUtil.createDate(95, 1, 19), new Double(0.0) }) }; //$NON-NLS-1$
+
+ dataMgr.addData("SELECT g_2.l_orderkey AS c_0, SUM((g_2.l_extendedprice * (1 - g_2.l_discount))) AS c_1, g_1.o_orderdate AS c_2, g_1.o_shippriority AS c_3 FROM TPCR_Oracle_9i.CUSTOMER AS g_0, TPCR_Oracle_9i.ORDERS AS g_1, TPCR_Oracle_9i.LINEITEM AS g_2 WHERE (g_0.c_custkey = g_1.o_custkey) AND (g_2.l_orderkey = g_1.o_orderkey) AND (g_0.c_mktsegment = 'BUILDING') AND (g_1.o_orderdate < {d'1995-03-15'}) AND (g_2.l_shipdate > {ts'1995-03-15 00:00:00.0'}) GROUP BY g_2.l_orderkey, g_1.o_orderdate, g_1.o_shippriority ORDER BY c_1 DESC, c_2", //$NON-NLS-1$
+ expected);
+
+ doProcess(METADATA,
+ "select l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority " + //$NON-NLS-1$
+ "from customer, orders, lineitem " + //$NON-NLS-1$
+ "where c_mktsegment = 'BUILDING' and c_custkey = o_custkey and l_orderkey = o_orderkey " + //$NON-NLS-1$
+ "and o_orderdate < {ts'1995-03-15 00:00:00'} " + //$NON-NLS-1$
+ "and l_shipdate > {ts'1995-03-15 00:00:00'} " + //$NON-NLS-1$
+ "group by l_orderkey, o_orderdate, o_shippriority " + //$NON-NLS-1$
+ "order by revenue desc, o_orderdate", //$NON-NLS-1$
+ finder, dataMgr, expected, DEBUG);
+
+ }
+
+ public void testQueryCase3042() throws Exception{
+ FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
+ finder.addCapabilities("TPCR_Ora", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
+
+ HardcodedDataManager dataMgr = new HardcodedDataManager();
+ List[] expected =
+ new List[] { Arrays.asList(new Object[] { new Integer(5) } ) };
+
+ dataMgr.addData("SELECT COUNT(*) FROM TPCR_Ora.CUSTOMER AS g_0 LEFT OUTER JOIN TPCR_Ora.ORDERS AS g_1 ON g_0.C_CUSTKEY = g_1.O_CUSTKEY WHERE (g_1.O_ORDERKEY IS NULL) OR ((g_1.O_ORDERDATE < {ts'1992-01-02 00:00:00.0'}) AND (g_0.C_ACCTBAL > 0))", //$NON-NLS-1$
+ expected);
+
+ doProcess(BaseQueryTest.createMetadata(UnitTestUtil.getTestDataPath()+"/TPCR_3.vdb"), //$NON-NLS-1$
+ "SELECT count (*) " + //$NON-NLS-1$
+ "FROM TPCR_Ora.CUSTOMER LEFT OUTER JOIN TPCR_Ora.ORDERS ON C_CUSTKEY = O_CUSTKEY " + //$NON-NLS-1$
+ "WHERE (O_ORDERKEY IS NULL) OR O_ORDERDATE < '1992-01-02 00:00:00' " + //$NON-NLS-1$
+ "AND C_ACCTBAL > 0", //$NON-NLS-1$
+ finder, dataMgr, expected, DEBUG);
+
+ }
+
+ /**
+ * Test of case 3047 - need a query planner optimization to recognize when join clause criteria
+ * could be migrated to WHERE clause of an atomic query, as long as the join is not being pushed
+ * down. In this case, there is a left outer join. The join criteria includes
+ * O_ORDERDATE < {ts'1992-01-02 00:00:00.0'} which is on the inner side of the outer join and
+ * thus cannot normally be moved to the WHERE clause. However, since the join is cross-data
+ * source, the join will be performed in MetaMatrix, and the above criteria could be moved to
+ * the WHERE clause of the atomic query, since that WHERE clause will effectively still be
+ * applied before the join is processed, and the results will be the same. This is what the
+ * user wants to happen.
+ * @throws Exception
+ */
+ public void testQueryCase3047() throws Exception{
+ FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
+ finder.addCapabilities("TPCR_Ora", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
+ finder.addCapabilities("TPCR_SQLS", CapabilitiesConverter.convertCapabilities(new SqlServerCapabilities())); //$NON-NLS-1$
+
+ HardcodedDataManager dataMgr = new HardcodedDataManager();
+
+ List[] oracleExpected =
+ new List[] { Arrays.asList(new Object[] { new Long(5), "Bill", "101 Fake St.", "392839283", "21.12" } ), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ Arrays.asList(new Object[] { new Long(6), "Stu", "102 Fake St.", "385729385", "51.50" } )}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+ dataMgr.addData("SELECT g_0.C_CUSTKEY AS c_0, g_0.C_NAME AS c_1, g_0.C_ADDRESS AS c_2, g_0.C_PHONE AS c_3, g_0.C_ACCTBAL AS c_4 FROM TPCR_Ora.CUSTOMER AS g_0 WHERE g_0.C_ACCTBAL > 50 ORDER BY c_0", //$NON-NLS-1$
+ oracleExpected);
+
+ List[] sqlServerExpected =
+ new List[] { Arrays.asList(new Object[] { new Integer(5), new Integer(12), new Long(5) } ),
+ Arrays.asList(new Object[] { new Integer(5), new Integer(13), new Long(5) } )};
+ dataMgr.addData("SELECT g_0.O_CUSTKEY AS c_0, g_0.O_ORDERKEY AS c_1, g_0.O_CUSTKEY AS c_2 FROM TPCR_SQLS.ORDERS AS g_0 WHERE g_0.O_ORDERDATE < {ts'1992-01-02 00:00:00.0'} ORDER BY c_2", //$NON-NLS-1$
+ sqlServerExpected);
+
+ List[] expected =
+ new List[] { Arrays.asList(new Object[] { new Long(5), "Bill", "101 Fake St.", "392839283", "21.12", new Integer(12) } ), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ Arrays.asList(new Object[] { new Long(5), "Bill", "101 Fake St.", "392839283", "21.12", new Integer(13) } ), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ Arrays.asList(new Object[] { new Long(6), "Stu", "102 Fake St.", "385729385", "51.50", null } )}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+ doProcess(BaseQueryTest.createMetadata(UnitTestUtil.getTestDataPath()+"/TPCR_3.vdb"), //$NON-NLS-1$
+ "SELECT C_CUSTKEY, C_NAME, C_ADDRESS, C_PHONE, C_ACCTBAL, O_ORDERKEY FROM TPCR_Ora.CUSTOMER " + //$NON-NLS-1$
+ "LEFT OUTER JOIN TPCR_SQLS.ORDERS ON C_CUSTKEY = O_CUSTKEY " + //$NON-NLS-1$
+ "AND O_ORDERDATE < {ts'1992-01-02 00:00:00.0'} " + //$NON-NLS-1$
+ "WHERE (C_ACCTBAL > 50)", //$NON-NLS-1$
+ finder, dataMgr, expected, DEBUG);
+
+ }
+
+ /**
+ * Confirm the workaround for case 3047 (using an inline view to get the desired piece
+ * of criteria pushed down)
+ * @throws Exception
+ * @since 4.3
+ */
+ public void testQueryCase3047workaround() throws Exception{
+ FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
+ finder.addCapabilities("TPCR_Ora", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
+ finder.addCapabilities("TPCR_SQLS", CapabilitiesConverter.convertCapabilities(new SqlServerCapabilities())); //$NON-NLS-1$
+
+ HardcodedDataManager dataMgr = new HardcodedDataManager();
+
+ List[] oracleExpected =
+ new List[] { Arrays.asList(new Object[] { new Long(5), "Bill", "101 Fake St.", "392839283", "51.12" } ), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ Arrays.asList(new Object[] { new Long(6), "Stu", "102 Fake St.", "385729385", "51.50" } )}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+ dataMgr.addData("SELECT g_0.C_CUSTKEY AS c_0, g_0.C_NAME AS c_1, g_0.C_ADDRESS AS c_2, g_0.C_PHONE AS c_3, g_0.C_ACCTBAL AS c_4 FROM TPCR_Ora.CUSTOMER AS g_0 WHERE g_0.C_ACCTBAL > 50 ORDER BY c_0", //$NON-NLS-1$
+ oracleExpected);
+
+ List[] sqlServerExpected =
+ new List[] { Arrays.asList(new Object[] { new Integer(5), new Integer(12), new Long(5) } ),
+ Arrays.asList(new Object[] { new Integer(5), new Integer(13), new Long(5) } )};
+ dataMgr.addData("SELECT g_0.O_CUSTKEY AS c_0, g_0.O_ORDERKEY AS c_1, g_0.O_CUSTKEY AS c_2 FROM TPCR_SQLS.ORDERS AS g_0 WHERE g_0.O_ORDERDATE < {ts'1992-01-02 00:00:00.0'} ORDER BY c_2", //$NON-NLS-1$
+ sqlServerExpected);
+
+ List[] expected =
+ new List[] { Arrays.asList(new Object[] { new Long(5), "Bill", "101 Fake St.", "392839283", "51.12", new Integer(12) } ), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ Arrays.asList(new Object[] { new Long(5), "Bill", "101 Fake St.", "392839283", "51.12", new Integer(13) } ), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ Arrays.asList(new Object[] { new Long(6), "Stu", "102 Fake St.", "385729385", "51.50", null } )}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+ doProcess(BaseQueryTest.createMetadata(UnitTestUtil.getTestDataPath()+"/TPCR_3.vdb"), //$NON-NLS-1$
+ "SELECT C_CUSTKEY, C_NAME, C_ADDRESS, C_PHONE, C_ACCTBAL, O_ORDERKEY FROM TPCR_Ora.CUSTOMER " + //$NON-NLS-1$
+ "LEFT OUTER JOIN " + //$NON-NLS-1$
+ "(SELECT O_CUSTKEY, O_ORDERKEY FROM TPCR_SQLS.ORDERS WHERE O_ORDERDATE < {ts'1992-01-02 00:00:00.0'}) AS X " + //$NON-NLS-1$
+ "ON C_CUSTKEY = O_CUSTKEY " + //$NON-NLS-1$
+ "WHERE (C_ACCTBAL > 50)", //$NON-NLS-1$
+ finder, dataMgr, expected, DEBUG);
+
+ }
+
+ public void testQuery22() throws Exception{
+ FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
+ finder.addCapabilities("TPCR_Oracle_9i", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
+
+ ProcessorPlan plan = TestOptimizer.helpPlan("SELECT custsale.cntrycode, COUNT(*) AS numcust, SUM(c_acctbal) AS totacctbal FROM (SELECT left(C_PHONE, 2) AS cntrycode, CUSTOMER.C_ACCTBAL FROM CUSTOMER WHERE (left(C_PHONE, 2) IN ('13','31','23','29','30','18','17')) AND (CUSTOMER.C_ACCTBAL > (SELECT AVG(CUSTOMER.C_ACCTBAL) FROM CUSTOMER WHERE (CUSTOMER.C_ACCTBAL > 0.0) AND (left(C_PHONE, 2) IN ('13','31','23','29','30','18','17')))) AND (NOT (EXISTS (SELECT * FROM ORDERS WHERE O_CUSTKEY = C_CUSTKEY)))) AS custsale GROUP BY custsale.cntrycode ORDER BY custsale.cntrycode", //$NON-NLS-1$
+ METADATA, null, finder,
+ new String[] {"SELECT v_0.c_0, COUNT(*) AS c_1, SUM(v_0.c_1) AS c_2 FROM (SELECT left(g_0.C_PHONE, 2) AS c_0, g_0.C_ACCTBAL AS c_1 FROM TPCR_Oracle_9i.CUSTOMER AS g_0 WHERE (left(g_0.C_PHONE, 2) IN ('13', '31', '23', '29', '30', '18', '17')) AND (g_0.C_ACCTBAL > (SELECT AVG(g_1.C_ACCTBAL) FROM TPCR_Oracle_9i.CUSTOMER AS g_1 WHERE (g_1.C_ACCTBAL > 0.0) AND (left(g_1.C_PHONE, 2) IN ('13', '31', '23', '29', '30', '18', '17')))) AND (NOT (EXISTS (SELECT g_2.O_ORDERKEY, g_2.O_CUSTKEY, g_2.O_ORDERSTATUS, g_2.O_TOTALPRICE, g_2.O_ORDERDATE, g_2.O_ORDERPRIORITY, g_2.O_CLERK, g_2.O_SHIPPRIORITY, g_2.O_COMMENT FROM TPCR_Oracle_9i.ORDERS AS g_2 WHERE g_2.O_CUSTKEY = g_0.C_CUSTKEY)))) AS v_0 GROUP BY v_0.c_0 ORDER BY c_0"}, true); //$NON-NLS-1$
+ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
+ TestOptimizer.checkSubPlanCount(plan, 0);
+ }
+
+ public void testDefect22475() throws Exception {
+ FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
+ finder.addCapabilities("TPCR_Oracle_9i", CapabilitiesConverter.convertCapabilities(new SqlServerCapabilities())); //$NON-NLS-1$
+
+ ProcessorPlan plan = TestOptimizer.helpPlan("select S_ACCTBAL, S_NAME, N_NAME, P_PARTKEY, P_MFGR, S_ADDRESS, S_PHONE, S_COMMENT from (SELECT SUPPLIER.S_ACCTBAL, SUPPLIER.S_NAME, NATION.N_NAME, PART.P_PARTKEY, PART.P_MFGR, SUPPLIER.S_ADDRESS, SUPPLIER.S_PHONE, SUPPLIER.S_COMMENT FROM PART, SUPPLIER, PARTSUPP, NATION, REGION WHERE (PART.P_PARTKEY = PS_PARTKEY) AND (S_SUPPKEY = PS_SUPPKEY) AND (P_SIZE = 15) AND (P_TYPE LIKE '%BRASS') AND (S_NATIONKEY = N_NATIONKEY) AND (N_REGIONKEY = R_REGIONKEY) AND (R_NAME = 'EUROPE') AND (PS_SUPPLYCOST = (SELECT MIN(PS_SUPPLYCOST) FROM PARTSUPP, SUPPLIER, NATION, REGION WHERE (PART.P_PARTKEY = PS_PARTKEY) AND (S_SUPPKEY = PS_SUPPKEY) AND (S_NATIONKEY = N_NATIONKEY) AND (N_REGIONKEY = R_REGIONKEY) AND (R_NAME = 'EUROPE'))) ORDER BY SUPPLIER.S_ACCTBAL DESC, NATION.N_NAME, SUPPLIER.S_NAME, PART.P_PARTKEY) as x", //$NON-NLS-1$
+ METADATA, null, finder,
+ new String[] {"SELECT g_1.S_ACCTBAL, g_1.S_NAME, g_3.N_NAME, g_0.P_PARTKEY, g_0.P_MFGR, g_1.S_ADDRESS, g_1.S_PHONE, g_1.S_COMMENT FROM TPCR_Oracle_9i.PART AS g_0, TPCR_Oracle_9i.SUPPLIER AS g_1, TPCR_Oracle_9i.PARTSUPP AS g_2, TPCR_Oracle_9i.NATION AS g_3, TPCR_Oracle_9i.REGION AS g_4 WHERE (g_3.N_REGIONKEY = g_4.R_REGIONKEY) AND (g_1.S_NATIONKEY = g_3.N_NATIONKEY) AND (g_1.S_SUPPKEY = g_2.PS_SUPPKEY) AND (g_0.P_PARTKEY = g_2.PS_PARTKEY) AND (g_2.PS_SUPPLYCOST = (SELECT MIN(g_5.PS_SUPPLYCOST) FROM TPCR_Oracle_9i.PARTSUPP AS g_5, TPCR_Oracle_9i.SUPPLIER AS g_6, TPCR_Oracle_9i.NATION AS g_7, TPCR_Oracle_9i.REGION AS g_8 WHERE (g_6.S_SUPPKEY = g_5.PS_SUPPKEY) AND (g_6.S_NATIONKEY = g_7.N_NATIONKEY) AND (g_7.N_REGIONKEY = g_8.R_REGIONKEY) AND (g_5.PS_PARTKEY = g_0.P_PARTKEY) AND (g_8.R_NAME = 'EUROPE'))) AND (g_0.P_SIZE = 15.0) AND (g_0.P_TYPE LIKE '%BRASS') AND (g_4.R_NAME = 'EUROPE')"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
+ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
+ }
+
+}
Copied: trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/TestXMLTypeTranslations.java (from rev 1930, trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestXMLTypeTranslations.java)
===================================================================
--- trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/TestXMLTypeTranslations.java (rev 0)
+++ trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/extension/TestXMLTypeTranslations.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.connector.jdbc.extension;
+
+import java.math.BigInteger;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.teiid.connector.jdbc.oracle.OracleCapabilities;
+import org.teiid.dqp.internal.datamgr.CapabilitiesConverter;
+
+import com.metamatrix.core.util.UnitTestUtil;
+import com.metamatrix.query.metadata.QueryMetadataInterface;
+import com.metamatrix.query.optimizer.capabilities.FakeCapabilitiesFinder;
+import com.metamatrix.query.processor.HardcodedDataManager;
+import com.metamatrix.query.unittest.TimestampUtil;
+
+public class TestXMLTypeTranslations extends BaseQueryTest {
+
+ private static final boolean DEBUG = false;
+
+ public TestXMLTypeTranslations(String name) {
+ super(name);
+ }
+
+ //NOTE that the gMonth and gDay values are invalid (but properly formatted)
+ public void testXSDTranslations() throws Exception {
+ FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
+ finder.addCapabilities("sample", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
+
+ QueryMetadataInterface metadata = createMetadata(UnitTestUtil.getTestDataPath()+"/test.vdb"); //$NON-NLS-1$
+
+ String sql = "select * from testdocument.testDocument"; //$NON-NLS-1$
+
+ HardcodedDataManager dataMgr = new HardcodedDataManager();
+
+ Set models = new HashSet();
+ models.add("sample"); //$NON-NLS-1$
+ dataMgr.setValidModels(models);
+
+ dataMgr.addData("SELECT g_0.\"timestamp\", g_0.\"double\", g_0.\"float\", convert(g_0.\"double\", biginteger), convert(g_0.\"double\", biginteger), convert(g_0.\"date\", timestamp), convert(g_0.\"double\", biginteger), convert(g_0.\"date\", timestamp), '1' FROM sample.RUNTIMEVALUE AS g_0", //$NON-NLS-1$
+
+ new List[] { Arrays.asList(new Object[] {
+ TimestampUtil.createTimestamp(3, 3, 4, 5, 6, 10, 200),
+ new Double(Double.NEGATIVE_INFINITY),
+ new Float(Float.POSITIVE_INFINITY),
+ new BigInteger("100"), //$NON-NLS-1$
+ new BigInteger("100"), //$NON-NLS-1$
+ TimestampUtil.createTimestamp(3, 3, 4, 5, 6, 7, 0),
+ new BigInteger("100"), //$NON-NLS-1$
+ TimestampUtil.createTimestamp(3, 3, 4, 5, 6, 7, 0),
+ "1" //$NON-NLS-1$
+ })});
+
+
+ List[] expected = new List[] { Arrays.asList(new Object[] {"<?xml version=\"1.0\" encoding=\"UTF-8\"?><XSDTypesNS:test xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:XSDTypesNS=\"http://www.metamatrix.com/XMLSchema/DataSets/XSDTypes\"><book><datetime>1903-04-04T05:06:10.0000002</datetime><double>-INF</double><float>INF</float><gday>---100</gday><gmonth>--100</gmonth><gmonthday>--04-04</gmonthday><gyear>0100</gyear><gyearmonth>1903-04</gyearmonth><string>1</string></book></XSDTypesNS:test>" })}; //$NON-NLS-1$
+ doProcess(metadata,
+ sql,
+ finder, dataMgr , expected, DEBUG);
+
+ }
+
+
+}
Modified: trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/oracle/TestOracleTranslator.java
===================================================================
--- trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/oracle/TestOracleTranslator.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/oracle/TestOracleTranslator.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -22,17 +22,15 @@
package org.teiid.connector.jdbc.oracle;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
import java.util.List;
-import java.util.Properties;
import org.junit.Before;
import org.junit.Test;
import org.teiid.connector.api.ConnectorException;
import org.teiid.connector.api.ExecutionContext;
import org.teiid.connector.jdbc.JDBCManagedConnectionFactory;
-import org.teiid.connector.jdbc.JDBCPropertyNames;
import org.teiid.connector.jdbc.TranslationHelper;
import org.teiid.connector.jdbc.translator.TranslatedCommand;
import org.teiid.connector.jdbc.translator.Translator;
@@ -523,11 +521,12 @@
private void helpTestVisitor(Command obj, ExecutionContext context, String dbmsTimeZone, String expectedOutput) throws ConnectorException {
OracleSQLTranslator translator = new OracleSQLTranslator();
- Properties p = new Properties();
+ JDBCManagedConnectionFactory f = new JDBCManagedConnectionFactory();
if (dbmsTimeZone != null) {
- p.setProperty(JDBCPropertyNames.DATABASE_TIME_ZONE, dbmsTimeZone);
+ f.setDatabaseTimeZone(dbmsTimeZone);
}
- translator.initialize(new JDBCManagedConnectionFactory());
+
+ translator.initialize(f);
// Convert back to SQL
TranslatedCommand tc = new TranslatedCommand(context, translator);
tc.translateCommand(obj);
Added: trunk/connectors/connector-jdbc/src/test/resources/TPCR_3.vdb
===================================================================
(Binary files differ)
Property changes on: trunk/connectors/connector-jdbc/src/test/resources/TPCR_3.vdb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/connectors/connector-jdbc/src/test/resources/TPC_R.vdb
===================================================================
(Binary files differ)
Property changes on: trunk/connectors/connector-jdbc/src/test/resources/TPC_R.vdb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/connectors/connector-jdbc/src/test/resources/test.vdb
===================================================================
(Binary files differ)
Property changes on: trunk/connectors/connector-jdbc/src/test/resources/test.vdb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/engine/src/test/java/com/metamatrix/common/queue/TestStatsCapturingWorkManager.java
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/common/queue/TestStatsCapturingWorkManager.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/engine/src/test/java/com/metamatrix/common/queue/TestStatsCapturingWorkManager.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -115,7 +115,7 @@
}
}, null, 5);
- Thread.sleep(10);
+ Thread.sleep(100);
pool.shutdown();
pool.awaitTermination(1000, TimeUnit.MILLISECONDS);
assertEquals(1, result.size());
Copied: trunk/engine/src/test/java/com/metamatrix/query/sql/lang/TestJDBCExecutionHelper.java (from rev 1930, trunk/test-integration/common/src/test/java/com/metamatrix/connector/jdbc/util/TestJDBCExecutionHelper.java)
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/query/sql/lang/TestJDBCExecutionHelper.java (rev 0)
+++ trunk/engine/src/test/java/com/metamatrix/query/sql/lang/TestJDBCExecutionHelper.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+/*
+ */
+package com.metamatrix.query.sql.lang;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.teiid.connector.language.DerivedColumn;
+import org.teiid.connector.language.Literal;
+import org.teiid.connector.language.Select;
+
+import com.metamatrix.common.types.DataTypeManager;
+
+public class TestJDBCExecutionHelper extends TestCase{
+
+ public TestJDBCExecutionHelper(String name) {
+ super(name);
+ }
+
+ //tests
+ public void testGetColumnDataTypes(){
+ Class[] expectedResults = new Class[2];
+ List symbols = new ArrayList();
+ symbols.add(new DerivedColumn("c1", new Literal("3", DataTypeManager.DefaultDataClasses.STRING))); //$NON-NLS-1$//$NON-NLS-2$
+ expectedResults[0] = DataTypeManager.DefaultDataClasses.STRING;
+ symbols.add(new DerivedColumn("c2", new Literal(new Integer(5), DataTypeManager.DefaultDataClasses.INTEGER))); //$NON-NLS-1$//$NON-NLS-2$
+ expectedResults[1] = DataTypeManager.DefaultDataClasses.INTEGER;
+ Select query = new Select(symbols, false, null, null, null, null, null);
+ Class[] results = query.getColumnTypes();
+ assertEquals( results[0], expectedResults[0]);
+ assertEquals( results[1], expectedResults[1]);
+ }
+
+}
Deleted: trunk/test-integration/common/src/test/java/com/metamatrix/cdk/TestLoopbackConnector.java
===================================================================
--- trunk/test-integration/common/src/test/java/com/metamatrix/cdk/TestLoopbackConnector.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/com/metamatrix/cdk/TestLoopbackConnector.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.cdk;
-
-import org.junit.Test;
-
-import com.metamatrix.core.util.UnitTestUtil;
-import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
-
-public class TestLoopbackConnector extends AbstractMMQueryTestCase {
-
- private static final String DQP_PROP_FILE = UnitTestUtil.getTestDataPath() + "/partssupplier/dqp.properties;user=test"; //$NON-NLS-1$
- private static final String VDB = "PartsSupplier"; //$NON-NLS-1$
-
- @Test public void test() {
- getConnection(VDB, DQP_PROP_FILE);
-
- executeAndAssertResults("select * from parts", new String[] { //$NON-NLS-1$
- "PART_ID[string] PART_NAME[string] PART_COLOR[string] PART_WEIGHT[string]", //$NON-NLS-1$
- "ABCDEFGHIJ ABCDEFGHIJ ABCDEFGHIJ ABCDEFGHIJ"//$NON-NLS-1$
- });
- closeConnection();
- }
-}
Deleted: trunk/test-integration/common/src/test/java/com/metamatrix/connector/jdbc/extension/TestSQLConversionVisitor.java
===================================================================
--- trunk/test-integration/common/src/test/java/com/metamatrix/connector/jdbc/extension/TestSQLConversionVisitor.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/com/metamatrix/connector/jdbc/extension/TestSQLConversionVisitor.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,451 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.connector.jdbc.extension;
-
-import static org.junit.Assert.*;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.teiid.connector.api.ConnectorException;
-import org.teiid.connector.api.ExecutionContext;
-import org.teiid.connector.jdbc.JDBCManagedConnectionFactory;
-import org.teiid.connector.jdbc.TranslationHelper;
-import org.teiid.connector.jdbc.translator.SQLConversionVisitor;
-import org.teiid.connector.jdbc.translator.Translator;
-import org.teiid.connector.language.LanguageObject;
-import org.teiid.connector.metadata.runtime.RuntimeMetadata;
-import org.teiid.dqp.internal.datamgr.impl.ExecutionContextImpl;
-import org.teiid.dqp.internal.datamgr.language.TestDeleteImpl;
-import org.teiid.dqp.internal.datamgr.language.TestInsertImpl;
-import org.teiid.dqp.internal.datamgr.language.TestProcedureImpl;
-import org.teiid.dqp.internal.datamgr.language.TestQueryImpl;
-import org.teiid.dqp.internal.datamgr.language.TestUpdateImpl;
-import org.teiid.dqp.internal.datamgr.language.TstLanguageBridgeFactory;
-
-/**
- */
-public class TestSQLConversionVisitor {
-
- public static final ExecutionContext context = new ExecutionContextImpl("VDB", //$NON-NLS-1$
- 1,
- "Payload", //$NON-NLS-1$
- "ConnectionID", //$NON-NLS-1$
- "Connector", //$NON-NLS-1$
- "RequestID", //$NON-NLS-1$
- "PartID", //$NON-NLS-1$
- "ExecCount"); //$NON-NLS-1$
-
- private static Translator TRANSLATOR;
-
- @BeforeClass public static void oneTimeSetup() throws ConnectorException {
- TRANSLATOR = new Translator();
- JDBCManagedConnectionFactory env = new JDBCManagedConnectionFactory();
- env.setTrimStrings(true);
- TRANSLATOR.initialize(env);
- }
-
- public String getTestVDB() {
- return TranslationHelper.PARTS_VDB;
- }
-
- public void helpTestVisitor(String vdb, String input, String expectedOutput) {
- helpTestVisitor(vdb, input, expectedOutput, false);
- }
-
- public void helpTestVisitor(String vdb, String input, String expectedOutput, boolean usePreparedStatement) {
- Translator trans = new Translator();
- JDBCManagedConnectionFactory env = new JDBCManagedConnectionFactory();
- if (usePreparedStatement) {
- env.setUseBindVariables(true);
- }
- try {
- trans.initialize(env);
- TranslationHelper.helpTestVisitor(vdb, input, expectedOutput, trans);
- } catch (ConnectorException e) {
- throw new RuntimeException(e);
- }
- }
-
- public static final RuntimeMetadata metadata = TstLanguageBridgeFactory.metadataFactory;
-
- private String getStringWithContext(LanguageObject obj) throws ConnectorException {
- JDBCManagedConnectionFactory env = new JDBCManagedConnectionFactory();
- env.setUseCommentsInSourceQuery(true);
- Translator trans = new Translator();
- trans.initialize(env);
- SQLConversionVisitor visitor = trans.getSQLConversionVisitor();
- visitor.setExecutionContext(context);
- visitor.append(obj);
- return visitor.toString();
- }
-
- @Test public void testSimple() {
- helpTestVisitor(getTestVDB(),
- "select part_name from parts", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS"); //$NON-NLS-1$
- }
-
- @Test public void testAliasInSelect() {
- helpTestVisitor(getTestVDB(),
- "select part_name as x from parts", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME AS x FROM PARTS"); //$NON-NLS-1$
- }
-
- @Test public void testAliasedGroup() {
- helpTestVisitor(getTestVDB(),
- "select y.part_name from parts y", //$NON-NLS-1$
- "SELECT y.PART_NAME FROM PARTS AS y"); //$NON-NLS-1$
- }
-
- @Test public void testAliasedGroupAndElement() {
- helpTestVisitor(getTestVDB(),
- "select y.part_name AS z from parts y", //$NON-NLS-1$
- "SELECT y.PART_NAME AS z FROM PARTS AS y"); //$NON-NLS-1$
- }
-
- @Test public void testLiteralString() {
- helpTestVisitor(getTestVDB(),
- "select 'x' from parts", //$NON-NLS-1$
- "SELECT 'x' FROM PARTS"); //$NON-NLS-1$
- }
-
- @Test public void testLiteralInteger() {
- helpTestVisitor(getTestVDB(),
- "select 5 from parts", //$NON-NLS-1$
- "SELECT 5 FROM PARTS"); //$NON-NLS-1$
- }
-
- @Test public void testLiteralFloat() {
- helpTestVisitor(getTestVDB(),
- "select 5.2 from parts", //$NON-NLS-1$
- "SELECT 5.2 FROM PARTS"); //$NON-NLS-1$
- }
-
- @Test public void testLiteralLowFloat() {
- helpTestVisitor(getTestVDB(),
- "select 0.012 from parts", //$NON-NLS-1$
- "SELECT 0.012 FROM PARTS"); //$NON-NLS-1$
- }
-
- @Test public void testLiteralLowFloat2() {
- helpTestVisitor(getTestVDB(),
- "select 0.00012 from parts", //$NON-NLS-1$
- "SELECT 0.00012 FROM PARTS"); //$NON-NLS-1$
- }
-
- @Test public void testLiteralHighFloat() {
- helpTestVisitor(getTestVDB(),
- "select 12345.123 from parts", //$NON-NLS-1$
- "SELECT 12345.123 FROM PARTS"); //$NON-NLS-1$
- }
-
- @Test public void testLiteralHighFloat2() {
- helpTestVisitor(getTestVDB(),
- "select 1234567890.1234567 from parts", //$NON-NLS-1$
- "SELECT 1234567890.1234567 FROM PARTS"); //$NON-NLS-1$
- }
-
- @Test public void testLiteralBoolean() {
- helpTestVisitor(getTestVDB(),
- "select {b'true'}, {b'false'} from parts", //$NON-NLS-1$
- "SELECT 1, 0 FROM PARTS"); //$NON-NLS-1$
- }
-
- @Test public void testLiteralDate() {
- helpTestVisitor(getTestVDB(),
- "select {d '2003-12-31'} from parts", //$NON-NLS-1$
- "SELECT {d '2003-12-31'} FROM PARTS"); //$NON-NLS-1$
- }
-
- @Test public void testLiteralTime() {
- helpTestVisitor(getTestVDB(),
- "select {t '23:59:59'} from parts", //$NON-NLS-1$
- "SELECT {t '23:59:59'} FROM PARTS"); //$NON-NLS-1$
- }
-
- @Test public void testLiteralNull() {
- helpTestVisitor(getTestVDB(),
- "select null from parts", //$NON-NLS-1$
- "SELECT NULL FROM PARTS"); //$NON-NLS-1$
- }
-
- @Test public void testLiteralTimestamp() {
- helpTestVisitor(getTestVDB(),
- "select {ts '2003-12-31 23:59:59.123'} from parts", //$NON-NLS-1$
- "SELECT {ts '2003-12-31 23:59:59.123'} FROM PARTS"); //$NON-NLS-1$
- }
-
- @Test public void testSQL89Join() {
- helpTestVisitor(getTestVDB(),
- "select p.part_name from parts p, supplier_parts s where p.part_id = s.part_id", //$NON-NLS-1$
- "SELECT p.PART_NAME FROM PARTS AS p, SUPPLIER_PARTS AS s WHERE p.PART_ID = s.PART_ID"); //$NON-NLS-1$
- }
-
- @Test public void testSQL92Join() {
- helpTestVisitor(getTestVDB(),
- "select p.part_name from parts p join supplier_parts s on p.part_id = s.part_id", //$NON-NLS-1$
- "SELECT p.PART_NAME FROM PARTS AS p INNER JOIN SUPPLIER_PARTS AS s ON p.PART_ID = s.PART_ID"); //$NON-NLS-1$
- }
-
- @Test public void testSelfJoin() {
- helpTestVisitor(getTestVDB(),
- "select p.part_name from parts p join parts p2 on p.part_id = p2.part_id", //$NON-NLS-1$
- "SELECT p.PART_NAME FROM PARTS AS p INNER JOIN PARTS AS p2 ON p.PART_ID = p2.PART_ID"); //$NON-NLS-1$
- }
-
- @Test public void testRightOuterJoin() {
- helpTestVisitor(getTestVDB(),
- "select p.part_name from parts p right join supplier_parts s on p.part_id = s.part_id", //$NON-NLS-1$
- "SELECT p.PART_NAME FROM SUPPLIER_PARTS AS s LEFT OUTER JOIN PARTS AS p ON p.PART_ID = s.PART_ID"); //$NON-NLS-1$
- }
-
- @Test public void testLeftOuterJoin() {
- helpTestVisitor(getTestVDB(),
- "select p.part_name from parts p left join supplier_parts s on p.part_id = s.part_id", //$NON-NLS-1$
- "SELECT p.PART_NAME FROM PARTS AS p LEFT OUTER JOIN SUPPLIER_PARTS AS s ON p.PART_ID = s.PART_ID"); //$NON-NLS-1$
- }
-
- @Test public void testFullOuterJoin() {
- helpTestVisitor(getTestVDB(),
- "select p.part_name from parts p full join supplier_parts s on p.part_id = s.part_id", //$NON-NLS-1$
- "SELECT p.PART_NAME FROM PARTS AS p FULL OUTER JOIN SUPPLIER_PARTS AS s ON p.PART_ID = s.PART_ID"); //$NON-NLS-1$
- }
-
- @Test public void testCompare1() {
- helpTestVisitor(getTestVDB(),
- "select part_name from parts where part_id = 'x'", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID = 'x'"); //$NON-NLS-1$
- }
-
- @Test public void testCompare2() {
- helpTestVisitor(getTestVDB(),
- "select part_name from parts where part_id <> 'x'", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID <> 'x'"); //$NON-NLS-1$
- }
-
- @Test public void testCompare3() {
- helpTestVisitor(getTestVDB(),
- "select part_name from parts where part_id < 'x'", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID < 'x'"); //$NON-NLS-1$
- }
-
- @Test public void testCompare4() {
- helpTestVisitor(getTestVDB(),
- "select part_name from parts where part_id <= 'x'", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID <= 'x'"); //$NON-NLS-1$
- }
-
- @Test public void testCompare5() {
- helpTestVisitor(getTestVDB(),
- "select part_name from parts where part_id > 'x'", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID > 'x'"); //$NON-NLS-1$
- }
-
- @Test public void testCompare6() {
- helpTestVisitor(getTestVDB(),
- "select part_name from parts where part_id >= 'x'", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID >= 'x'"); //$NON-NLS-1$
- }
-
- @Test public void testIn1() {
- helpTestVisitor(getTestVDB(),
- "select part_name from parts where part_id in ('x')", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID = 'x'"); //$NON-NLS-1$
- }
-
- @Test public void testIn2() {
- helpTestVisitor(getTestVDB(),
- "select part_name from parts where part_id in ('x', 'y')", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID IN ('x', 'y')"); //$NON-NLS-1$
- }
-
- @Test public void testIn3() {
- helpTestVisitor(getTestVDB(),
- "select part_name from parts where part_id not in ('x', 'y')", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID NOT IN ('x', 'y')"); //$NON-NLS-1$
- }
-
- @Test public void testIsNull1() {
- helpTestVisitor(getTestVDB(),
- "select part_name from parts where part_id is null", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID IS NULL"); //$NON-NLS-1$
- }
-
- @Test public void testIsNull2() {
- helpTestVisitor(getTestVDB(),
- "select part_name from parts where part_id is not null", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_ID IS NOT NULL"); //$NON-NLS-1$
- }
-
- @Test public void testInsertNull() {
- helpTestVisitor(getTestVDB(),
- "insert into parts (part_id, part_name, part_color, part_weight) values ('a', null, 'c', 'd')", //$NON-NLS-1$
- "INSERT INTO PARTS (PART_ID, PART_NAME, PART_COLOR, PART_WEIGHT) VALUES ('a', NULL, 'c', 'd')"); //$NON-NLS-1$
- }
-
- @Test public void testUpdateNull() {
- helpTestVisitor(getTestVDB(),
- "update parts set part_weight = null where part_color = 'b'", //$NON-NLS-1$
- "UPDATE PARTS SET PART_WEIGHT = NULL WHERE PARTS.PART_COLOR = 'b'"); //$NON-NLS-1$
- }
-
- @Test public void testUpdateWhereNull() {
- helpTestVisitor(getTestVDB(),
- "update parts set part_weight = 'a' where part_weight = null", //$NON-NLS-1$
- "UPDATE PARTS SET PART_WEIGHT = 'a' WHERE NULL <> NULL"); //$NON-NLS-1$
- }
-
- @Test public void testPreparedStatementCreationWithUpdate() {
- helpTestVisitor(getTestVDB(),
- "update parts set part_weight = 'a' where part_weight < 5", //$NON-NLS-1$
- "UPDATE PARTS SET PART_WEIGHT = ? WHERE PARTS.PART_WEIGHT < ?", //$NON-NLS-1$
- true);
- }
-
- @Test public void testPreparedStatementCreationWithInsert() {
- helpTestVisitor(getTestVDB(),
- "insert into parts (part_weight) values (5)", //$NON-NLS-1$
- "INSERT INTO PARTS (PART_WEIGHT) VALUES (?)", //$NON-NLS-1$
- true);
- }
-
- @Test public void testPreparedStatementCreationWithSelect() {
- helpTestVisitor(getTestVDB(),
- "select part_name from parts where part_id not in ('x', 'y') and part_weight < 6", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS WHERE (PARTS.PART_ID NOT IN (?, ?)) AND (PARTS.PART_WEIGHT < ?)", //$NON-NLS-1$
- true);
- }
-
- @Test public void testPreparedStatementCreationWithLike() {
- helpTestVisitor(getTestVDB(),
- "select part_name from parts where part_name like '%foo'", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_NAME LIKE ?", //$NON-NLS-1$
- true);
- }
-
- /**
- * ideally this should not happen, but to be on the safe side
- * only the right side should get replaced
- */
- public void defer_testPreparedStatementCreationWithLeftConstant() {
- helpTestVisitor(getTestVDB(),
- "select part_name from parts where 'x' = 'y'", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS WHERE 1 = ?", //$NON-NLS-1$
- true);
- }
-
- /**
- * In the future, functions can be made smarter about which of their literal arguments
- * either are (or are not) eligible to be bind variables
- */
- @Test public void testPreparedStatementCreationWithFunction() {
- helpTestVisitor(getTestVDB(),
- "select part_name from parts where concat(part_name, 'x') = concat('y', part_weight)", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS WHERE concat(PARTS.PART_NAME, 'x') = concat('y', PARTS.PART_WEIGHT)", //$NON-NLS-1$
- true);
- }
-
- @Test public void testPreparedStatementCreationWithCase() {
- helpTestVisitor(getTestVDB(),
- "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_WEIGHT = CASE WHEN PARTS.PART_NAME='a' THEN 'b' ELSE 'c' END", //$NON-NLS-1$
- "SELECT PARTS.PART_NAME FROM PARTS WHERE PARTS.PART_WEIGHT = CASE WHEN PARTS.PART_NAME = ? THEN 'b' ELSE 'c' END", //$NON-NLS-1$
- true);
- }
-
- @Test public void testVisitIDeleteWithComment() throws Exception {
- String expected = "DELETE /*teiid sessionid:ConnectionID, requestid:RequestID.PartID*/ FROM g1 WHERE (100 >= 200) AND (500 < 600)"; //$NON-NLS-1$
- assertEquals(expected, getStringWithContext(TestDeleteImpl.example()));
- }
-
- @Test public void testVisitIInsertWithComment() throws Exception {
- String expected = "INSERT /*teiid sessionid:ConnectionID, requestid:RequestID.PartID*/ INTO g1 (e1, e2, e3, e4) VALUES (1, 2, 3, 4)"; //$NON-NLS-1$
- assertEquals(expected, getStringWithContext(TestInsertImpl.example("g1"))); //$NON-NLS-1$
- }
-
- @Test public void testVisitISelectWithComment() throws Exception {
- String expected = "SELECT /*teiid sessionid:ConnectionID, requestid:RequestID.PartID*/ g1.e1, g1.e2, g1.e3, g1.e4"; //$NON-NLS-1$
- assertEquals(expected, getStringWithContext(TestQueryImpl.example(false)));
- expected = "SELECT /*teiid sessionid:ConnectionID, requestid:RequestID.PartID*/ DISTINCT g1.e1, g1.e2, g1.e3, g1.e4"; //$NON-NLS-1$
- assertEquals(expected, getStringWithContext(TestQueryImpl.example(true)));
- }
-
- @Test public void testVisitIUpdateWithComment() throws Exception {
- String expected = "UPDATE /*teiid sessionid:ConnectionID, requestid:RequestID.PartID*/ g1 SET e1 = 1, e2 = 1, e3 = 1, e4 = 1 WHERE 1 = 1"; //$NON-NLS-1$
- assertEquals(expected, getStringWithContext(TestUpdateImpl.example()));
- }
-
- @Test public void testVisitIProcedureWithComment() throws Exception {
- String expected = "{ /*teiid sessionid:ConnectionID, requestid:RequestID.PartID*/ call sq3(?,?)}"; //$NON-NLS-1$
- assertEquals(expected, getStringWithContext(TestProcedureImpl.example()));
- }
-
- @Test public void testTrimStrings() throws Exception {
- TranslationHelper.helpTestVisitor(TranslationHelper.BQT_VDB, "select stringkey from bqt1.smalla", "SELECT rtrim(SmallA.StringKey) FROM SmallA", TRANSLATOR); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Test public void testNestedSetQuery() throws Exception {
- String input = "select part_id id FROM parts UNION ALL (select part_name FROM parts UNION select part_id FROM parts)"; //$NON-NLS-1$
- String output = "SELECT rtrim(PARTS.PART_ID) AS id FROM PARTS UNION ALL (SELECT PARTS.PART_NAME FROM PARTS UNION SELECT rtrim(PARTS.PART_ID) FROM PARTS)"; //$NON-NLS-1$
-
- TranslationHelper.helpTestVisitor(TranslationHelper.PARTS_VDB,
- input,
- output, TRANSLATOR);
- }
-
- @Test public void testNestedSetQuery1() throws Exception {
- String input = "select part_id id FROM parts UNION (select part_name FROM parts EXCEPT select part_id FROM parts)"; //$NON-NLS-1$
- String output = "SELECT rtrim(PARTS.PART_ID) AS id FROM PARTS UNION (SELECT PARTS.PART_NAME FROM PARTS EXCEPT SELECT rtrim(PARTS.PART_ID) FROM PARTS)"; //$NON-NLS-1$
-
- TranslationHelper.helpTestVisitor(TranslationHelper.PARTS_VDB,
- input,
- output, TRANSLATOR);
- }
-
- @Test public void testNestedSetQuery2() throws Exception {
- String input = "select part_id id FROM parts UNION select part_name FROM parts EXCEPT select part_id FROM parts"; //$NON-NLS-1$
- String output = "SELECT rtrim(PARTS.PART_ID) AS id FROM PARTS UNION SELECT PARTS.PART_NAME FROM PARTS EXCEPT SELECT rtrim(PARTS.PART_ID) FROM PARTS"; //$NON-NLS-1$
-
- TranslationHelper.helpTestVisitor(TranslationHelper.PARTS_VDB,
- input,
- output, TRANSLATOR);
- }
-
- @Test public void testNestedSetQuery3() throws Exception {
- String input = "select part_id id FROM parts UNION (select part_name FROM parts Union ALL select part_id FROM parts)"; //$NON-NLS-1$
- String output = "SELECT rtrim(PARTS.PART_ID) AS id FROM PARTS UNION SELECT PARTS.PART_NAME FROM PARTS UNION SELECT rtrim(PARTS.PART_ID) FROM PARTS"; //$NON-NLS-1$
-
- TranslationHelper.helpTestVisitor(TranslationHelper.PARTS_VDB,
- input,
- output, TRANSLATOR);
- }
-
- @Test public void testOrderByUnrelated() throws Exception {
- String input = "select part_id id FROM parts order by part_name"; //$NON-NLS-1$
- String output = "SELECT rtrim(PARTS.PART_ID) AS id FROM PARTS ORDER BY PARTS.PART_NAME"; //$NON-NLS-1$
-
- TranslationHelper.helpTestVisitor(TranslationHelper.PARTS_VDB,
- input,
- output, TRANSLATOR);
- }
-
-}
Deleted: trunk/test-integration/common/src/test/java/com/metamatrix/connector/jdbc/util/TestJDBCExecutionHelper.java
===================================================================
--- trunk/test-integration/common/src/test/java/com/metamatrix/connector/jdbc/util/TestJDBCExecutionHelper.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/com/metamatrix/connector/jdbc/util/TestJDBCExecutionHelper.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-/*
- */
-package com.metamatrix.connector.jdbc.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.teiid.connector.language.DerivedColumn;
-import org.teiid.connector.language.Literal;
-import org.teiid.connector.language.Select;
-
-import com.metamatrix.common.types.DataTypeManager;
-
-public class TestJDBCExecutionHelper extends TestCase{
-
- public TestJDBCExecutionHelper(String name) {
- super(name);
- }
-
- //tests
- public void testGetColumnDataTypes(){
- Class[] expectedResults = new Class[2];
- List symbols = new ArrayList();
- symbols.add(new DerivedColumn("c1", new Literal("3", DataTypeManager.DefaultDataClasses.STRING))); //$NON-NLS-1$//$NON-NLS-2$
- expectedResults[0] = DataTypeManager.DefaultDataClasses.STRING;
- symbols.add(new DerivedColumn("c2", new Literal(new Integer(5), DataTypeManager.DefaultDataClasses.INTEGER))); //$NON-NLS-1$//$NON-NLS-2$
- expectedResults[1] = DataTypeManager.DefaultDataClasses.INTEGER;
- Select query = new Select(symbols, false, null, null, null, null, null);
- Class[] results = query.getColumnTypes();
- assertEquals( results[0], expectedResults[0]);
- assertEquals( results[1], expectedResults[1]);
- }
-
-}
Deleted: trunk/test-integration/common/src/test/java/com/metamatrix/jdbc/TestCase3473.java
===================================================================
--- trunk/test-integration/common/src/test/java/com/metamatrix/jdbc/TestCase3473.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/com/metamatrix/jdbc/TestCase3473.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,272 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.jdbc;
-
-import static junit.framework.Assert.*;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.Collections;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import com.metamatrix.core.util.UnitTestUtil;
-import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
-import com.metamatrix.jdbc.util.ResultSetUtil;
-
-/**
- */
-public class TestCase3473 extends AbstractMMQueryTestCase {
-
- private static final String DQP_CONFIG_FILE = UnitTestUtil.getTestDataPath() + "/3473/3473.properties;user=test"; //$NON-NLS-1$
-
- private MMDatabaseMetaData dbmd = null;
-
- ////////////////////Query Related Methods///////////////////////////
-
- public static final short ALWAYS_NULL = 0;
- public static final short NEVER_NULL = 1;
- public static final short MAY_BE_NULL = 2;
-
- private static final boolean REPLACE_EXPECTED = false;
- private static final boolean WRITE_ACTUAL_RESULTS_TO_FILE = false;
- private static final boolean PRINT_RESULTSETS_TO_CONSOLE = false;
-
- private static final int MAX_COL_WIDTH = 65;
-
- private FileOutputStream actualOut = null;
- private BufferedReader expectedIn = null;
- private PrintStream stream = null;
-
- @Before public void setUp() throws SQLException {
- Connection conn = getConnection("test", DQP_CONFIG_FILE); //$NON-NLS-1$
- dbmd = (MMDatabaseMetaData)conn.getMetaData();
- }
-
- private void initResultSetStreams(String testName) {
- if (REPLACE_EXPECTED) {
- File actual = new File(UnitTestUtil.getTestDataPath() + "/3473/"+testName+".expected"); //$NON-NLS-1$ //$NON-NLS-2$
- try {
- actualOut = new FileOutputStream(actual);
- } catch (Throwable t) {
- t.printStackTrace();
- }
- } else {
- if (WRITE_ACTUAL_RESULTS_TO_FILE) {
- File actual = new File(UnitTestUtil.getTestDataPath() + "/3473/"+testName+".actual"); //$NON-NLS-1$ //$NON-NLS-2$
- try {
- actualOut = new FileOutputStream(actual);
- } catch (Throwable t) {
- t.printStackTrace();
- }
- }
- File expected = new File(UnitTestUtil.getTestDataPath() + "/3473/"+testName+".expected"); //$NON-NLS-1$ //$NON-NLS-2$
- try {
- expectedIn = new BufferedReader(new FileReader(expected));
- } catch (Throwable t) {
- t.printStackTrace();
- }
- }
- PrintStream defaultStream = null;
- if (PRINT_RESULTSETS_TO_CONSOLE) {
- defaultStream = new PrintStream(System.out) {
- // System.out should be protected from being closed.
- public void close() {}
- };
- }
- stream = ResultSetUtil.getPrintStream(actualOut, expectedIn, defaultStream);
-
- }
-
- private void closeResultSetTestStreams() throws IOException {
- stream.close();
- if (actualOut != null) {
- actualOut.close();
- }
- if (expectedIn != null) {
- expectedIn.close();
- }
- }
-
- public void checkColumn(String expectedName, short nullable, Class type, String metadataName, Object value) {
- if(nullable == ALWAYS_NULL) {
- assertNull("Column " + expectedName + " should always be null but was: " + value, value); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if(nullable == NEVER_NULL) {
- assertNotNull("Column " + expectedName + " should never be null but was", value); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if(value != null) {
- assertTrue("Column " + expectedName + " is of wrong type", value.getClass().isAssignableFrom(type)); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- assertEquals("Got incorrect column name", expectedName, metadataName); //$NON-NLS-1$
- }
-
-
-
- @Test public void testGetCrossReference() throws Exception {
- initResultSetStreams("testGetCrossReference"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
- stream.println("getCrossReference1"); //$NON-NLS-1$
- rs = dbmd.getCrossReference(null,"test", "all_databases", null,"test", "all_models");//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- // Check for empty
- stream.println("getCrossReference2"); //$NON-NLS-1$
- rs = dbmd.getCrossReference(null, "Foo%", "%", null, null, "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- // Check for empty
- stream.println("getCrossReference3"); //$NON-NLS-1$
- rs = dbmd.getCrossReference("foo", "Foo%", "%", null, null, "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
-
- // Check for all cross references
- stream.println("getCrossReference4"); //$NON-NLS-1$
- rs = dbmd.getCrossReference(null, null, null, null, null, null);
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test public void testGetImportedKeys() throws Exception {
- initResultSetStreams("testGetImportedKeys"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
- stream.println("getImportedKeys1"); //$NON-NLS-1$
- rs = dbmd.getImportedKeys(null,"test", "all_models"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- stream.println("getImportedKeys2"); //$NON-NLS-1$
- rs = dbmd.getImportedKeys(null, "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- stream.println("getImportedKeys3"); //$NON-NLS-1$
- rs = dbmd.getImportedKeys("foo", "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test public void testGetExportedKeys() throws Exception {
- initResultSetStreams("testGetExportedKeys"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
- rs = dbmd.getExportedKeys(null,"test", "all_models"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- rs = dbmd.getExportedKeys(null, "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getExportedKeys("foo", "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
-
- @Test public void testGetPrimaryKeys() throws Exception {
- initResultSetStreams("testGetPrimaryKeys"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
- rs = dbmd.getPrimaryKeys(null,"test", "all_models"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- // Check for empty
- rs = dbmd.getPrimaryKeys(null, "Foo%", "test.all_models"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getPrimaryKeys("foo", "Foo%", "test.all_models"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test public void testGetTables() throws Exception{
- initResultSetStreams("testGetTables"); //$NON-NLS-1$
- ResultSet rs = dbmd.getTables(null, null, null, null);
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getTables(null, "%foo", null, null); //$NON-NLS-1$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getTables("foo", "%foo", null, null); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-}
Deleted: trunk/test-integration/common/src/test/java/com/metamatrix/jdbc/TestMMDatabaseMetaData.java
===================================================================
--- trunk/test-integration/common/src/test/java/com/metamatrix/jdbc/TestMMDatabaseMetaData.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/com/metamatrix/jdbc/TestMMDatabaseMetaData.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,1489 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.jdbc;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.lang.reflect.Method;
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.DriverManager;
-import java.sql.ResultSet;
-import java.sql.Types;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.teiid.jdbc.TeiidDriver;
-
-import com.metamatrix.common.util.ApplicationInfo;
-import com.metamatrix.core.util.UnitTestUtil;
-import com.metamatrix.jdbc.util.ResultSetUtil;
-
-/**
- */
-public class TestMMDatabaseMetaData {
-
- private static final String DQP_CONFIG_FILE = UnitTestUtil.getTestDataPath() + "/bqt/bqt.properties;user=test"; //$NON-NLS-1$
-
- static Connection conn = null;
- static String primaryUrl = "jdbc:metamatrix:QT_Ora9DS@" + DQP_CONFIG_FILE + ";version=1"; //$NON-NLS-1$ //$NON-NLS-2$
- // URL for local DQP
- static String serverUrl = primaryUrl + ";logLevel=1;partialResultsMode=false"; //$NON-NLS-1$
-
- // URL for integration test
- MMDatabaseMetaData dbmd = null;
- private Map expectedMap = new HashMap();
-
- // constant
- private static final int NO_LIMIT = 0;
- // constant value giving the key words used in metamatrix not in SQL-92
- private final static String KEY_WORDS = "OPTION, SHOWPLAN, DEBUG"; //$NON-NLS-1$
-
- //==============================================================================
- // The following 2 constants are defined here to provide access to constants
- // defined in the JDBC 3.0 implementation that comes with the 1.4 JRE.
- // They are defined this way to allow this class to compile with the 1.3 JRE.
- //==============================================================================
- private static final int ResultSet_HOLD_CURSORS_OVER_COMMIT = 1; // ResultSet.HOLD_CURSORS_OVER_COMMIT == 1
- private static final int ResultSet_CLOSE_CURSORS_AT_COMMIT = 2; // ResultSet.CLOSE_CURSORS_AT_COMMIT == 2
-
- @Before
- public void setUp() throws Exception {
- dbmd = new MMDatabaseMetaData((MMConnection) conn);
- }
-
- @AfterClass
- public static void oneTimeTearDown() throws Exception {
- if (conn != null) {
- conn.close();
- }
- }
-
- @BeforeClass
- public static void oneTimeSetUp() throws Exception {
- Class.forName(TeiidDriver.class.getName());
- conn = DriverManager.getConnection(serverUrl);
- }
-
- /** Test all the non-query methods */
- @Test
- public void testMethodsWithoutParams() throws Exception {
- Class dbmdClass = dbmd.getClass();
- // non-query Methods return String, boolean or int
- Method[] methods = dbmdClass.getDeclaredMethods();
-
- expectedMap = getExpected();
- //System.out.println(" -- total method == " + methods.length + ", non-query == " + expectedMap.size());
- for (int i = 0; i < methods.length; i++) {
- if (expectedMap.containsKey(methods[i].getName())) {
-
- Object actualValue = null;
- Object expectedValue = null;
- Object expectedReturn = expectedMap.get(methods[i].getName());
- Object[] params = null;
-
- if (methods[i].getName().equalsIgnoreCase(DQP_CONFIG_FILE))
-
- if (expectedReturn instanceof List) {
- // has input parameters
- List returned = (List) expectedReturn;
- params = (Object[]) returned.get(1);
- //System.out.println(" params == " + params[0]);
- expectedValue = returned.get(0);
- actualValue = methods[i].invoke(dbmd, params);
- } else {
- // without params
- expectedValue = expectedReturn;
- actualValue = methods[i].invoke(dbmd, new Object[0]);
- }
-
- assertEquals(" Expected doesn't match with actual for method - " + //$NON-NLS-1$
- methods[i].getName(), expectedValue, actualValue);
- //System.out.println("method [" + methods[i].getName() + " ] 's expectedValue == " + expectedValue + " actual == " + actualValue);
- }
- }
- }
-
- /** Test all the methods that throw exception */
- @Test
- public void testMethodsWithExceptions() throws Exception {
- Class dbmdClass = dbmd.getClass();
- Method[] methods = dbmdClass.getDeclaredMethods();
-
- expectedMap = new HashMap(); //none expected
- //System.out.println(" -- total method == " + methods.length + ", non-query == " + expectedMap.size());
- for (int i =0; i< methods.length; i++) {
- if (expectedMap.containsKey(methods[i].getName())) {
- methods[i].invoke(dbmd, new Object[0]);
- }
- }
- }
-
- /** test supportResultSetConcurrency() with params and test them with different input values */
- @Test
- public void testSupportResultSetConcurrency() throws Exception {
- boolean returned = true;
- String functionName = "supportResultSetConcurrency"; //$NON-NLS-1$
-
- // should return true;
- Object[] params =
- new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY), new Integer(ResultSet.CONCUR_READ_ONLY)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // shoud return true;
- params =
- new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE), new Integer(ResultSet.CONCUR_READ_ONLY)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // should return false;
- params =
- new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE), new Integer(ResultSet.CONCUR_UPDATABLE)};
- returned = false;
- helpTestMethodsWithParams(functionName, returned, params);
-
- // should return false;
- params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY), new Integer(ResultSet.CONCUR_UPDATABLE)};
- helpTestMethodsWithParams(functionName, returned, params);
- }
-
- /** test supportResultSetHoldability() with params and test them with different input values */
- @Test
- public void testSupportResultSetHoldability() throws Exception {
- boolean returned = false;
- String functionName = "supportResultSetHoldability"; //$NON-NLS-1$
-
- // should return false;
- Object[] params = new Object[] { new Integer(ResultSet_HOLD_CURSORS_OVER_COMMIT)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // shoud return false;
- params = new Object[] { new Integer(ResultSet_CLOSE_CURSORS_AT_COMMIT)};
- helpTestMethodsWithParams(functionName, returned, params);
- }
-
- /** test supportResultSetType() with params and test them with different input values */
- @Test
- public void testSupportResultSetType() throws Exception {
- boolean returned = true;
- String functionName = "supportResultSetType"; //$NON-NLS-1$
-
- // should return true;
- Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // shoud return true;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // should return false;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
- returned = false;
- helpTestMethodsWithParams(functionName, returned, params);
- }
-
- /** test supportsTransactionIsolationLevel() with params and test them with different input values */
- @Test
- public void testSupportsTransactionIsolationLevel() throws Exception {
- boolean returned = false;
- String functionName = "supportsTransactionIsolationLevel"; //$NON-NLS-1$
-
- // should return true;
- //TODO: what is transaction isolation level?
- Object[] params = new Object[] { new Integer(1)};
- helpTestMethodsWithParams(functionName, returned, params);
- }
-
- /** test deletesAreDetected() with params and test them with different input values */
- @Test
- public void testDeletesAreDetected() throws Exception {
- boolean returned = false;
- String functionName = "deletesAreDetected"; //$NON-NLS-1$
-
- // should return true;
- Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // shoud return true;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // should return false;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
- }
-
- /** test insertsAreDetected() with params and test them with different input values */
- @Test
- public void testInsertsAreDetected() throws Exception {
- boolean returned = false;
- String functionName = "insertsAreDetected"; //$NON-NLS-1$
-
- // should return true;
- Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // shoud return true;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // should return false;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
- }
-
- /** test updatesAreDetected() with params and test them with different input values */
- @Test
- public void testUpdatesAreDetected() throws Exception {
- boolean returned = false;
- String functionName = "updatesAreDetected"; //$NON-NLS-1$
-
- // should return true;
- Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // shoud return true;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // should return false;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
- }
-
- /** test ownUpdatesAreVisible() with params and test them with different input values */
- @Test
- public void testOwnUpdatesAreVisible() throws Exception {
- boolean returned = false;
- String functionName = "ownUpdatesAreVisible"; //$NON-NLS-1$
-
- // should return true;
- Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // shoud return true;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // should return false;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
- }
-
- /** test ownInsertsAreVisible() with params and test them with different input values */
- @Test
- public void testOwnInsertsAreVisible() throws Exception {
- boolean returned = false;
- String functionName = "ownInsertsAreVisible"; //$NON-NLS-1$
-
- // should return true;
- Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // shoud return true;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // should return false;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
- }
-
- /** test othersUpdatesAreVisible() with params and test them with different input values */
- @Test
- public void testOthersUpdatesAreVisible() throws Exception {
- boolean returned = false;
- String functionName = "othersUpdatesAreVisible"; //$NON-NLS-1$
-
- // should return true;
- Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // shoud return true;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // should return false;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
- }
-
- /** test othersInsertsAreVisible() with params and test them with different input values */
- @Test
- public void testOthersInsertsAreVisible() throws Exception {
- boolean returned = false;
- String functionName = "othersInsertsAreVisible"; //$NON-NLS-1$
-
- // should return true;
- Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // shoud return true;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // should return false;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
- }
-
- /** test othersInsertsAreVisible() with params and test them with different input values */
- @Test
- public void testOthersDeletesAreVisible() throws Exception {
- boolean returned = false;
- String functionName = "othersDeletesAreVisible"; //$NON-NLS-1$
-
- // should return true;
- Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // shoud return true;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
-
- // should return false;
- params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
- helpTestMethodsWithParams(functionName, returned, params);
- }
-
- /** test overloaded method supportsConvert() with params and test them with different input values */
- @Test
- public void testSupportsConvert1() throws Exception {
- assertEquals("Expected doesn't match with actual for method - supportsConvert()", //$NON-NLS-1$
- true, dbmd.supportsConvert());
- }
-
- /** test overloaded method supportsConvert() without params */
- @Test
- public void testSupportsConvert2() throws Exception {
- // should succeed
- helpTestSupportsConverts(Types.CHAR, Types.CHAR, true);
- helpTestSupportsConverts(Types.CHAR, Types.VARCHAR, true);
- helpTestSupportsConverts(Types.CHAR, Types.LONGVARCHAR, true);
- helpTestSupportsConverts(Types.CHAR, Types.BIT, true);
- helpTestSupportsConverts(Types.CHAR, Types.SMALLINT, true);
- helpTestSupportsConverts(Types.CHAR, Types.TINYINT, true);
- helpTestSupportsConverts(Types.CHAR, Types.INTEGER, true);
- helpTestSupportsConverts(Types.CHAR, Types.BIGINT, true);
- helpTestSupportsConverts(Types.CHAR, Types.FLOAT, true);
- helpTestSupportsConverts(Types.CHAR, Types.REAL, true);
- helpTestSupportsConverts(Types.CHAR, Types.DOUBLE, true);
- helpTestSupportsConverts(Types.CHAR, Types.NUMERIC, true);
- helpTestSupportsConverts(Types.CHAR, Types.DECIMAL, true);
- helpTestSupportsConverts(Types.CHAR, Types.DATE, true);
- helpTestSupportsConverts(Types.CHAR, Types.TIME, true);
- helpTestSupportsConverts(Types.CHAR, Types.TIMESTAMP, true);
-
- // should fail
- helpTestSupportsConverts(Types.DATE, Types.INTEGER, false);
-
- // TODO: there are other combination tests
- helpTestSupportsConverts(Types.CHAR, Types.BIGINT, true);
- helpTestSupportsConverts(Types.CHAR, Types.FLOAT, true);
- helpTestSupportsConverts(Types.CHAR, Types.REAL, true);
- }
-
- ////////////////////Query Related Methods///////////////////////////
-
- public static final short ALWAYS_NULL = 0;
- public static final short NEVER_NULL = 1;
- public static final short MAY_BE_NULL = 2;
-
- private static final boolean REPLACE_EXPECTED = false;
- private static final boolean WRITE_ACTUAL_RESULTS_TO_FILE = false;
- private static final boolean PRINT_RESULTSETS_TO_CONSOLE = false;
-
- private static final int MAX_COL_WIDTH = 65;
-
- private FileOutputStream actualOut = null;
- private BufferedReader expectedIn = null;
- private PrintStream stream = null;
- private void initResultSetStreams(String testName) throws FileNotFoundException {
- if (REPLACE_EXPECTED) {
- File actual = new File(UnitTestUtil.getTestDataPath() + "/TestMMDatabaseMetaData/"+testName+".expected"); //$NON-NLS-1$ //$NON-NLS-2$
- actualOut = new FileOutputStream(actual);
- } else {
- if (WRITE_ACTUAL_RESULTS_TO_FILE) {
- File actual = new File(UnitTestUtil.getTestDataPath() + "/TestMMDatabaseMetaData/"+testName+".actual"); //$NON-NLS-1$ //$NON-NLS-2$
- actualOut = new FileOutputStream(actual);
- }
- File expected = new File(UnitTestUtil.getTestDataPath() + "/TestMMDatabaseMetaData/"+testName+".expected"); //$NON-NLS-1$ //$NON-NLS-2$
- expectedIn = new BufferedReader(new FileReader(expected));
- }
- PrintStream defaultStream = null;
- if (PRINT_RESULTSETS_TO_CONSOLE) {
- defaultStream = new PrintStream(System.out) {
- // System.out should be protected from being closed.
- public void close() {}
- };
- }
- stream = ResultSetUtil.getPrintStream(actualOut, expectedIn, defaultStream);
-
- }
-
- private void closeResultSetTestStreams() throws IOException {
- stream.close();
- if (actualOut != null) {
- actualOut.close();
- }
- if (expectedIn != null) {
- expectedIn.close();
- }
- }
-
- public void checkColumn(String expectedName, short nullable, Class type, String metadataName, Object value) {
- if(nullable == ALWAYS_NULL) {
- assertNull("Column " + expectedName + " should always be null but was: " + value, value); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if(nullable == NEVER_NULL) {
- assertNotNull("Column " + expectedName + " should never be null but was", value); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if(value != null) {
- assertTrue("Column " + expectedName + " is of wrong type", value.getClass().isAssignableFrom(type)); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- assertEquals("Got incorrect column name", expectedName, metadataName); //$NON-NLS-1$
- }
-
- public void checkNullConstant(Object value) {
- assertNotNull("Got null nullability constant", value); //$NON-NLS-1$
- assertTrue("Nullability constant is wrong type: " + value.getClass(), value.getClass().equals(Integer.class)); //$NON-NLS-1$
- Integer intValue = (Integer) value;
- assertTrue("Got invalid nullability constant: " + value, //$NON-NLS-1$
- intValue.intValue() == DatabaseMetaData.columnNoNulls ||
- intValue.intValue() == DatabaseMetaData.columnNullable ||
- intValue.intValue() == DatabaseMetaData.columnNullableUnknown
- );
- }
-
- @Test
- public void testUcaseMatchReturnsRows() throws Exception {
- ResultSet rs = null;
- try {
- java.sql.Statement stmt = conn.createStatement();
-
- // Returns 0 rows (but should be identical and return 24 rows):
- rs = stmt.executeQuery("SELECT Name FROM System.Tables WHERE UCASE(SchemaName) = 'SYSTEM'"); //$NON-NLS-1$
-
- int count = 0;
- while(rs.next()) {
- count++;
- }
- assertEquals(11, count);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
- }
-
- @Test
- public void testGetColumnsSingleMatch() throws Exception {
- initResultSetStreams("testGetColumnsSingleMatch"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
- //List expected = getExpectedColumns();
-
- rs = dbmd.getColumns(null, "System", "VirtualDatabases", "Name"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- } finally {
- if(rs != null) {
- rs.close();
- }
- closeResultSetTestStreams();
- }
- }
-
- @Test
- public void testGetCatalogs() throws Exception {
- initResultSetStreams("testGetCatalogs"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
-
- rs = dbmd.getCatalogs();
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- } finally {
- if (rs != null) {
- rs.close();
- }
- closeResultSetTestStreams();
- }
- }
-
- @Test
- public void testGetCrossReference() throws Exception {
- initResultSetStreams("testGetCrossReference"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
-
- stream.println("getCrossReference1"); //$NON-NLS-1$
- rs = dbmd.getCrossReference(null, "BQT1", "SmallA", null, "BQT1", "SmallB");//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- // Check for empty
- stream.println("getCrossReference2"); //$NON-NLS-1$
- rs = dbmd.getCrossReference(null, "Foo%", "%", null, null, "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- // Check for empty
- stream.println("getCrossReference3"); //$NON-NLS-1$
- rs = dbmd.getCrossReference("foo", "Foo%", "%", null, null, "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetImportedKeys() throws Exception {
- initResultSetStreams("testGetImportedKeys"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
- stream.println("getImportedKeys1"); //$NON-NLS-1$
- rs = dbmd.getImportedKeys(null, "BQT1", "SmallA"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- stream.println("getImportedKeys2"); //$NON-NLS-1$
- rs = dbmd.getImportedKeys(null, "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- stream.println("getImportedKeys3"); //$NON-NLS-1$
- rs = dbmd.getImportedKeys("foo", "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetExportedKeys() throws Exception {
- initResultSetStreams("testGetExportedKeys"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
- rs = dbmd.getExportedKeys(null, "BQT1", "SmallA"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- rs = dbmd.getExportedKeys(null, "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getExportedKeys("foo", "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetIndexInfo() throws Exception {
- initResultSetStreams("testGetIndexInfo"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
- rs = dbmd.getIndexInfo(null, "System", "KeyColumns", true, true); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- rs = dbmd.getIndexInfo(null, "Foo%", "%", true, false); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getIndexInfo("foo", "Foo%", "%", true, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetPrimaryKeys() throws Exception {
- initResultSetStreams("testGetPrimaryKeys"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
- rs = dbmd.getPrimaryKeys(null, "BQT1", "SmallA"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- // Check for empty
- rs = dbmd.getPrimaryKeys(null, "Foo%", "BQT1.SmallA"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getPrimaryKeys("foo", "Foo%", "BQT1.SmallA"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetProcedureColumns() throws Exception {
- initResultSetStreams("testGetProcedureColumns"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
- rs = dbmd.getProcedureColumns(null, null, null, null);
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- rs = dbmd.getProcedureColumns(null, "Foo%", null, null); //$NON-NLS-1$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getProcedureColumns("foo", "Foo%", null, null); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetProcedures() throws Exception {
- initResultSetStreams("testGetProcedures"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
- rs = dbmd.getProcedures(null, null, null);
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- rs = dbmd.getProcedures(null, "Foo%", null); //$NON-NLS-1$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getProcedures("foo", "Foo%", null); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetSchemas() throws Exception {
- initResultSetStreams("testGetSchemas"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
- rs = dbmd.getSchemas();
-
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- } finally {
- if(rs != null) {
- rs.close();
- }
- closeResultSetTestStreams();
- }
- }
- @Test
- public void testGetColumns() throws Exception {
- initResultSetStreams("testGetColumns"); //$NON-NLS-1$
- stream.println("getColumns1"); //$NON-NLS-1$
- ResultSet rs = dbmd.getColumns(null, null, null, null);
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetColumns2() throws Exception {
- initResultSetStreams("testGetColumns2"); //$NON-NLS-1$
-
- stream.println("getColumns2"); //$NON-NLS-1$
- ResultSet rs = dbmd.getColumns(null, "QT_Ora%", "%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
-
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetColumns3() throws Exception {
- initResultSetStreams("testGetColumns3"); //$NON-NLS-1$
-
- stream.println("getColumns3"); //$NON-NLS-1$
- ResultSet rs = dbmd.getColumns(null, "Foo%", "%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
-
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetColumns4() throws Exception {
- initResultSetStreams("testGetColumns4"); //$NON-NLS-1$
-
- stream.println("getColumns4"); //$NON-NLS-1$
- ResultSet rs = dbmd.getColumns("foo", "Foo%", "%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
-
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
-
- @Test
- public void testGetColumnPrivileges() throws Exception {
- initResultSetStreams("testGetColumnPrivileges"); //$NON-NLS-1$
-
- ResultSet rs = dbmd.getColumnPrivileges(null, "Parts", "%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
-
- rs = dbmd.getColumnPrivileges(null, "%foo", null, null); //$NON-NLS-1$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getColumnPrivileges("foo", "%foo", null, null); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetColumnPrivilegesResultSetMetaData() throws Exception {
- initResultSetStreams("testGetColumnPrivilegesResultSetMetaData"); //$NON-NLS-1$
-
- ResultSet rs = dbmd.getColumnPrivileges(null, "Parts", "%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetTablePrivileges() throws Exception {
- initResultSetStreams("testGetTablePrivileges"); //$NON-NLS-1$
-
- ResultSet rs = dbmd.getTablePrivileges(null, "Parts", "%"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
-
-
- @Test
- public void testGetTablePrivilegesResultSetMetaData() throws Exception {
- initResultSetStreams("testGetTablePrivilegesResultSetMetaData"); //$NON-NLS-1$
-
- ResultSet rs = dbmd.getTablePrivileges(null, "Parts", "%"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetTables_specificTable() throws Exception {
- initResultSetStreams("testGetTables_specificTable"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
- //List expected = getExpectedColumns();
-
- rs = dbmd.getTables(null, "SYSTEM", "VIRTUALDATABASES", null); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- } finally {
- if (rs != null) {
- rs.close();
- }
- closeResultSetTestStreams();
- }
- }
-
- @Test
- public void testGetTables_specificTableTypes() throws Exception {
- initResultSetStreams("testGetTables_specificTableTypes"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
-
-
- String[] tables = new String[] { "Table" }; //$NON-NLS-1$
-
- rs = dbmd.getTables(null, null, null, tables);
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- } finally {
- if (rs != null) {
- rs.close();
- }
- closeResultSetTestStreams();
- }
- }
-
- @Test
- public void testGetTables_specificTableMultipleTypes() throws Exception {
- initResultSetStreams("testGetTables_specificTableMultipleTypes"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
-
-
- String[] tables = new String[] { "Table", "View" }; //$NON-NLS-1$ //$NON-NLS-2$
-
- rs = dbmd.getTables(null, null, null, tables);
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- } finally {
- if (rs != null) {
- rs.close();
- }
- closeResultSetTestStreams();
- }
- }
-
- @Test
- public void testGetTables() throws Exception{
- initResultSetStreams("testGetTables"); //$NON-NLS-1$
-
- ResultSet rs = dbmd.getTables(null, null, null, null);
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getTables(null, "%foo", null, null); //$NON-NLS-1$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getTables("foo", "%foo", null, null); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetTables_allTables() throws Exception {
- initResultSetStreams("testGetTables_allTables"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
-
- rs = dbmd.getTables(null, null, null, null);
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
-
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- } finally {
- if (rs != null) {
- rs.close();
- }
- closeResultSetTestStreams();
- }
- }
-
- @Test
- public void testGetTableTypes() throws Exception {
- initResultSetStreams("testGetTableTypes"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
-
- rs = dbmd.getTableTypes();
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- } finally {
- if (rs != null) {
- rs.close();
- }
- closeResultSetTestStreams();
- }
- }
-
- @Test
- public void testGetTypeInfo_TotalNumber() throws Exception {
- initResultSetStreams("testGetTypeInfo_TotalNumber"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
-
- rs = dbmd.getTypeInfo();
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- } finally {
- if(rs != null) {
- rs.close();
- }
- closeResultSetTestStreams();
- }
- }
-
- @Test
- public void testGetUDTs() throws Exception{
- initResultSetStreams("testGetUDTs"); //$NON-NLS-1$
-
- ResultSet rs = dbmd.getUDTs(null, null, "%blob%", null); //$NON-NLS-1$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getUDTs(null, "%foo", "%blob%", null); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getUDTs("foo", "%foo", "%blob%", null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetUDTs_specificTypeName() throws Exception {
- initResultSetStreams("testGetUDTs_specificTypeName"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
-
- rs = dbmd.getUDTs(null, null, "%blob%", null); //$NON-NLS-1$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- } finally {
- if(rs != null) {
- rs.close();
- }
- closeResultSetTestStreams();
- }
- }
-
- @Test
- public void testGetVersionColumns() throws Exception {
- initResultSetStreams("testGetVersionColumns"); //$NON-NLS-1$
-
- ResultSet rs = dbmd.getVersionColumns(null, null, null);
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs = dbmd.getVersionColumns(null, "Foo%", null); //$NON-NLS-1$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getVersionColumns("foo", "Foo%", null); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetBestRowIdentifier() throws Exception {
- initResultSetStreams("testGetBestRowIdentifier"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
-
- rs = dbmd.getBestRowIdentifier(null, null, "SYSTEM.VIRTUALDATABASES", //$NON-NLS-1$
- DatabaseMetaData.bestRowTemporary, true);
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- rs = dbmd.getBestRowIdentifier(null, "%foo", null, 1,true); //$NON-NLS-1$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getBestRowIdentifier("foo", "%foo", null, 1,true); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetSuperTables() throws Exception {
- initResultSetStreams("testSuperTables"); //$NON-NLS-1$
-
- ResultSet rs = dbmd.getSuperTables(null, "Parts", "%"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetSuperTypes() throws Exception {
- initResultSetStreams("testGetSuperTypes"); //$NON-NLS-1$
-
- ResultSet rs = dbmd.getSuperTypes(null, "Parts", "%"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetColumnsWithEscape() throws Exception {
- ResultSet columns = dbmd.getColumns("QT\\_Ora9DS", "BQT1", "SmallA", "IntKey"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- columns.next();
- assertEquals("BQT1", columns.getString(2));//$NON-NLS-1$
- assertFalse(columns.next());
- }
-
- @Test
- public void testGetCrossReferenceWithEscape() throws Exception {
- initResultSetStreams("testGetCrossReference"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
-
- stream.println("getCrossReference1"); //$NON-NLS-1$
- rs = dbmd.getCrossReference(null, "QT\\_Ora9DS", "BQT1.SmallA", null, null, "BQT1.SmallB");//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- // Check for empty
- stream.println("getCrossReference2"); //$NON-NLS-1$
- rs = dbmd.getCrossReference(null, "Foo%", "%", null, null, "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- // Check for empty
- stream.println("getCrossReference3"); //$NON-NLS-1$
- rs = dbmd.getCrossReference("foo", "Foo%", "%", null, null, "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetExportedKeysWithEscape() throws Exception {
- initResultSetStreams("testGetExportedKeys"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
-
- rs = dbmd.getExportedKeys(null, "QT\\_Ora9DS", "BQT1.SmallA"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- rs = dbmd.getExportedKeys(null, "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getExportedKeys("foo", "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetImportedKeysWithEscape() throws Exception {
- initResultSetStreams("testGetImportedKeys"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
-
- stream.println("getImportedKeys1"); //$NON-NLS-1$
- rs = dbmd.getImportedKeys(null, "QT\\_Ora9DS", "BQT1.SmallA"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- stream.println("getImportedKeys2"); //$NON-NLS-1$
- rs = dbmd.getImportedKeys(null, "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- stream.println("getImportedKeys3"); //$NON-NLS-1$
- rs = dbmd.getImportedKeys("foo", "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetIndexInfoWithEscape() throws Exception {
- initResultSetStreams("testGetIndexInfo"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
-
- //ResultSet rs = dbmd.getIndexInfo(null, null, "BQT1.SmallA", true, true); //$NON-NLS-1$
- rs = dbmd.getIndexInfo(null, "QT\\_Ora9DS", "System.KeyElements", true, true); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- rs = dbmd.getIndexInfo(null, "Foo%", "%", true, false); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getIndexInfo("foo", "Foo%", "%", true, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetPrimaryKeysWithEscape() throws Exception {
- initResultSetStreams("testGetPrimaryKeys"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
-
- //ResultSet rs = dbmd.getPrimaryKeys(null, null, "SYSTEM.VIRTUALDATABASES"); //$NON-NLS-1$
-
- // This is only a way to do unit test. Actually, the primary key of BQT.smallA
- // should be tested here, the only tables should be queried are just system
- // tables.
- rs = dbmd.getPrimaryKeys("QT\\_Ora9DS", "BQT1", "SmallA"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- // Check for empty
- rs = dbmd.getPrimaryKeys(null, "Foo%", "BQT1.SmallA"); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getPrimaryKeys("foo", "Foo%", "BQT1.SmallA"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
-
- @Test
- public void testGetProceduresWithEscape() throws Exception {
- initResultSetStreams("testGetProcedures"); //$NON-NLS-1$
- ResultSet rs = null;
- try {
-
- rs = dbmd.getProcedures("QT\\_Ora9DS", null, null); //$NON-NLS-1$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- } finally {
- if(rs != null) {
- rs.close();
- }
- }
-
- rs = dbmd.getProcedures(null, "Foo%", null); //$NON-NLS-1$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- rs.close();
-
- rs = dbmd.getProcedures("foo", "Foo%", null); //$NON-NLS-1$ //$NON-NLS-2$
- ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
- assertEquals("Actual data did not match expected", //$NON-NLS-1$
- Collections.EMPTY_LIST,
- ResultSetUtil.getUnequalLines(stream));
- rs.close();
- closeResultSetTestStreams();
- }
- ///////////////////////////Helper Method//////////////////////////////
-
- private void helpTestSupportsConverts(int from, int to, boolean result) throws Exception {
- assertEquals("Expected doesn't match with actual for method - supportsConvert()", //$NON-NLS-1$
- result, dbmd.supportsConvert(from, to));
- }
-
- private void helpTestMethodsWithParams(String methodName, boolean returned, Object[] params) throws Exception {
- Class dbmdClass = dbmd.getClass();
- Method[] methods = dbmdClass.getDeclaredMethods();
-
- for (int i = 0; i < methods.length; i++) {
- if (methods[i].getName().equalsIgnoreCase(methodName)) {
- Object actual = methods[i].invoke(dbmd, params);
- assertEquals("Expected doesn't match with actual for method - " + methodName, //$NON-NLS-1$
- new Boolean(returned), actual);
- }
- }
- }
-
- //////////////////////Expected Result//////////////////
-
- private Map getExpected() {
- Map<String, Object> expected = new HashMap<String, Object>();
- // return type -- boolean
- expected.put("allProceduresAreCallable", Boolean.TRUE); //$NON-NLS-1$
- expected.put("allTablesAreSelectable", Boolean.TRUE); //$NON-NLS-1$
- expected.put("doesMaxRowSizeIncludeBlobs", Boolean.FALSE); //$NON-NLS-1$
- expected.put("isCatalogAtStart", Boolean.FALSE); //$NON-NLS-1$
- expected.put("isReadOnly", Boolean.FALSE); //$NON-NLS-1$
- expected.put("locatorsUpdateCopy", Boolean.FALSE); //$NON-NLS-1$
- expected.put("nullPlusNonNullIsNull", Boolean.TRUE); //$NON-NLS-1$
- expected.put("nullsAreSortedAtEnd", Boolean.FALSE); //$NON-NLS-1$
- expected.put("nullsAreSortedAtStart", Boolean.FALSE); //$NON-NLS-1$
- expected.put("nullsAreSortedHigh", Boolean.FALSE); //$NON-NLS-1$
- expected.put("nullsAreSortedLow", Boolean.TRUE); //$NON-NLS-1$
- expected.put("storesLowerCaseIdentifiers", Boolean.FALSE); //$NON-NLS-1$
- expected.put("storesLowerCaseQuotedIdentifiers", Boolean.FALSE); //$NON-NLS-1$
- expected.put("storesMixedCaseIdentifiers", Boolean.TRUE); //$NON-NLS-1$
- expected.put("storesMixedCaseQuotedIdentifiers", Boolean.TRUE); //$NON-NLS-1$
- expected.put("storesUpperCaseIdentifiers", Boolean.FALSE); //$NON-NLS-1$
- expected.put("storesUpperCaseQuotedIdentifiers", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsAlterTableWithAddColumn", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsAlterTableWithDropColumn", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsANSI92EntryLevelSQL", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsANSI92FullSQL", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsANSI92IntermediateSQL", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsBatchUpdates", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsCatalogsInDataManipulation", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsCatalogsInIndexDefinitions", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsCatalogsInPrivilegeDefinitions", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsCatalogsInProcedureCalls", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsCatalogsInTableDefinitions", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsColumnAliasing", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsCorrelatedSubqueries", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsCoreSQLGrammar", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsDataDefinitionAndDataManipulationTransactions", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsDataManipulationTransactionsOnly", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsDifferentTableCorrelationNames", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsExpressionsInOrderBy", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsExtendedSQLGrammar", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsFullOuterJoins", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsGetGeneratedKeys", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsGroupBy", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsGroupByBeyondSelect", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsGroupByUnrelated", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsIntegrityEnhancementFacility", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsLikeEscapeClause", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsLimitedOuterJoins", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsMinimumSQLGrammar", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsMixedCaseIdentifiers", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsMixedCaseQuotedIdentifiers", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsOpenCursorsAcrossCommit", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsMultipleResultSets", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsMultipleOpenResults", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsMultipleTransactions", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsNamedParameters", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsNonNullableColumns", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsOpenCursorsAcrossRollback", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsOpenStatementsAcrossCommit", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsOpenStatementsAcrossRollback", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsOrderByUnrelated", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsOuterJoins", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsPositionedDelete", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsPositionedUpdate", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsSavepoints", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsSchemasInDataManipulation", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsSchemasInIndexDefinitions", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsSchemasInPrivilegeDefinitions", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsSchemasInProcedureCalls", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsSchemasInTableDefinitions", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsSelectForUpdate", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsStatementPooling", Boolean.FALSE); //$NON-NLS-1$
- expected.put("supportsStoredProcedures", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsSubqueriesInComparisons", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsSubqueriesInExists", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsSubqueriesInIns", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsSubqueriesInQuantifieds", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsTableCorrelationNames", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsTransactions", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsUnion", Boolean.TRUE); //$NON-NLS-1$
- expected.put("supportsUnionAll", Boolean.TRUE); //$NON-NLS-1$
- expected.put("usesLocalFilePerTable", Boolean.FALSE); //$NON-NLS-1$
- expected.put("usesLocalFiles", Boolean.FALSE); //$NON-NLS-1$
- expected.put("usesLocalFilePerTable", Boolean.FALSE); //$NON-NLS-1$
-
- // return type -- int
- expected.put("getDatabaseMinorVersion", new Integer(ApplicationInfo.getInstance().getMinorReleaseVersion())); //$NON-NLS-1$
- expected.put("getDatabaseMajorVersion", new Integer(ApplicationInfo.getInstance().getMajorReleaseVersion())); //$NON-NLS-1$
- expected.put("getJDBCMajorVersion", new Integer(3)); //$NON-NLS-1$
- expected.put("getJDBCMinorVersion", new Integer(0)); //$NON-NLS-1$
- expected.put("getDefaultTransactionIsolation", new Integer(Connection.TRANSACTION_NONE)); //$NON-NLS-1$
- expected.put("getDriverMajorVersion", new Integer(ApplicationInfo.getInstance().getMajorReleaseVersion())); //$NON-NLS-1$
- expected.put("getDriverMinorVersion", new Integer(ApplicationInfo.getInstance().getMinorReleaseVersion())); //$NON-NLS-1$
- expected.put("getMaxBinaryLiteralLength", new Integer(NO_LIMIT)); //$NON-NLS-1$
- expected.put("getMaxCatalogNameLength", new Integer(NO_LIMIT)); //$NON-NLS-1$
- expected.put("getMaxCharLiteralLength", new Integer(NO_LIMIT)); //$NON-NLS-1$
- expected.put("getMaxColumnNameLength", new Integer(255)); //$NON-NLS-1$
- expected.put("getMaxColumnsInGroupBy", new Integer(NO_LIMIT)); //$NON-NLS-1$
- expected.put("getMaxColumnsInIndex", new Integer(NO_LIMIT)); //$NON-NLS-1$
- expected.put("getMaxColumnsInOrderBy", new Integer(NO_LIMIT)); //$NON-NLS-1$
- expected.put("getMaxColumnsInSelect", new Integer(NO_LIMIT)); //$NON-NLS-1$
- expected.put("getMaxColumnsInTable", new Integer(NO_LIMIT)); //$NON-NLS-1$
- expected.put("getMaxConnections", new Integer(NO_LIMIT)); //$NON-NLS-1$
- expected.put("getMaxCursorNameLength", new Integer(NO_LIMIT)); //$NON-NLS-1$
- expected.put("getMaxIndexLength", new Integer(NO_LIMIT)); //$NON-NLS-1$
- expected.put("getMaxProcedureNameLength", new Integer(255)); //$NON-NLS-1$
- expected.put("getMaxRowSize", new Integer(NO_LIMIT)); //$NON-NLS-1$
- expected.put("getMaxSchemaNameLength", new Integer(NO_LIMIT)); //$NON-NLS-1$
- expected.put("getMaxStatementLength", new Integer(NO_LIMIT)); //$NON-NLS-1$
- expected.put("getMaxStatements", new Integer(NO_LIMIT)); //$NON-NLS-1$
- expected.put("getMaxTableNameLength", new Integer(255)); //$NON-NLS-1$
- expected.put("getMaxTablesInSelect", new Integer(NO_LIMIT)); //$NON-NLS-1$
- expected.put("getMaxUserNameLength", new Integer(255)); //$NON-NLS-1$
- //TODO: change expected value;
- expected.put("getSQLStateType", new Integer(2)); //$NON-NLS-1$
-
- // return type -- String
- expected.put("getCatalogSeparator", ""); //$NON-NLS-1$ //$NON-NLS-2$
- expected.put("getCatalogTerm", ""); //$NON-NLS-1$ //$NON-NLS-2$
- expected.put("getDatabaseProductName", "MetaMatrix Query"); //$NON-NLS-1$ //$NON-NLS-2$
- expected.put("getDatabaseProductVersion", "5.5"); //$NON-NLS-1$ //$NON-NLS-2$
- expected.put("getDriverName", "MetaMatrix Query JDBC Driver"); //$NON-NLS-1$ //$NON-NLS-2$
- expected.put("getDriverVersion", ApplicationInfo.getInstance().getMajorReleaseVersion()+"."+ApplicationInfo.getInstance().getMinorReleaseVersion()); //$NON-NLS-1$ //$NON-NLS-2$
- expected.put("getExtraNameCharacters", ".@"); //$NON-NLS-1$ //$NON-NLS-2$
- expected.put("getIdentifierQuoteString", "\""); //$NON-NLS-1$ //$NON-NLS-2$
- expected.put("getNumericFunctions", MMDatabaseMetaData.NUMERIC_FUNCTIONS); //$NON-NLS-1$
- expected.put("getProcedureTerm", "StoredProcedure"); //$NON-NLS-1$ //$NON-NLS-2$
- expected.put("getSchemaTerm", "VirtualDatabase"); //$NON-NLS-1$ //$NON-NLS-2$
- expected.put("getSearchStringEscape", "\\"); //$NON-NLS-1$ //$NON-NLS-2$
- expected.put("getSQLKeywords", KEY_WORDS); //$NON-NLS-1$
- expected.put("getStringFunctions", MMDatabaseMetaData.STRING_FUNCTIONS); //$NON-NLS-1$
- expected.put("getSystemFunctions", MMDatabaseMetaData.SYSTEM_FUNCTIONS); //$NON-NLS-1$
- expected.put("getTimeDateFunctions", MMDatabaseMetaData.DATE_FUNCTIONS); //$NON-NLS-1$
- //expected.put("getUrl", primaryUrl + serverUrl); //$NON-NLS-1$
- expected.put("getUserName", null); //$NON-NLS-1$
-
- // return type - Object
- expected.put("getConnection", conn); //$NON-NLS-1$
-
- return expected;
- }
-
-}
Deleted: trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/BaseQueryTest.java
===================================================================
--- trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/BaseQueryTest.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/BaseQueryTest.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,79 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-package com.metamatrix.server.integration;
-
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.teiid.metadata.index.VDBMetadataFactory;
-
-import com.metamatrix.query.analysis.AnalysisRecord;
-import com.metamatrix.query.metadata.QueryMetadataInterface;
-import com.metamatrix.query.optimizer.QueryOptimizer;
-import com.metamatrix.query.optimizer.TestOptimizer;
-import com.metamatrix.query.optimizer.capabilities.CapabilitiesFinder;
-import com.metamatrix.query.processor.ProcessorDataManager;
-import com.metamatrix.query.processor.ProcessorPlan;
-import com.metamatrix.query.processor.TestProcessor;
-import com.metamatrix.query.sql.lang.Command;
-import com.metamatrix.query.util.CommandContext;
-
-
-/**
- * @since 4.2
- */
-public abstract class BaseQueryTest extends TestCase {
-
- public BaseQueryTest(String name) {
- super(name);
- }
-
- public static QueryMetadataInterface createMetadata(String vdbFile) {
- return VDBMetadataFactory.getVDBMetadata(vdbFile);
- }
-
- protected void doProcess(QueryMetadataInterface metadata, String sql, CapabilitiesFinder capFinder, ProcessorDataManager dataManager, List[] expectedResults, boolean debug) throws Exception {
- CommandContext context = createCommandContext();
- context.setProcessDebug(debug);
- Command command = TestOptimizer.helpGetCommand(sql, metadata, null);
-
- // plan
- AnalysisRecord analysisRecord = new AnalysisRecord(false, debug, debug);
- ProcessorPlan plan = null;
- try {
- plan = QueryOptimizer.optimizePlan(command, metadata, null, capFinder, analysisRecord, createCommandContext());
- } finally {
- if(debug) {
- System.out.println(analysisRecord.getDebugLog());
- }
- }
-
- TestProcessor.doProcess(plan, dataManager, expectedResults, context);
- }
-
- protected CommandContext createCommandContext() {
- CommandContext context = new CommandContext("0", "test", "user", "myvdb", 1); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- return context;
- }
-
-}
Deleted: trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestDataEntitlements.java
===================================================================
--- trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestDataEntitlements.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestDataEntitlements.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,68 +0,0 @@
-package com.metamatrix.server.integration;
-
-import junit.framework.TestCase;
-
-import org.junit.Test;
-
-import com.metamatrix.core.util.UnitTestUtil;
-import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
-
-public class TestDataEntitlements extends AbstractMMQueryTestCase {
-
- private static final String DQP_PROP_FILE = UnitTestUtil.getTestDataPath() + "/authcheck/bqt.properties;"; //$NON-NLS-1$
- private static final String VDB = "bqt"; //$NON-NLS-1$
-
- @Test public void testNoUserAuth() {
- try {
- getConnection(VDB, DQP_PROP_FILE, "user=test"); //$NON-NLS-1$
- TestCase.fail("Should have failed authenticate user test"); //$NON-NLS-1$
- closeConnection();
- } catch (Exception e) {
- }
- }
-
- @Test public void testAdminAuth() {
- try {
- getConnection(VDB, DQP_PROP_FILE, "user=admin;password=mm"); //$NON-NLS-1$
- TestCase.fail("Should have failed authenticate user test"); //$NON-NLS-1$
- } catch (Exception e) {
- }
-
- getConnection(VDB, DQP_PROP_FILE, "user=admin;password=teiid"); //$NON-NLS-1$
- execute("select * from BQT1.smalla"); //$NON-NLS-1$
- walkResults();
- closeConnection();
- }
-
- @Test public void testEntitlements() {
- try {
- getConnection(VDB, DQP_PROP_FILE, "user=john;password=foo"); //$NON-NLS-1$
- TestCase.fail("Should have failed authenticate user test"); //$NON-NLS-1$
- } catch (Exception e) {
- }
-
- getConnection(VDB, DQP_PROP_FILE, "user=john;password=mm"); //$NON-NLS-1$
- try {
- execute("select intkey, stringkey from BQT1.smalla"); //$NON-NLS-1$
- walkResults();
- } catch(Exception e) {
- TestCase.assertTrue(e.getMessage().endsWith("is not entitled to action <Read> for 1 or more of the groups/elements/procedures.")); //$NON-NLS-1$
- }
- closeConnection();
-
- getConnection(VDB, DQP_PROP_FILE, "user=paul;password=mm"); //$NON-NLS-1$
- execute("select intkey, stringkey from BQT1.smalla"); //$NON-NLS-1$
- assertRowCount(50);
- closeConnection();
-
- getConnection(VDB, DQP_PROP_FILE, "user=paul;password=mm"); //$NON-NLS-1$
- try {
- execute("select * from BQT1.smalla"); //$NON-NLS-1$
- walkResults();
- } catch(Exception e) {
- TestCase.assertTrue(e.getMessage().endsWith("is not entitled to action <Read> for 1 or more of the groups/elements/procedures.")); //$NON-NLS-1$
- }
- closeConnection();
- }
-
-}
Deleted: trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestEmbeddedShutdown.java
===================================================================
--- trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestEmbeddedShutdown.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestEmbeddedShutdown.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,38 +0,0 @@
-package com.metamatrix.server.integration;
-
-import java.sql.Connection;
-
-import junit.framework.TestCase;
-
-import org.junit.Test;
-
-import com.metamatrix.core.util.UnitTestUtil;
-import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
-
-
-public class TestEmbeddedShutdown extends AbstractMMQueryTestCase {
-
- private static final String DQP_PROP_FILE = UnitTestUtil.getTestDataPath() + "/authcheck/bqt.properties;"; //$NON-NLS-1$
- private static final String VDB = "bqt"; //$NON-NLS-1$
-
-
- @Test public void testShutdown() {
- try {
- Connection conn = getConnection(VDB, DQP_PROP_FILE, "user=admin;password=teiid;"); //$NON-NLS-1$
- execute("select intkey, stringkey from BQT1.smalla"); //$NON-NLS-1$
- walkResults();
-
- try {
- getConnection(VDB, DQP_PROP_FILE, "user=admin;password=teiid;shutdown=true"); //$NON-NLS-1$
- TestCase.fail("should have failed to connect, as this is request for shutdown"); //$NON-NLS-1$
- }catch(Exception e) {
- //pass
- }
- if (!conn.isClosed()) {
- TestCase.fail("should have closed"); //$NON-NLS-1$
- }
- } catch (Exception e) {
- }
- }
-
-}
Deleted: trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestTPCR.java
===================================================================
--- trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestTPCR.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestTPCR.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,212 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-package com.metamatrix.server.integration;
-
-import java.math.BigDecimal;
-import java.util.Arrays;
-import java.util.List;
-
-import org.teiid.connector.jdbc.oracle.OracleCapabilities;
-import org.teiid.connector.jdbc.sqlserver.SqlServerCapabilities;
-import org.teiid.dqp.internal.datamgr.CapabilitiesConverter;
-
-import com.metamatrix.core.util.UnitTestUtil;
-import com.metamatrix.query.metadata.QueryMetadataInterface;
-import com.metamatrix.query.optimizer.TestOptimizer;
-import com.metamatrix.query.optimizer.TestOptimizer.ComparisonMode;
-import com.metamatrix.query.optimizer.capabilities.FakeCapabilitiesFinder;
-import com.metamatrix.query.processor.HardcodedDataManager;
-import com.metamatrix.query.processor.ProcessorPlan;
-import com.metamatrix.query.unittest.TimestampUtil;
-
-
-/**
- * @since 4.2
- */
-public class TestTPCR extends BaseQueryTest {
-
- private static final boolean DEBUG = false;
-
- private static final QueryMetadataInterface METADATA = createMetadata(UnitTestUtil.getTestDataPath()+"/tpcr/TPC_R.vdb"); //$NON-NLS-1$
-
- public TestTPCR(String name) {
- super(name);
- }
-
- /**
- * Will create a full push down query
- */
- public void testQuery3() throws Exception{
- FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
- finder.addCapabilities("TPCR_Oracle_9i", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
-
- HardcodedDataManager dataMgr = new HardcodedDataManager();
-
- List[] expected =
- new List[] { Arrays.asList(new Object[] { new Double(2456423.0), new BigDecimal("406181.0111"), TimestampUtil.createDate(95, 2, 5), new Double(0.0) }), //$NON-NLS-1$
- Arrays.asList(new Object[] { new Double(3459808.0), new BigDecimal("405838.6989"), TimestampUtil.createDate(95, 2, 4), new Double(0.0) }), //$NON-NLS-1$
- Arrays.asList(new Object[] { new Double(492164.0), new BigDecimal("390324.0610"), TimestampUtil.createDate(95, 1, 19), new Double(0.0) }) }; //$NON-NLS-1$
-
- dataMgr.addData("SELECT g_2.l_orderkey AS c_0, SUM((g_2.l_extendedprice * (1 - g_2.l_discount))) AS c_1, g_1.o_orderdate AS c_2, g_1.o_shippriority AS c_3 FROM TPCR_Oracle_9i.CUSTOMER AS g_0, TPCR_Oracle_9i.ORDERS AS g_1, TPCR_Oracle_9i.LINEITEM AS g_2 WHERE (g_0.c_custkey = g_1.o_custkey) AND (g_2.l_orderkey = g_1.o_orderkey) AND (g_0.c_mktsegment = 'BUILDING') AND (g_1.o_orderdate < {d'1995-03-15'}) AND (g_2.l_shipdate > {ts'1995-03-15 00:00:00.0'}) GROUP BY g_2.l_orderkey, g_1.o_orderdate, g_1.o_shippriority ORDER BY c_1 DESC, c_2", //$NON-NLS-1$
- expected);
-
- doProcess(METADATA,
- "select l_orderkey, sum(l_extendedprice*(1-l_discount)) as revenue, o_orderdate, o_shippriority " + //$NON-NLS-1$
- "from customer, orders, lineitem " + //$NON-NLS-1$
- "where c_mktsegment = 'BUILDING' and c_custkey = o_custkey and l_orderkey = o_orderkey " + //$NON-NLS-1$
- "and o_orderdate < {ts'1995-03-15 00:00:00'} " + //$NON-NLS-1$
- "and l_shipdate > {ts'1995-03-15 00:00:00'} " + //$NON-NLS-1$
- "group by l_orderkey, o_orderdate, o_shippriority " + //$NON-NLS-1$
- "order by revenue desc, o_orderdate", //$NON-NLS-1$
- finder, dataMgr, expected, DEBUG);
-
- }
-
- public void testQueryCase3042() throws Exception{
- FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
- finder.addCapabilities("TPCR_Ora", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
-
- HardcodedDataManager dataMgr = new HardcodedDataManager();
- List[] expected =
- new List[] { Arrays.asList(new Object[] { new Integer(5) } ) };
-
- dataMgr.addData("SELECT COUNT(*) FROM TPCR_Ora.CUSTOMER AS g_0 LEFT OUTER JOIN TPCR_Ora.ORDERS AS g_1 ON g_0.C_CUSTKEY = g_1.O_CUSTKEY WHERE (g_1.O_ORDERKEY IS NULL) OR ((g_1.O_ORDERDATE < {ts'1992-01-02 00:00:00.0'}) AND (g_0.C_ACCTBAL > 0))", //$NON-NLS-1$
- expected);
-
- doProcess(BaseQueryTest.createMetadata(UnitTestUtil.getTestDataPath()+"/tpcr/TPCR_3.vdb"), //$NON-NLS-1$
- "SELECT count (*) " + //$NON-NLS-1$
- "FROM TPCR_Ora.CUSTOMER LEFT OUTER JOIN TPCR_Ora.ORDERS ON C_CUSTKEY = O_CUSTKEY " + //$NON-NLS-1$
- "WHERE (O_ORDERKEY IS NULL) OR O_ORDERDATE < '1992-01-02 00:00:00' " + //$NON-NLS-1$
- "AND C_ACCTBAL > 0", //$NON-NLS-1$
- finder, dataMgr, expected, DEBUG);
-
- }
-
- /**
- * Test of case 3047 - need a query planner optimization to recognize when join clause criteria
- * could be migrated to WHERE clause of an atomic query, as long as the join is not being pushed
- * down. In this case, there is a left outer join. The join criteria includes
- * O_ORDERDATE < {ts'1992-01-02 00:00:00.0'} which is on the inner side of the outer join and
- * thus cannot normally be moved to the WHERE clause. However, since the join is cross-data
- * source, the join will be performed in MetaMatrix, and the above criteria could be moved to
- * the WHERE clause of the atomic query, since that WHERE clause will effectively still be
- * applied before the join is processed, and the results will be the same. This is what the
- * user wants to happen.
- * @throws Exception
- */
- public void testQueryCase3047() throws Exception{
- FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
- finder.addCapabilities("TPCR_Ora", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
- finder.addCapabilities("TPCR_SQLS", CapabilitiesConverter.convertCapabilities(new SqlServerCapabilities())); //$NON-NLS-1$
-
- HardcodedDataManager dataMgr = new HardcodedDataManager();
-
- List[] oracleExpected =
- new List[] { Arrays.asList(new Object[] { new Long(5), "Bill", "101 Fake St.", "392839283", "21.12" } ), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- Arrays.asList(new Object[] { new Long(6), "Stu", "102 Fake St.", "385729385", "51.50" } )}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- dataMgr.addData("SELECT g_0.C_CUSTKEY AS c_0, g_0.C_NAME AS c_1, g_0.C_ADDRESS AS c_2, g_0.C_PHONE AS c_3, g_0.C_ACCTBAL AS c_4 FROM TPCR_Ora.CUSTOMER AS g_0 WHERE g_0.C_ACCTBAL > 50 ORDER BY c_0", //$NON-NLS-1$
- oracleExpected);
-
- List[] sqlServerExpected =
- new List[] { Arrays.asList(new Object[] { new Integer(5), new Integer(12), new Long(5) } ),
- Arrays.asList(new Object[] { new Integer(5), new Integer(13), new Long(5) } )};
- dataMgr.addData("SELECT g_0.O_CUSTKEY AS c_0, g_0.O_ORDERKEY AS c_1, g_0.O_CUSTKEY AS c_2 FROM TPCR_SQLS.ORDERS AS g_0 WHERE g_0.O_ORDERDATE < {ts'1992-01-02 00:00:00.0'} ORDER BY c_2", //$NON-NLS-1$
- sqlServerExpected);
-
- List[] expected =
- new List[] { Arrays.asList(new Object[] { new Long(5), "Bill", "101 Fake St.", "392839283", "21.12", new Integer(12) } ), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- Arrays.asList(new Object[] { new Long(5), "Bill", "101 Fake St.", "392839283", "21.12", new Integer(13) } ), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- Arrays.asList(new Object[] { new Long(6), "Stu", "102 Fake St.", "385729385", "51.50", null } )}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- doProcess(BaseQueryTest.createMetadata(UnitTestUtil.getTestDataPath()+"/tpcr/TPCR_3.vdb"), //$NON-NLS-1$
- "SELECT C_CUSTKEY, C_NAME, C_ADDRESS, C_PHONE, C_ACCTBAL, O_ORDERKEY FROM TPCR_Ora.CUSTOMER " + //$NON-NLS-1$
- "LEFT OUTER JOIN TPCR_SQLS.ORDERS ON C_CUSTKEY = O_CUSTKEY " + //$NON-NLS-1$
- "AND O_ORDERDATE < {ts'1992-01-02 00:00:00.0'} " + //$NON-NLS-1$
- "WHERE (C_ACCTBAL > 50)", //$NON-NLS-1$
- finder, dataMgr, expected, DEBUG);
-
- }
-
- /**
- * Confirm the workaround for case 3047 (using an inline view to get the desired piece
- * of criteria pushed down)
- * @throws Exception
- * @since 4.3
- */
- public void testQueryCase3047workaround() throws Exception{
- FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
- finder.addCapabilities("TPCR_Ora", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
- finder.addCapabilities("TPCR_SQLS", CapabilitiesConverter.convertCapabilities(new SqlServerCapabilities())); //$NON-NLS-1$
-
- HardcodedDataManager dataMgr = new HardcodedDataManager();
-
- List[] oracleExpected =
- new List[] { Arrays.asList(new Object[] { new Long(5), "Bill", "101 Fake St.", "392839283", "51.12" } ), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- Arrays.asList(new Object[] { new Long(6), "Stu", "102 Fake St.", "385729385", "51.50" } )}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- dataMgr.addData("SELECT g_0.C_CUSTKEY AS c_0, g_0.C_NAME AS c_1, g_0.C_ADDRESS AS c_2, g_0.C_PHONE AS c_3, g_0.C_ACCTBAL AS c_4 FROM TPCR_Ora.CUSTOMER AS g_0 WHERE g_0.C_ACCTBAL > 50 ORDER BY c_0", //$NON-NLS-1$
- oracleExpected);
-
- List[] sqlServerExpected =
- new List[] { Arrays.asList(new Object[] { new Integer(5), new Integer(12), new Long(5) } ),
- Arrays.asList(new Object[] { new Integer(5), new Integer(13), new Long(5) } )};
- dataMgr.addData("SELECT g_0.O_CUSTKEY AS c_0, g_0.O_ORDERKEY AS c_1, g_0.O_CUSTKEY AS c_2 FROM TPCR_SQLS.ORDERS AS g_0 WHERE g_0.O_ORDERDATE < {ts'1992-01-02 00:00:00.0'} ORDER BY c_2", //$NON-NLS-1$
- sqlServerExpected);
-
- List[] expected =
- new List[] { Arrays.asList(new Object[] { new Long(5), "Bill", "101 Fake St.", "392839283", "51.12", new Integer(12) } ), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- Arrays.asList(new Object[] { new Long(5), "Bill", "101 Fake St.", "392839283", "51.12", new Integer(13) } ), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- Arrays.asList(new Object[] { new Long(6), "Stu", "102 Fake St.", "385729385", "51.50", null } )}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- doProcess(BaseQueryTest.createMetadata(UnitTestUtil.getTestDataPath()+"/tpcr/TPCR_3.vdb"), //$NON-NLS-1$
- "SELECT C_CUSTKEY, C_NAME, C_ADDRESS, C_PHONE, C_ACCTBAL, O_ORDERKEY FROM TPCR_Ora.CUSTOMER " + //$NON-NLS-1$
- "LEFT OUTER JOIN " + //$NON-NLS-1$
- "(SELECT O_CUSTKEY, O_ORDERKEY FROM TPCR_SQLS.ORDERS WHERE O_ORDERDATE < {ts'1992-01-02 00:00:00.0'}) AS X " + //$NON-NLS-1$
- "ON C_CUSTKEY = O_CUSTKEY " + //$NON-NLS-1$
- "WHERE (C_ACCTBAL > 50)", //$NON-NLS-1$
- finder, dataMgr, expected, DEBUG);
-
- }
-
- public void testQuery22() throws Exception{
- FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
- finder.addCapabilities("TPCR_Oracle_9i", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
-
- ProcessorPlan plan = TestOptimizer.helpPlan("SELECT custsale.cntrycode, COUNT(*) AS numcust, SUM(c_acctbal) AS totacctbal FROM (SELECT left(C_PHONE, 2) AS cntrycode, CUSTOMER.C_ACCTBAL FROM CUSTOMER WHERE (left(C_PHONE, 2) IN ('13','31','23','29','30','18','17')) AND (CUSTOMER.C_ACCTBAL > (SELECT AVG(CUSTOMER.C_ACCTBAL) FROM CUSTOMER WHERE (CUSTOMER.C_ACCTBAL > 0.0) AND (left(C_PHONE, 2) IN ('13','31','23','29','30','18','17')))) AND (NOT (EXISTS (SELECT * FROM ORDERS WHERE O_CUSTKEY = C_CUSTKEY)))) AS custsale GROUP BY custsale.cntrycode ORDER BY custsale.cntrycode", //$NON-NLS-1$
- METADATA, null, finder,
- new String[] {"SELECT v_0.c_0, COUNT(*) AS c_1, SUM(v_0.c_1) AS c_2 FROM (SELECT left(g_0.C_PHONE, 2) AS c_0, g_0.C_ACCTBAL AS c_1 FROM TPCR_Oracle_9i.CUSTOMER AS g_0 WHERE (left(g_0.C_PHONE, 2) IN ('13', '31', '23', '29', '30', '18', '17')) AND (g_0.C_ACCTBAL > (SELECT AVG(g_1.C_ACCTBAL) FROM TPCR_Oracle_9i.CUSTOMER AS g_1 WHERE (g_1.C_ACCTBAL > 0.0) AND (left(g_1.C_PHONE, 2) IN ('13', '31', '23', '29', '30', '18', '17')))) AND (NOT (EXISTS (SELECT g_2.O_ORDERKEY, g_2.O_CUSTKEY, g_2.O_ORDERSTATUS, g_2.O_TOTALPRICE, g_2.O_ORDERDATE, g_2.O_ORDERPRIORITY, g_2.O_CLERK, g_2.O_SHIPPRIORITY, g_2.O_COMMENT FROM TPCR_Oracle_9i.ORDERS AS g_2 WHERE g_2.O_CUSTKEY = g_0.C_CUSTKEY)))) AS v_0 GROUP BY v_0.c_0 ORDER BY c_0"}, true); //$NON-NLS-1$
- TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
- TestOptimizer.checkSubPlanCount(plan, 0);
- }
-
- public void testDefect22475() throws Exception {
- FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
- finder.addCapabilities("TPCR_Oracle_9i", CapabilitiesConverter.convertCapabilities(new SqlServerCapabilities())); //$NON-NLS-1$
-
- ProcessorPlan plan = TestOptimizer.helpPlan("select S_ACCTBAL, S_NAME, N_NAME, P_PARTKEY, P_MFGR, S_ADDRESS, S_PHONE, S_COMMENT from (SELECT SUPPLIER.S_ACCTBAL, SUPPLIER.S_NAME, NATION.N_NAME, PART.P_PARTKEY, PART.P_MFGR, SUPPLIER.S_ADDRESS, SUPPLIER.S_PHONE, SUPPLIER.S_COMMENT FROM PART, SUPPLIER, PARTSUPP, NATION, REGION WHERE (PART.P_PARTKEY = PS_PARTKEY) AND (S_SUPPKEY = PS_SUPPKEY) AND (P_SIZE = 15) AND (P_TYPE LIKE '%BRASS') AND (S_NATIONKEY = N_NATIONKEY) AND (N_REGIONKEY = R_REGIONKEY) AND (R_NAME = 'EUROPE') AND (PS_SUPPLYCOST = (SELECT MIN(PS_SUPPLYCOST) FROM PARTSUPP, SUPPLIER, NATION, REGION WHERE (PART.P_PARTKEY = PS_PARTKEY) AND (S_SUPPKEY = PS_SUPPKEY) AND (S_NATIONKEY = N_NATIONKEY) AND (N_REGIONKEY = R_REGIONKEY) AND (R_NAME = 'EUROPE'))) ORDER BY SUPPLIER.S_ACCTBAL DESC, NATION.N_NAME, SUPPLIER.S_NAME, PART.P_PARTKEY) as x", //$NON-NLS-1$
- METADATA, null, finder,
- new String[] {"SELECT g_1.S_ACCTBAL, g_1.S_NAME, g_3.N_NAME, g_0.P_PARTKEY, g_0.P_MFGR, g_1.S_ADDRESS, g_1.S_PHONE, g_1.S_COMMENT FROM TPCR_Oracle_9i.PART AS g_0, TPCR_Oracle_9i.SUPPLIER AS g_1, TPCR_Oracle_9i.PARTSUPP AS g_2, TPCR_Oracle_9i.NATION AS g_3, TPCR_Oracle_9i.REGION AS g_4 WHERE (g_3.N_REGIONKEY = g_4.R_REGIONKEY) AND (g_1.S_NATIONKEY = g_3.N_NATIONKEY) AND (g_1.S_SUPPKEY = g_2.PS_SUPPKEY) AND (g_0.P_PARTKEY = g_2.PS_PARTKEY) AND (g_2.PS_SUPPLYCOST = (SELECT MIN(g_5.PS_SUPPLYCOST) FROM TPCR_Oracle_9i.PARTSUPP AS g_5, TPCR_Oracle_9i.SUPPLIER AS g_6, TPCR_Oracle_9i.NATION AS g_7, TPCR_Oracle_9i.REGION AS g_8 WHERE (g_6.S_SUPPKEY = g_5.PS_SUPPKEY) AND (g_6.S_NATIONKEY = g_7.N_NATIONKEY) AND (g_7.N_REGIONKEY = g_8.R_REGIONKEY) AND (g_5.PS_PARTKEY = g_0.P_PARTKEY) AND (g_8.R_NAME = 'EUROPE'))) AND (g_0.P_SIZE = 15.0) AND (g_0.P_TYPE LIKE '%BRASS') AND (g_4.R_NAME = 'EUROPE')"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
- TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN);
- }
-
-}
Deleted: trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestVDBLessExecution.java
===================================================================
--- trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestVDBLessExecution.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestVDBLessExecution.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,275 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.server.integration;
-
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-
-import org.junit.Test;
-
-import com.metamatrix.core.util.UnitTestUtil;
-import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
-
-/**
- * Test the DatabaseMetadata results using the Parts VDB.
- */
-public class TestVDBLessExecution extends AbstractMMQueryTestCase {
-
- private static final String DQP_PROP_FILE = UnitTestUtil.getTestDataPath() + "/vdbless/dqp.properties;user=test"; //$NON-NLS-1$
- private static final String VDB = "VDBLess"; //$NON-NLS-1$
-
- @Test public void testExecution() {
- getConnection(VDB, DQP_PROP_FILE);
- executeAndAssertResults("select * from Example", new String[] { //$NON-NLS-1$
- "TRADEID[string] NOTIONAL[integer]", //$NON-NLS-1$
- "x 1", //$NON-NLS-1$
- "y 2" //$NON-NLS-1$
-
- });
- closeConnection();
- }
-
- @Test public void testIntegrationExecution() {
- getConnection(VDB, DQP_PROP_FILE);
- executeAndAssertResults("select * from Example, Smalla where notional = intkey", new String[] { //$NON-NLS-1$
- "TRADEID[string] NOTIONAL[integer] INTKEY[integer] STRINGKEY[string] INTNUM[integer] STRINGNUM[string] FLOATNUM[float] LONGNUM[long] DOUBLENUM[double] BYTENUM[short] DATEVALUE[date] TIMEVALUE[time] TIMESTAMPVALUE[timestamp] BOOLEANVALUE[short] CHARVALUE[string] SHORTVALUE[short] BIGINTEGERVALUE[long] BIGDECIMALVALUE[bigdecimal] OBJECTVALUE[string]", //$NON-NLS-1$
- "x 1 1 1 -23 null -23.0 -23 -23.0 -127 2000-01-02 01:00:00 2000-01-01 00:00:01.0 1 0 -32767 -23 -23 -23", //$NON-NLS-1$
- "y 2 2 2 -22 -22 null -22 -22.0 -126 2000-01-03 02:00:00 2000-01-01 00:00:02.0 0 1 -32766 -22 -22 -22", //$NON-NLS-1$
- });
- closeConnection();
- }
-
- /**
- * We have no results to assert here since derby does not provide procedure resultset columns in their metadata.
- */
- @Test public void testProcedureExecution() {
- getConnection(VDB, DQP_PROP_FILE);
- execute("exec Derby.SQLUDTS(null, null, null, null, null)"); //$NON-NLS-1$
- closeConnection();
- }
-
- @Test public void testDatabaseMetaDataTables() throws Exception {
- Connection conn = getConnection(VDB, DQP_PROP_FILE);
- DatabaseMetaData metadata = conn.getMetaData();
- this.internalResultSet = metadata.getTables(null, "SummitData", null, new String[] {"TABLE"}); //$NON-NLS-1$ //$NON-NLS-2$
- assertResults(new String[] {
- "TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] TABLE_TYPE[string] REMARKS[string] TYPE_CAT[string] TYPE_SCHEM[string] TYPE_NAME[string] SELF_REFERENCING_COL_NAME[string] REF_GENERATION[string] ISPHYSICAL[boolean]", //$NON-NLS-1$
- "VDBLess SummitData EXAMPLE TABLE null null null null null null true" //$NON-NLS-1$
- });
- closeConnection();
- }
-
- /**
- * Ensures that system tables are still visible
- */
- @Test public void testDatabaseMetaDataTables1() throws Exception {
- Connection conn = getConnection(VDB, DQP_PROP_FILE);
- DatabaseMetaData metadata = conn.getMetaData();
- this.internalResultSet = metadata.getTables(null, null, "%Properties", null); //$NON-NLS-1$
- assertResults(new String[] {
- "TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] TABLE_TYPE[string] REMARKS[string] TYPE_CAT[string] TYPE_SCHEM[string] TYPE_NAME[string] SELF_REFERENCING_COL_NAME[string] REF_GENERATION[string] ISPHYSICAL[boolean]", //$NON-NLS-1$
- "VDBLess System Properties SYSTEM TABLE null null null null null null true" //$NON-NLS-1$
-
- });
- closeConnection();
- }
-
- @Test public void testDatabaseMetaDataColumns() throws Exception {
- Connection conn = getConnection(VDB, DQP_PROP_FILE);
- DatabaseMetaData metadata = conn.getMetaData();
- this.internalResultSet = metadata.getColumns(null, "SummitData", null, "%"); //$NON-NLS-1$ //$NON-NLS-2$
- assertResults(new String[] {
- "TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] COLUMN_NAME[string] DATA_TYPE[short] TYPE_NAME[string] COLUMN_SIZE[integer] BUFFER_LENGTH[string] DECIMAL_DIGITS[integer] NUM_PREC_RADIX[integer] NULLABLE[integer] REMARKS[string] COLUMN_DEF[string] SQL_DATA_TYPE[string] SQL_DATETIME_SUB[string] CHAR_OCTET_LENGTH[integer] ORDINAL_POSITION[integer] IS_NULLABLE[string] SCOPE_CATALOG[string] SCOPE_SCHEMA[string] SCOPE_TABLE[string] SOURCE_DATA_TYPE[string] IS_AUTOINCREMENT[string]", //$NON-NLS-1$
- "VDBLess SummitData EXAMPLE TRADEID 12 string 4000 null 0 0 2 null null null null 0 1 null null null null NO", //$NON-NLS-1$
- "VDBLess SummitData EXAMPLE NOTIONAL 4 integer 10 null 0 0 2 null null null null 0 2 null null null null NO", //$NON-NLS-1$
- });
- closeConnection();
- }
-
- @Test public void testDatabaseMetaDataColumns1() throws Exception {
- Connection conn = getConnection(VDB, DQP_PROP_FILE);
- DatabaseMetaData metadata = conn.getMetaData();
- this.internalResultSet = metadata.getColumns(null, null, "%smalla", "%"); //$NON-NLS-1$ //$NON-NLS-2$
- assertResults(new String[] {
- "TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] COLUMN_NAME[string] DATA_TYPE[short] TYPE_NAME[string] COLUMN_SIZE[integer] BUFFER_LENGTH[string] DECIMAL_DIGITS[integer] NUM_PREC_RADIX[integer] NULLABLE[integer] REMARKS[string] COLUMN_DEF[string] SQL_DATA_TYPE[string] SQL_DATETIME_SUB[string] CHAR_OCTET_LENGTH[integer] ORDINAL_POSITION[integer] IS_NULLABLE[string] SCOPE_CATALOG[string] SCOPE_SCHEMA[string] SCOPE_TABLE[string] SOURCE_DATA_TYPE[string] IS_AUTOINCREMENT[string]", //$NON-NLS-1$
- "VDBLess Derby SMALLA INTKEY 4 integer 10 null 0 10 0 null null null 0 1 YES null null null null NO", //$NON-NLS-1$
- "VDBLess Derby SMALLA STRINGKEY 12 string 4000 null 0 0 0 null null null 20 2 YES null null null null NO", //$NON-NLS-1$
- "VDBLess Derby SMALLA INTNUM 4 integer 10 null 0 10 1 null null null 0 3 NO null null null null NO", //$NON-NLS-1$
- "VDBLess Derby SMALLA STRINGNUM 12 string 4000 null 0 0 1 null null null 20 4 NO null null null null NO", //$NON-NLS-1$
- "VDBLess Derby SMALLA FLOATNUM 7 float 20 null 0 2 1 null null null 0 5 NO null null null null NO", //$NON-NLS-1$
- "VDBLess Derby SMALLA LONGNUM -5 long 19 null 0 10 1 null null null 0 6 NO null null null null NO", //$NON-NLS-1$
- "VDBLess Derby SMALLA DOUBLENUM 8 double 20 null 0 2 1 null null null 0 7 NO null null null null NO", //$NON-NLS-1$
- "VDBLess Derby SMALLA BYTENUM 5 short 5 null 0 10 1 null null null 0 8 NO null null null null NO", //$NON-NLS-1$
- "VDBLess Derby SMALLA DATEVALUE 91 date 10 null 0 10 1 null null null 0 9 NO null null null null NO", //$NON-NLS-1$
- "VDBLess Derby SMALLA TIMEVALUE 92 time 8 null 0 10 1 null null null 0 10 NO null null null null NO", //$NON-NLS-1$
- "VDBLess Derby SMALLA TIMESTAMPVALUE 93 timestamp 29 null 0 10 1 null null null 0 11 NO null null null null NO", //$NON-NLS-1$
- "VDBLess Derby SMALLA BOOLEANVALUE 5 short 5 null 0 10 1 null null null 0 12 NO null null null null NO", //$NON-NLS-1$
- "VDBLess Derby SMALLA CHARVALUE 12 string 4000 null 0 0 1 null null null 2 13 NO null null null null NO", //$NON-NLS-1$
- "VDBLess Derby SMALLA SHORTVALUE 5 short 5 null 0 10 1 null null null 0 14 NO null null null null NO", //$NON-NLS-1$
- "VDBLess Derby SMALLA BIGINTEGERVALUE -5 long 19 null 0 10 1 null null null 0 15 NO null null null null NO", //$NON-NLS-1$
- "VDBLess Derby SMALLA BIGDECIMALVALUE 2 bigdecimal 20 null 0 10 1 null null null 0 16 NO null null null null NO", //$NON-NLS-1$
- "VDBLess Derby SMALLA OBJECTVALUE 12 string 4000 null 0 0 1 null null null 4096 17 NO null null null null NO", //$NON-NLS-1$
- });
- closeConnection();
- }
-
- @Test public void testDatabaseMetaDataPrimaryKeys() throws Exception {
- Connection conn = getConnection(VDB, DQP_PROP_FILE);
- DatabaseMetaData metadata = conn.getMetaData();
- //note - the use of null for the table name is a little against spec
- this.internalResultSet = metadata.getPrimaryKeys(null, null, null);
- assertResults(new String[] {
- "TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] COLUMN_NAME[string] KEY_SEQ[short] PK_NAME[string]", //$NON-NLS-1$
- "VDBLess Derby FLIGHTS FLIGHT_ID 1 SQL090709161814150", //$NON-NLS-1$
- "VDBLess Derby FLTAVAIL FLIGHT_ID 1 FLTAVAIL_PK", //$NON-NLS-1$
- "VDBLess Derby SMALLA INTKEY 1 SQL060110103634070", //$NON-NLS-1$
- "VDBLess Derby SMALLB INTKEY 1 SQL060110103635170", //$NON-NLS-1$
- "VDBLess Derby FLIGHTS SEGMENT_NUMBER 2 SQL090709161814150", //$NON-NLS-1$
- "VDBLess Derby FLTAVAIL SEGMENT_NUMBER 2 FLTAVAIL_PK", //$NON-NLS-1$
- });
- closeConnection();
- }
-
- @Test public void testDatabaseMetaDataExportedKeys() throws Exception {
- Connection conn = getConnection(VDB, DQP_PROP_FILE);
- DatabaseMetaData metadata = conn.getMetaData();
- this.internalResultSet = metadata.getExportedKeys("VDBLess", "Derby", "FLIGHTS"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- assertResults(new String[] {
- "PKTABLE_CAT[string] PKTABLE_SCHEM[string] PKTABLE_NAME[string] PKCOLUMN_NAME[string] FKTABLE_CAT[string] FKTABLE_SCHEM[string] FKTABLE_NAME[string] FKCOLUMN_NAME[string] KEY_SEQ[short] UPDATE_RULE[integer] DELETE_RULE[integer] FK_NAME[string] PK_NAME[string] DEFERRABILITY[integer]", //$NON-NLS-1$
- "VDBLess Derby FLIGHTS FLIGHT_ID VDBLess Derby FLTAVAIL FLIGHT_ID 1 3 3 FLTS_FK SQL090709161814150 5", //$NON-NLS-1$
- "VDBLess Derby FLIGHTS SEGMENT_NUMBER VDBLess Derby FLTAVAIL SEGMENT_NUMBER 2 3 3 FLTS_FK SQL090709161814150 5" //$NON-NLS-1$
- });
- closeConnection();
- }
-
- @Test public void testDatabaseMetaDataImportedKeys() throws Exception {
- Connection conn = getConnection(VDB, DQP_PROP_FILE);
- DatabaseMetaData metadata = conn.getMetaData();
- this.internalResultSet = metadata.getImportedKeys("VDBLess", "Derby", "FLTAVAIL"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- assertResults(new String[] {
- "PKTABLE_CAT[string] PKTABLE_SCHEM[string] PKTABLE_NAME[string] PKCOLUMN_NAME[string] FKTABLE_CAT[string] FKTABLE_SCHEM[string] FKTABLE_NAME[string] FKCOLUMN_NAME[string] KEY_SEQ[short] UPDATE_RULE[integer] DELETE_RULE[integer] FK_NAME[string] PK_NAME[string] DEFERRABILITY[integer]", //$NON-NLS-1$
- "VDBLess Derby FLIGHTS FLIGHT_ID VDBLess Derby FLTAVAIL FLIGHT_ID 1 3 3 FLTS_FK SQL090709161814150 5", //$NON-NLS-1$
- "VDBLess Derby FLIGHTS SEGMENT_NUMBER VDBLess Derby FLTAVAIL SEGMENT_NUMBER 2 3 3 FLTS_FK SQL090709161814150 5" //$NON-NLS-1$
- });
- this.internalResultSet = metadata.getImportedKeys(null, "Derby", "SMALLBRIDGE"); //$NON-NLS-1$ //$NON-NLS-2$
- assertResults(new String[] {
- "PKTABLE_CAT[string] PKTABLE_SCHEM[string] PKTABLE_NAME[string] PKCOLUMN_NAME[string] FKTABLE_CAT[string] FKTABLE_SCHEM[string] FKTABLE_NAME[string] FKCOLUMN_NAME[string] KEY_SEQ[short] UPDATE_RULE[integer] DELETE_RULE[integer] FK_NAME[string] PK_NAME[string] DEFERRABILITY[integer]", //$NON-NLS-1$
- "VDBLess Derby SMALLA INTKEY VDBLess Derby SMALLBRIDGE AKEY 1 3 3 SMLA_FK SQL060110103634070 5", //$NON-NLS-1$
- "VDBLess Derby SMALLB INTKEY VDBLess Derby SMALLBRIDGE BKEY 1 3 3 SMLB_FK SQL060110103635170 5", //$NON-NLS-1$
- });
- closeConnection();
- }
-
- @Test public void testDatabaseMetaDataIndexInfo() throws Exception {
- Connection conn = getConnection(VDB, DQP_PROP_FILE);
- DatabaseMetaData metadata = conn.getMetaData();
- //note - the use of null for the table name is a little against spec
- this.internalResultSet = metadata.getIndexInfo(null, null, null, false, true);
- assertResults(new String[] {
- "TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] NON_UNIQUE[boolean] INDEX_QUALIFIER[string] INDEX_NAME[string] TYPE[integer] ORDINAL_POSITION[short] COLUMN_NAME[string] ASC_OR_DESC[string] CARDINALITY[integer] PAGES[integer] FILTER_CONDITION[string]", //$NON-NLS-1$
- "VDBLess Derby FLIGHTS false null ORIGINDEX 0 1 ORIG_AIRPORT null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby FLTAVAIL false null SQL090709161840271 0 1 FLIGHT_ID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby FLTAVAIL false null SQL090709161840271 0 2 SEGMENT_NUMBER null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SMALLBRIDGE false null SQL090710102514590 0 1 AKEY null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SMALLBRIDGE false null SQL090710102514591 0 1 BKEY null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSCOLUMNS false null SYSCOLUMNS_INDEX2 0 1 COLUMNDEFAULTID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSCONGLOMERATES false null SYSCONGLOMERATES_INDEX1 0 1 CONGLOMERATEID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSCONGLOMERATES false null SYSCONGLOMERATES_INDEX3 0 1 TABLEID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSCONSTRAINTS false null SYSCONSTRAINTS_INDEX3 0 1 TABLEID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSDEPENDS false null SYSDEPENDS_INDEX1 0 1 DEPENDENTID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSDEPENDS false null SYSDEPENDS_INDEX2 0 1 PROVIDERID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSFOREIGNKEYS false null SYSFOREIGNKEYS_INDEX2 0 1 KEYCONSTRAINTID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSSTATISTICS false null SYSSTATISTICS_INDEX1 0 1 TABLEID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSSTATISTICS false null SYSSTATISTICS_INDEX1 0 2 REFERENCEID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSTRIGGERS false null SYSTRIGGERS_INDEX3 0 1 TABLEID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSTRIGGERS false null SYSTRIGGERS_INDEX3 0 2 CREATIONTIMESTAMP null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SMALLA true null SQL060110103634070 0 1 INTKEY null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SMALLB true null SQL060110103635170 0 1 INTKEY null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby FLIGHTS true null SQL090709161814150 0 1 FLIGHT_ID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby FLIGHTS true null SQL090709161814150 0 2 SEGMENT_NUMBER null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby FLTAVAIL true null SQL090709161840270 0 1 FLIGHT_ID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby FLTAVAIL true null SQL090709161840270 0 2 SEGMENT_NUMBER null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSALIASES true null SYSALIASES_INDEX1 0 1 SCHEMAID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSALIASES true null SYSALIASES_INDEX1 0 2 ALIAS null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSALIASES true null SYSALIASES_INDEX1 0 3 NAMESPACE null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSALIASES true null SYSALIASES_INDEX2 0 1 ALIASID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSALIASES true null SYSALIASES_INDEX3 0 1 SCHEMAID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSALIASES true null SYSALIASES_INDEX3 0 2 SPECIFICNAME null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSCHECKS true null SYSCHECKS_INDEX1 0 1 CONSTRAINTID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSCOLUMNS true null SYSCOLUMNS_INDEX1 0 1 REFERENCEID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSCOLUMNS true null SYSCOLUMNS_INDEX1 0 2 COLUMNNAME null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSCONGLOMERATES true null SYSCONGLOMERATES_INDEX2 0 1 CONGLOMERATENAME null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSCONGLOMERATES true null SYSCONGLOMERATES_INDEX2 0 2 SCHEMAID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSCONSTRAINTS true null SYSCONSTRAINTS_INDEX1 0 1 CONSTRAINTID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSCONSTRAINTS true null SYSCONSTRAINTS_INDEX2 0 1 CONSTRAINTNAME null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSCONSTRAINTS true null SYSCONSTRAINTS_INDEX2 0 2 SCHEMAID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSFILES true null SYSFILES_INDEX1 0 1 FILENAME null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSFILES true null SYSFILES_INDEX1 0 2 SCHEMAID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSFILES true null SYSFILES_INDEX2 0 1 FILEID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSFOREIGNKEYS true null SYSFOREIGNKEYS_INDEX1 0 1 CONSTRAINTID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSKEYS true null SYSKEYS_INDEX1 0 1 CONSTRAINTID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSSCHEMAS true null SYSSCHEMAS_INDEX1 0 1 SCHEMANAME null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSSCHEMAS true null SYSSCHEMAS_INDEX2 0 1 SCHEMAID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSSTATEMENTS true null SYSSTATEMENTS_INDEX1 0 1 STMTID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSSTATEMENTS true null SYSSTATEMENTS_INDEX2 0 1 STMTNAME null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSSTATEMENTS true null SYSSTATEMENTS_INDEX2 0 2 SCHEMAID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSTABLES true null SYSTABLES_INDEX1 0 1 TABLENAME null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSTABLES true null SYSTABLES_INDEX1 0 2 SCHEMAID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSTABLES true null SYSTABLES_INDEX2 0 1 TABLEID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSTRIGGERS true null SYSTRIGGERS_INDEX1 0 1 TRIGGERID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSTRIGGERS true null SYSTRIGGERS_INDEX2 0 1 TRIGGERNAME null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSTRIGGERS true null SYSTRIGGERS_INDEX2 0 2 SCHEMAID null 0 1 null", //$NON-NLS-1$
- "VDBLess Derby SYSVIEWS true null SYSVIEWS_INDEX1 0 1 TABLEID null 0 1 null", //$NON-NLS-1$
- });
- closeConnection();
- }
-
- @Test public void testDatabaseMetaDataProcedures() throws Exception {
- Connection conn = getConnection(VDB, DQP_PROP_FILE);
- DatabaseMetaData metadata = conn.getMetaData();
- this.internalResultSet = metadata.getProcedures(null, "Derby", "%JAR"); //$NON-NLS-1$ //$NON-NLS-2$
- assertResults(new String[] {
- "PROCEDURE_CAT[string] PROCEDURE_SCHEM[string] PROCEDURE_NAME[string] RESERVED_1[string] RESERVED_2[string] RESERVED_3[string] REMARKS[string] PROCEDURE_TYPE[short] SPECIFIC_NAME[string]", //$NON-NLS-1$
- "VDBLess Derby INSTALL_JAR null null null null 1 INSTALL_JAR", //$NON-NLS-1$
- "VDBLess Derby REMOVE_JAR null null null null 1 REMOVE_JAR", //$NON-NLS-1$
- "VDBLess Derby REPLACE_JAR null null null null 1 REPLACE_JAR", //$NON-NLS-1$
- });
- closeConnection();
- }
-
- @Test public void testDatabaseMetaDataProcedureColumns() throws Exception {
- Connection conn = getConnection(VDB, DQP_PROP_FILE);
- DatabaseMetaData metadata = conn.getMetaData();
- this.internalResultSet = metadata.getProcedureColumns(null, "Derby", "SQLUDTS", null); //$NON-NLS-1$ //$NON-NLS-2$
- assertResults(new String[] {
- "PROCEDURE_CAT[string] PROCEDURE_SCHEM[string] PROCEDURE_NAME[string] COLUMN_NAME[string] COLUMN_TYPE[short] DATA_TYPE[integer] TYPE_NAME[string] PRECISION[integer] LENGTH[integer] SCALE[short] RADIX[integer] NULLABLE[integer] REMARKS[string] COLUMN_DEF[string] SQL_DATA_TYPE[string] SQL_DATETIME_SUB[string] CHAR_OCTET_LENGTH[string] ORDINAL_POSITION[integer] IS_NULLABLE[string] SPECIFIC_NAME[string]", //$NON-NLS-1$
- "VDBLess Derby SQLUDTS CATALOGNAME 1 12 string 128 256 0 0 1 null null null null null 1 YES SQLUDTS", //$NON-NLS-1$
- "VDBLess Derby SQLUDTS SCHEMAPATTERN 1 12 string 128 256 0 0 1 null null null null null 2 YES SQLUDTS", //$NON-NLS-1$
- "VDBLess Derby SQLUDTS TYPENAMEPATTERN 1 12 string 128 256 0 0 1 null null null null null 3 YES SQLUDTS", //$NON-NLS-1$
- "VDBLess Derby SQLUDTS UDTTYPES 1 12 string 128 256 0 0 1 null null null null null 4 YES SQLUDTS", //$NON-NLS-1$
- "VDBLess Derby SQLUDTS OPTIONS 1 12 string 4000 8000 0 0 1 null null null null null 5 YES SQLUDTS", //$NON-NLS-1$
- });
- closeConnection();
- }
-
-}
Deleted: trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestXMLTypeTranslations.java
===================================================================
--- trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestXMLTypeTranslations.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestXMLTypeTranslations.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,86 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.server.integration;
-
-import java.math.BigInteger;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.teiid.connector.jdbc.oracle.OracleCapabilities;
-import org.teiid.dqp.internal.datamgr.CapabilitiesConverter;
-
-import com.metamatrix.core.util.UnitTestUtil;
-import com.metamatrix.query.metadata.QueryMetadataInterface;
-import com.metamatrix.query.optimizer.capabilities.FakeCapabilitiesFinder;
-import com.metamatrix.query.processor.HardcodedDataManager;
-import com.metamatrix.query.unittest.TimestampUtil;
-
-public class TestXMLTypeTranslations extends BaseQueryTest {
-
- private static final boolean DEBUG = false;
-
- public TestXMLTypeTranslations(String name) {
- super(name);
- }
-
- //NOTE that the gMonth and gDay values are invalid (but properly formatted)
- public void testXSDTranslations() throws Exception {
- FakeCapabilitiesFinder finder = new FakeCapabilitiesFinder();
- finder.addCapabilities("sample", CapabilitiesConverter.convertCapabilities(new OracleCapabilities())); //$NON-NLS-1$
-
- QueryMetadataInterface metadata = createMetadata(UnitTestUtil.getTestDataPath()+"/xmltypes/test.vdb"); //$NON-NLS-1$
-
- String sql = "select * from testdocument.testDocument"; //$NON-NLS-1$
-
- HardcodedDataManager dataMgr = new HardcodedDataManager();
-
- Set models = new HashSet();
- models.add("sample"); //$NON-NLS-1$
- dataMgr.setValidModels(models);
-
- dataMgr.addData("SELECT g_0.\"timestamp\", g_0.\"double\", g_0.\"float\", convert(g_0.\"double\", biginteger), convert(g_0.\"double\", biginteger), convert(g_0.\"date\", timestamp), convert(g_0.\"double\", biginteger), convert(g_0.\"date\", timestamp), '1' FROM sample.RUNTIMEVALUE AS g_0", //$NON-NLS-1$
-
- new List[] { Arrays.asList(new Object[] {
- TimestampUtil.createTimestamp(3, 3, 4, 5, 6, 10, 200),
- new Double(Double.NEGATIVE_INFINITY),
- new Float(Float.POSITIVE_INFINITY),
- new BigInteger("100"), //$NON-NLS-1$
- new BigInteger("100"), //$NON-NLS-1$
- TimestampUtil.createTimestamp(3, 3, 4, 5, 6, 7, 0),
- new BigInteger("100"), //$NON-NLS-1$
- TimestampUtil.createTimestamp(3, 3, 4, 5, 6, 7, 0),
- "1" //$NON-NLS-1$
- })});
-
-
- List[] expected = new List[] { Arrays.asList(new Object[] {"<?xml version=\"1.0\" encoding=\"UTF-8\"?><XSDTypesNS:test xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:XSDTypesNS=\"http://www.metamatrix.com/XMLSchema/DataSets/XSDTypes\"><book><datetime>1903-04-04T05:06:10.0000002</datetime><double>-INF</double><float>INF</float><gday>---100</gday><gmonth>--100</gmonth><gmonthday>--04-04</gmonthday><gyear>0100</gyear><gyearmonth>1903-04</gyearmonth><string>1</string></book></XSDTypesNS:test>" })}; //$NON-NLS-1$
- doProcess(metadata,
- sql,
- finder, dataMgr , expected, DEBUG);
-
- }
-
-
-}
Deleted: trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestXQueryServices.java
===================================================================
--- trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestXQueryServices.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestXQueryServices.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,68 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.server.integration;
-
-import java.sql.CallableStatement;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.SQLXML;
-import java.sql.Statement;
-
-import junit.framework.TestCase;
-
-import org.teiid.jdbc.TeiidDriver;
-
-import com.metamatrix.core.util.UnitTestUtil;
-import com.metamatrix.jdbc.MMSQLException;
-
-/**
- */
-public class TestXQueryServices extends TestCase {
-
- public TestXQueryServices(String testName) {
- super(testName);
- }
-
- /*
- * TOOD: it appears that this xquery vdb was built so that the procedure call was modeled with a return parameter.
- * This is then not an effective test of xquery, but shows how a procedure without a resultset should behave.
- */
- public void testXQueryCall() throws Exception {
- Class.forName(TeiidDriver.class.getName());
- Connection conn = DriverManager.getConnection("jdbc:metamatrix:xq@" + UnitTestUtil.getTestDataPath() + "/xquery/xquery.properties;txnAutoWrap=OFF;user=test" ); //$NON-NLS-1$ //$NON-NLS-2$
- CallableStatement cs = conn.prepareCall("{? = call xqs.test}"); //$NON-NLS-1$
- assertFalse(cs.execute());
- SQLXML xml = cs.getSQLXML(1);
- assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?><test/>", xml.toString()); //$NON-NLS-1$
-
- Statement stmt = conn.createStatement();
- try {
- stmt.executeQuery("exec xqs.test()"); //$NON-NLS-1$
- fail("exception expected"); //$NON-NLS-1$
- } catch (MMSQLException e) {
- assertEquals("Statement does not return a result set.", e.getMessage()); //$NON-NLS-1$
- }
- conn.close();
- }
-
-}
Deleted: trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestPartsDatabaseMetadata.java
===================================================================
--- trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestPartsDatabaseMetadata.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestPartsDatabaseMetadata.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,120 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.systemmodel;
-
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.metamatrix.core.util.UnitTestUtil;
-import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
-
-/**
- * Test the DatabaseMetadata results using the Parts VDB.
- */
-public class TestPartsDatabaseMetadata extends AbstractMMQueryTestCase {
-
- private static final String DQP_PROP_FILE = UnitTestUtil.getTestDataPath() + "/partssupplier/dqp.properties;user=test"; //$NON-NLS-1$
- private static final String VDB = "PartsSupplier"; //$NON-NLS-1$
-
- static DatabaseMetaData dbMetadata;
- static Connection connection;
-
- public TestPartsDatabaseMetadata() {
- // this is needed because the result files are generated
- // with another tool which uses tab as delimiter
- super.DELIMITER = "\t"; //$NON-NLS-1$
- }
-
- @Before public void setUp() throws SQLException {
- getConnection(VDB, DQP_PROP_FILE);
- dbMetadata = this.internalConnection.getMetaData();
- }
-
- @After public void tearDown() {
- closeConnection();
- }
-
- @Test public void testExportedKeys() throws Exception {
- checkResult("testExportedKeys", dbMetadata.getExportedKeys(VDB, null, "%")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- private void checkResult(String string, ResultSet exportedKeys) throws Exception {
- checkResult(string, exportedKeys, "partssupplier"); //$NON-NLS-1$
- }
-
- @Test public void testImportedKeys() throws Exception {
- checkResult("testImportedKeys", dbMetadata.getImportedKeys(VDB, null, "%")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Test public void testPrimaryKeys() throws Exception {
- checkResult("testPrimaryKeys", dbMetadata.getPrimaryKeys(VDB, null, "%")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Test public void testProcedures() throws Exception {
- checkResult("testProcedures", dbMetadata.getProcedures(VDB, null, "%")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Test public void testProcedureColumns() throws Exception {
- checkResult("testProcedureColumns", dbMetadata.getProcedureColumns(VDB, null, "%", "%")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- @Test public void testUDTs() throws Exception {
- checkResult("testUDTs", dbMetadata.getUDTs(VDB, null, "%", null)); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Test public void testIndexInfo() throws Exception {
- checkResult("testIndexInfo", dbMetadata.getIndexInfo(VDB, null, "%", true, true)); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Test public void testCrossReference() throws Exception {
- checkResult("testCrossReference", dbMetadata.getCrossReference(VDB, null, "%", VDB, null, "%")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- @Test public void testTypeInfo() throws Exception {
- checkResult("testTypeInfo",dbMetadata.getTypeInfo()); //$NON-NLS-1$
- }
-
- @Test public void testCatalogs() throws Exception {
- checkResult("testCatalogs", dbMetadata.getCatalogs()); //$NON-NLS-1$
- }
-
- @Test public void testSchemas() throws Exception {
- checkResult("testSchemas", dbMetadata.getSchemas()); //$NON-NLS-1$
- }
-
- @Test public void testTables() throws Exception {
- checkResult("testTables", dbMetadata.getTables(VDB, null, "%", null)); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Test public void testColumns() throws Exception {
- checkResult("testColumns", dbMetadata.getColumns(VDB, null, "%", "%")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-}
Deleted: trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestResultSetMetadata.java
===================================================================
--- trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestResultSetMetadata.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestResultSetMetadata.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,129 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.systemmodel;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.metamatrix.core.util.UnitTestUtil;
-import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
-
-public class TestResultSetMetadata extends AbstractMMQueryTestCase {
-
- private static final String DQP_PROP_FILE = UnitTestUtil.getTestDataPath() + "/partssupplier/dqp.properties;user=test"; //$NON-NLS-1$
- private static final String VDB = "PartsSupplier"; //$NON-NLS-1$
-
- public TestResultSetMetadata() {
- // this is needed because the result files are generated
- // with another tool which uses tab as delimiter
- super.DELIMITER = "\t"; //$NON-NLS-1$
- }
-
- @Before public void setUp() {
- getConnection(VDB, DQP_PROP_FILE);
- }
-
- @After public void tearDown() {
- closeConnection();
- }
-
- private void executeTest(String sql, String[] expected) throws Exception {
- execute(sql);
- java.sql.ResultSet rs = this.internalResultSet;
- assertResultsSetMetadataEquals(rs.getMetaData(), expected);
- }
-
- private void executePreparedTest(String sql, String[] expected) throws Exception {
- execute(sql, new Object[] {});
- java.sql.ResultSet rs = this.internalResultSet;
- assertResultsSetMetadataEquals(rs.getMetaData(), expected);
- }
-
- @Test public void testCount() throws Exception {
- String[] expected = {
- "ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName", //$NON-NLS-1$
- "count 4 integer java.lang.Integer 1 null null PartsSupplier" //$NON-NLS-1$
- };
- executeTest("select count(*) from parts", expected); //$NON-NLS-1$
- }
-
- @Test public void testStar() throws Exception {
- String[] expected = {
- "ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName", //$NON-NLS-1$
- "PART_ID 12 string java.lang.String 0 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier", //$NON-NLS-1$
- "PART_NAME 12 string java.lang.String 1 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier", //$NON-NLS-1$
- "PART_COLOR 12 string java.lang.String 1 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier", //$NON-NLS-1$
- "PART_WEIGHT 12 string java.lang.String 1 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier" //$NON-NLS-1$
- };
- executeTest("select * from parts", expected); //$NON-NLS-1$
- }
-
- @Test public void testTempGroupStar() throws Exception {
- String[] expected = {
- "ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName", //$NON-NLS-1$
- "PART_ID 12 string java.lang.String 0 FOO null PartsSupplier", //$NON-NLS-1$
- "PART_NAME 12 string java.lang.String 1 FOO null PartsSupplier", //$NON-NLS-1$
- "PART_COLOR 12 string java.lang.String 1 FOO null PartsSupplier", //$NON-NLS-1$
- "PART_WEIGHT 12 string java.lang.String 1 FOO null PartsSupplier" //$NON-NLS-1$
- };
- executeTest("select * from (select * from parts) foo", expected); //$NON-NLS-1$
- }
-
- @Test public void testCountAndElement() throws Exception {
- String[] expected = {
- "ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName", //$NON-NLS-1$
- "count 4 integer java.lang.Integer 1 null null PartsSupplier", //$NON-NLS-1$
- "part_name 12 string java.lang.String 1 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier" //$NON-NLS-1$
- };
- executeTest("select count(*), part_name from parts group by part_name", expected); //$NON-NLS-1$
- }
-
- @Test public void testStar_PreparedStatement() throws Exception {
- String[] expected = {
- "ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName", //$NON-NLS-1$
- "PART_ID 12 string java.lang.String 0 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier", //$NON-NLS-1$
- "PART_NAME 12 string java.lang.String 1 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier", //$NON-NLS-1$
- "PART_COLOR 12 string java.lang.String 1 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier", //$NON-NLS-1$
- "PART_WEIGHT 12 string java.lang.String 1 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier" //$NON-NLS-1$
- };
- executePreparedTest("select * from parts", expected); //$NON-NLS-1$
- }
-
- @Test public void testCount_PreparedStatement() throws Exception {
- String[] expected = {
- "ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName", //$NON-NLS-1$
- "count 4 integer java.lang.Integer 1 null null PartsSupplier" //$NON-NLS-1$
- };
- executePreparedTest("select count(*) from parts", expected); //$NON-NLS-1$
- }
-
- @Test public void testCountAndElement_PreparedStatement() throws Exception {
- String[] expected = {
- "ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName", //$NON-NLS-1$
- "count 4 integer java.lang.Integer 1 null null PartsSupplier", //$NON-NLS-1$
- "part_name 12 string java.lang.String 1 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier" //$NON-NLS-1$
- };
- executePreparedTest("select count(*), part_name from parts group by part_name", expected); //$NON-NLS-1$
- }
-}
Deleted: trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestSystemVirtualModel.java
===================================================================
--- trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestSystemVirtualModel.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestSystemVirtualModel.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,565 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.systemmodel;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import com.metamatrix.core.util.UnitTestUtil;
-import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
-
-/**
- * Exercises each virtual table in the system model.
- */
-public class TestSystemVirtualModel extends AbstractMMQueryTestCase {
- private static final String DQP_PROP_FILE = UnitTestUtil.getTestDataPath()+ "/partssupplier/dqp.properties;user=test"; //$NON-NLS-1$
- private static final String VDB = "PartsSupplier"; //$NON-NLS-1$
-
- public TestSystemVirtualModel() {
- // this is needed because the result files are generated
- // with another tool which uses tab as delimiter
- super.DELIMITER = "\t"; //$NON-NLS-1$
- }
-
- @Before public void setUp() {
- getConnection(VDB, DQP_PROP_FILE);
- }
-
- @Ignore("ODBC support to be readded")
- @Test public void testDefect23534() {
- String[] expected = { "SCOPE[short] COLUMN_NAME[string] DATA_TYPE[short] TYPE_NAME[string] PRECISION[integer] LENGTH[integer] SCALE[integer] PSEUDO_COLUMN[short]" }; //$NON-NLS-1$
- executeAndAssertResults(
- "SELECT OA_SCOPE as \"SCOPE\" , COLUMN_NAME, DATA_TYPE, TYPE_NAME, OA_PRECISION as \"PRECISION\", " + //$NON-NLS-1$
- "OA_LENGTH as \"LENGTH\", OA_SCALE as \"SCALE\", PSEUDO_COLUMN " + //$NON-NLS-1$
- "FROM System.ODBC.OA_COLUMNS " + //$NON-NLS-1$
- "WHERE TABLE_NAME = N'AUTHORS' AND TABLE_OWNER = N's1' AND " + //$NON-NLS-1$
- "(OA_COLUMNTYPE = 2 OR OA_COLUMNTYPE = 3) " + //$NON-NLS-1$
- "AND (OA_SCOPE is null OR OA_SCOPE >= 1) " + //$NON-NLS-1$
- "AND (OA_NULLABLE = 0 OR OA_NULLABLE = 1) " + //$NON-NLS-1$
- "ORDER BY \"SCOPE\"", //$NON-NLS-1$
- expected);
- }
-
- protected void checkResult(String testName, String query) throws Exception {
- execute(query);
- super.checkResult(testName, this.internalResultSet, "system"); //$NON-NLS-1$
- }
-
- @Test public void testModels() throws Exception {
- checkResult("testSchemas", "select* from System.Schemas"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Test public void testKeys() throws Exception {
- checkResult("testKeys", "select* from System.Keys order by Name"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Test public void testGroups() throws Exception {
- checkResult("testTables", "select* from System.Tables order by Name"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Test public void testDataTypes() throws Exception {
- checkResult("testDataTypes", "select * from System.DataTypes order by name"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Test public void testProcedureParams() throws Exception {
- checkResult("testProcedureParams", "select * from System.ProcedureParams order by Name"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Test public void testProcedures() throws Exception {
- checkResult("testProcedures", "select* from System.Procedures order by Name"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Test public void testProperties() {
- String[] expected = { "Name[string] Value[string] UID[string]", }; //$NON-NLS-1$
- executeAndAssertResults("select* from System.Properties", expected); //$NON-NLS-1$
- }
-
- @Test public void testVirtualDatabase() {
-
- String[] expected = { "Name[string] Version[string] ", "PartsSupplier 1", //$NON-NLS-1$ //$NON-NLS-2$
-
- };
- executeAndAssertResults("select* from System.VirtualDatabases", //$NON-NLS-1$
- expected);
- }
-
- @Test public void testKeyColumns() throws Exception {
- checkResult("testKeyColumns", "select* from System.KeyColumns order by Name, KeyName"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Test public void testVDBResourcePathsProcedure() {
-
- String[] expected = { "ResourcePath[string] isBinary[boolean] ", //$NON-NLS-1$
- "/parts/partsmd/PartsSupplier.xmi false", //$NON-NLS-1$
- };
- execute("exec getVDBResourcePaths()",new Object[] {}); //$NON-NLS-1$
- assertResults(expected);
- }
-
- @Test public void testColumns() throws Exception {
- checkResult("testColumns", "select* from System.Columns order by Name"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Test public void testTableType() {
-
- String[] expected = { "Type[string] ", "Table", }; //$NON-NLS-1$ //$NON-NLS-2$
- executeAndAssertResults(
- "select distinct Type from System.Tables order by Type", //$NON-NLS-1$
- expected);
- }
-
- @Test public void testTableIsSystem() throws Exception {
- checkResult("testTableIsSystem", "select Name from System.Tables where IsSystem = 'false' order by Name"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Ignore("ODBC support to be readded")
- @Test public void test_OA_PROC() {
-
- String[] expected = {
- "OA_QUALIFIER[string] OA_OWNER[string] OA_NAME[string] NUM_INPUT_PARAMS[integer] NUM_OUTPUT_PARAMS[integer] NUM_RESULT_SETS[integer] REMARKS[string] PROCEDURE_TYPE[short]", //$NON-NLS-1$
- "PartsSupplier System describe 0 0 0 null 1", //$NON-NLS-1$
- "PartsSupplier System getBinaryVDBResource 0 0 0 null 1", //$NON-NLS-1$
- "PartsSupplier System getCharacterVDBResource 0 0 0 null 1", //$NON-NLS-1$
- "PartsSupplier System getUpdatedCharacterVDBResource 0 0 0 null 1", //$NON-NLS-1$
- "PartsSupplier System getVDBResourcePaths 0 0 0 null 1", //$NON-NLS-1$
-
- };
- executeAndAssertResults("select* FROM System.ODBC.OA_PROC", expected); //$NON-NLS-1$
- }
-
- @Ignore("ODBC support to be readded")
- @Test public void test_OA_PROCCOLUMNS() {
-
- String[] expected = {
- "OA_QUALIFIER[string] OA_OWNER[string] OA_NAME[string] COLUMN_NAME[string] OA_COLUMNTYPE[short] DATA_TYPE[short] TYPE_NAME[string] OA_PRECISION[integer] OA_LENGTH[integer] OA_RADIX[integer] OA_SCALE[integer] OA_NULLABLE[short] OA_SCOPE[short] REMARKS[string]", //$NON-NLS-1$
- "PartsSupplier System describe Description 0 12 VARCHAR 128 128 10 0 0 0 ", //$NON-NLS-1$
- "PartsSupplier System describe entity 0 12 VARCHAR 0 0 10 0 0 0 ", //$NON-NLS-1$
- "PartsSupplier System getBinaryVDBResource VdbResource 0 12 VARCHAR 0 0 10 0 1 0 ", //$NON-NLS-1$
- "PartsSupplier System getBinaryVDBResource resourcePath 0 12 VARCHAR 50 50 10 0 0 0 ", //$NON-NLS-1$
- "PartsSupplier System getCharacterVDBResource VdbResource 0 12 VARCHAR 0 0 10 0 1 0 ", //$NON-NLS-1$
- "PartsSupplier System getCharacterVDBResource resourcePath 0 12 VARCHAR 50 50 10 0 0 0 ", //$NON-NLS-1$
- "PartsSupplier System getUpdatedCharacterVDBResource VdbResource 0 12 VARCHAR 0 0 10 0 1 0 ", //$NON-NLS-1$
- "PartsSupplier System getUpdatedCharacterVDBResource resourcePath 0 12 VARCHAR 50 50 10 0 0 0 ", //$NON-NLS-1$
- "PartsSupplier System getUpdatedCharacterVDBResource tokenReplacements 0 12 VARCHAR 0 0 10 0 0 0 ", //$NON-NLS-1$
- "PartsSupplier System getUpdatedCharacterVDBResource tokens 0 12 VARCHAR 0 0 10 0 0 0 ", //$NON-NLS-1$
- "PartsSupplier System getVDBResourcePaths ResourcePath 0 12 VARCHAR 50 50 10 0 1 0 ", //$NON-NLS-1$
- "PartsSupplier System getVDBResourcePaths isBinary 0 5 SMALLINT 1 1 10 0 1 0", //$NON-NLS-1$
-
- };
- executeAndAssertResults(
- "select* FROM System.ODBC.OA_PROCCOLUMNS ORDER BY OA_NAME, COLUMN_NAME ", //$NON-NLS-1$
- expected);
- }
-
- @Ignore("ODBC support to be readded")
- @Test public void testOATYPES() {
- String[] expected = { "TYPE_NAME[string] DATA_TYPE[short] PRECISION[integer] LITERAL_PREFIX[string] LITERAL_SUFFIX[string] CREATE_PARAMS[string] NULLABLE[short] CASE_SENSITIVE[short] SEARCHABLE[short] UNSIGNED_ATTRIBUTE[short] MONEY[short] AUTO_INCREMENT[short] LOCAL_TYPE_NAME[string] MINIMUM_SCALE[short] MAXIMUM_SCALE[short]", }; //$NON-NLS-1$
-
- executeAndAssertResults(
- "select TYPE_NAME, DATA_TYPE, OA_PRECISION as PRECISION, LITERAL_PREFIX, LITERAL_SUFFIX, " //$NON-NLS-1$
- + " CREATE_PARAMS, OA_NULLABLE as NULLABLE, CASE_SENSITIVE, OA_SEARCHABLE as SEARCHABLE, " //$NON-NLS-1$
- + " UNSIGNED_ATTRIB as UNSIGNED_ATTRIBUTE, OA_MONEY as MONEY, AUTO_INCREMENT, LOCAL_TYPE_NAME, " //$NON-NLS-1$
- + " MINIMUM_SCALE, MAXIMUM_SCALE FROM System.ODBC.OA_TYPES WHERE DATA_TYPE = -6", //$NON-NLS-1$
- expected);
- }
-
- @Ignore("ODBC support to be readded")
- @Test public void testOACOLUMNSAll() {
-
- String[] expected = {
- "TABLE_QUALIFIER[string] TABLE_OWNER[string] TABLE_NAME[string] COLUMN_NAME[string] DATA_TYPE[short] TYPE_NAME[string] OA_LENGTH[integer] OA_PRECISION[integer] OA_SCALE[integer] OA_RADIX[integer] OA_NULLABLE[short] OA_SCOPE[short] PSEUDO_COLUMN[short] OA_COLUMNTYPE[short] REMARKS[string]", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER PARTS PART_COLOR 12 VARCHAR 30 0 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER PARTS PART_ID 12 VARCHAR 4 0 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER PARTS PART_NAME 12 VARCHAR 255 0 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER PARTS PART_WEIGHT 12 VARCHAR 255 0 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SHIP_VIA SHIPPER_ID 5 SMALLINT 0 2 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SHIP_VIA SHIPPER_NAME 12 VARCHAR 30 0 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER STATUS STATUS_ID 5 SMALLINT 0 2 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER STATUS STATUS_NAME 12 VARCHAR 30 0 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER SUPPLIER_CITY 12 VARCHAR 30 0 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER SUPPLIER_ID 12 VARCHAR 10 0 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER SUPPLIER_NAME 12 VARCHAR 30 0 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER SUPPLIER_STATE 12 VARCHAR 2 0 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER SUPPLIER_STATUS 5 SMALLINT 0 2 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS PART_ID 12 VARCHAR 4 0 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS QUANTITY 5 SMALLINT 0 3 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS SHIPPER_ID 5 SMALLINT 0 2 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS SUPPLIER_ID 12 VARCHAR 10 0 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypeElementProperties DataTypeElementName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypeElementProperties DataTypeName 12 VARCHAR 100 100 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypeElementProperties Name 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypeElementProperties UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypeElementProperties Value 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypeElements DataTypeName 12 VARCHAR 100 100 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypeElements ElementLength 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypeElements Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypeElements Position 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypeElements Scale 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypeElements UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypeProperties DataType 12 VARCHAR 100 100 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypeProperties Name 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypeProperties UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypeProperties Value 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes BaseType 12 VARCHAR 64 64 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes Description 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes IsAutoIncremented 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes IsCaseSensitive 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes IsPhysical 5 SMALLINT 1 1 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes IsSigned 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes IsStandard 5 SMALLINT 1 1 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes JavaClass 12 VARCHAR 500 500 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes Name 12 VARCHAR 100 100 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes NullType 12 VARCHAR 20 20 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes Precision 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes Radix 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes RuntimeType 12 VARCHAR 64 64 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes Scale 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes SearchType 12 VARCHAR 20 20 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes TypeLength 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes TypeName 12 VARCHAR 100 100 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System DataTypes UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ElementProperties ElementName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ElementProperties ElementUpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ElementProperties GroupFullName 12 VARCHAR 2048 2048 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ElementProperties GroupName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ElementProperties GroupUpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ElementProperties ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ElementProperties Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ElementProperties UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ElementProperties Value 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements CharOctetLength 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements DataType 12 VARCHAR 100 100 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements DefaultValue 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements Description 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements ElementLength 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements Format 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements GroupFullName 12 VARCHAR 2048 2048 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements GroupName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements GroupUpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements IsAutoIncremented 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements IsCaseSensitive 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements IsCurrency 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements IsLengthFixed 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements IsSigned 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements JavaClass 12 VARCHAR 500 500 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements MaxRange 12 VARCHAR 50 50 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements MinRange 12 VARCHAR 50 50 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements NameInSource 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements NullType 12 VARCHAR 20 20 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements Position 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements Precision 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements Radix 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements Scale 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements SearchType 12 VARCHAR 20 20 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements SupportsSelect 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements SupportsUpdates 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Elements UpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System GroupProperties GroupFullName 12 VARCHAR 2048 2048 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System GroupProperties GroupName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System GroupProperties GroupUpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System GroupProperties ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System GroupProperties Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System GroupProperties UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System GroupProperties Value 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Groups Cardinality 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Groups Description 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Groups FullName 12 VARCHAR 2048 2048 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Groups IsMaterialized 5 SMALLINT 0 0 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Groups IsPhysical 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Groups IsSystem 5 SMALLINT 1 1 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Groups ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Groups Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Groups NameInSource 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Groups SupportsUpdates 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Groups Type 12 VARCHAR 20 20 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Groups UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Groups UpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyElements GroupFullName 12 VARCHAR 2048 2048 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyElements GroupName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyElements GroupUpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyElements KeyName 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyElements KeyType 12 VARCHAR 20 20 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyElements ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyElements Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyElements Position 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyElements RefKeyUID 12 VARCHAR 50 50 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyElements UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyProperties GroupFullName 12 VARCHAR 2048 2048 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyProperties GroupName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyProperties GroupUpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyProperties KeyName 12 VARCHAR 255 0 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyProperties ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyProperties Name 12 VARCHAR 255 0 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyProperties UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System KeyProperties Value 12 VARCHAR 255 0 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Keys Description 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Keys GroupFullName 12 VARCHAR 2048 2048 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Keys GroupName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Keys GroupUpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Keys IsIndexed 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Keys ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Keys Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Keys NameInSource 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Keys RefKeyUID 12 VARCHAR 50 50 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Keys Type 12 VARCHAR 20 20 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Keys UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ModelProperties ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ModelProperties Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ModelProperties UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ModelProperties Value 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Models Description 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Models IsPhysical 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Models MaxSetSize 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Models Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Models PrimaryMetamodelURI 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Models SupportsDistinct 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Models SupportsJoin 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Models SupportsOrderBy 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Models SupportsOuterJoin 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Models SupportsWhereAll 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Models UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureParams DataType 12 VARCHAR 25 25 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureParams ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureParams Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureParams NullType 12 VARCHAR 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureParams Optional 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureParams Position 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureParams Precision 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureParams ProcedureName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureParams Radix 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureParams Scale 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureParams Type 12 VARCHAR 100 100 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureParams TypeLength 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureProperties ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureProperties Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureProperties ProcedureName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureProperties UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System ProcedureProperties Value 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Procedures Description 12 VARCHAR 255 225 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Procedures FullName 12 VARCHAR 2048 2048 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Procedures ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Procedures ModelUID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Procedures Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Procedures NameInSource 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Procedures ReturnsResults 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System Procedures UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System VirtualDatabases Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System VirtualDatabases Version 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/JDBC ReferenceKeyColumns DEFERRABILITY 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/JDBC ReferenceKeyColumns DELETE_RULE 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/JDBC ReferenceKeyColumns FKCOLUMN_NAME 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/JDBC ReferenceKeyColumns FKTABLE_CAT 12 VARCHAR 1 1 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/JDBC ReferenceKeyColumns FKTABLE_NAME 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/JDBC ReferenceKeyColumns FKTABLE_SCHEM 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/JDBC ReferenceKeyColumns FK_NAME 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/JDBC ReferenceKeyColumns KEY_SEQ 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/JDBC ReferenceKeyColumns PKCOLUMN_NAME 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/JDBC ReferenceKeyColumns PKTABLE_CAT 12 VARCHAR 1 1 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/JDBC ReferenceKeyColumns PKTABLE_NAME 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/JDBC ReferenceKeyColumns PKTABLE_SCHEM 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/JDBC ReferenceKeyColumns PK_NAME 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/JDBC ReferenceKeyColumns UPDATE_RULE 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_COLUMNS COLUMN_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_COLUMNS DATA_TYPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_COLUMNS OA_COLUMNTYPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_COLUMNS OA_LENGTH 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_COLUMNS OA_NULLABLE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_COLUMNS OA_PRECISION 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_COLUMNS OA_RADIX 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_COLUMNS OA_SCALE 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_COLUMNS OA_SCOPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_COLUMNS PSEUDO_COLUMN 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_COLUMNS REMARKS 12 VARCHAR 254 254 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_COLUMNS TABLE_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_COLUMNS TABLE_OWNER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_COLUMNS TABLE_QUALIFIER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_COLUMNS TYPE_NAME 12 VARCHAR 100 100 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_FKEYS DELETE_RULE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_FKEYS FKCOLUMN_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_FKEYS FKTABLE_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_FKEYS FKTABLE_OWNER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_FKEYS FKTABLE_QUALIFIER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_FKEYS FK_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_FKEYS KEY_SEQ 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_FKEYS PKCOLUMN_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_FKEYS PKTABLE_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_FKEYS PKTABLE_OWNER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_FKEYS PKTABLE_QUALIFIER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_FKEYS PK_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_FKEYS UPDATE_RULE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROC NUM_INPUT_PARAMS 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROC NUM_OUTPUT_PARAMS 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROC NUM_RESULT_SETS 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROC OA_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROC OA_OWNER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROC OA_QUALIFIER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROC PROCEDURE_TYPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROC REMARKS 12 VARCHAR 254 254 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROCCOLUMNS COLUMN_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROCCOLUMNS DATA_TYPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_COLUMNTYPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_LENGTH 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_NULLABLE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_OWNER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_PRECISION 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_QUALIFIER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_RADIX 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_SCALE 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_SCOPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROCCOLUMNS REMARKS 12 VARCHAR 254 254 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_PROCCOLUMNS TYPE_NAME 12 VARCHAR 100 100 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_STATISTICS COLUMN_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_STATISTICS FILTER_CONDITIONS 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_STATISTICS INDEX_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_STATISTICS INDEX_QUALIFIER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_STATISTICS NON_UNIQUE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_STATISTICS OA_CARDINALITY 12 VARCHAR 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_STATISTICS OA_COLLATION 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_STATISTICS OA_PAGES 12 VARCHAR 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_STATISTICS OA_TYPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_STATISTICS SEQ_IN_INDEX 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_STATISTICS TABLE_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_STATISTICS TABLE_OWNER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_STATISTICS TABLE_QUALIFIER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TABLES REMARKS 12 VARCHAR 254 254 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TABLES TABLE_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TABLES TABLE_OWNER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TABLES TABLE_QUALIFIER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TABLES TABLE_TYPE 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TYPES AUTO_INCREMENT 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TYPES CASE_SENSITIVE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TYPES CREATE_PARAMS 12 VARCHAR 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TYPES DATA_TYPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TYPES LITERAL_PREFIX 12 VARCHAR 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TYPES LITERAL_SUFFIX 12 VARCHAR 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TYPES LOCAL_TYPE_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TYPES MAXIMUM_SCALE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TYPES MINIMUM_SCALE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TYPES OA_MONEY 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TYPES OA_NULLABLE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TYPES OA_PRECISION 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TYPES OA_SEARCHABLE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TYPES TYPE_NAME 12 VARCHAR 100 100 0 10 1 0 0 0 null", //$NON-NLS-1$
- "PartsSupplier System/ODBC OA_TYPES UNSIGNED_ATTRIB 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
-
- };
-
- executeAndAssertResults(
- "select* FROM System.ODBC.OA_COLUMNS ORDER BY TABLE_QUALIFIER, TABLE_OWNER, TABLE_NAME, COLUMN_NAME", //$NON-NLS-1$
- expected);
- }
-
- @Ignore("ODBC support to be readded")
- @Test public void testOATYPESAll() {
- String[] expected = {
- "TYPE_NAME[string] DATA_TYPE[short] OA_PRECISION[integer] LITERAL_PREFIX[string] LITERAL_SUFFIX[string] CREATE_PARAMS[string] OA_NULLABLE[short] CASE_SENSITIVE[short] OA_SEARCHABLE[short] UNSIGNED_ATTRIB[short] OA_MONEY[short] AUTO_INCREMENT[short] MINIMUM_SCALE[short] MAXIMUM_SCALE[short] LOCAL_TYPE_NAME[string]", //$NON-NLS-1$
- "CHAR 1 2147483647 ' ' null 1 1 3 0 0 0 null null CHAR", //$NON-NLS-1$
- "DATE 9 10 {d ' '} null 1 0 2 0 0 0 null null DATE", //$NON-NLS-1$
- "DOUBLE 8 15 null null null 1 0 2 0 0 0 null null DOUBLE", //$NON-NLS-1$
- "FLOAT 6 15 null null null 1 0 2 0 0 0 null null FLOAT", //$NON-NLS-1$
- "INTEGER 4 10 null null null 1 0 2 0 0 0 null null INTEGER", //$NON-NLS-1$
- "LONGVARBINARY -4 2147483647 0x null null 1 0 0 0 0 0 null null null", //$NON-NLS-1$
- "NUMERIC 2 32 null null null 1 0 2 0 0 0 0 32 NUMERIC", //$NON-NLS-1$
- "REAL 7 7 null null null 1 0 2 0 0 0 null null REAL", //$NON-NLS-1$
- "SMALLINT 5 5 null null null 1 0 2 0 0 0 null null SMALLINT", //$NON-NLS-1$
- "TIME 10 8 {t ' '} null 1 0 2 0 0 0 null null TIME", //$NON-NLS-1$
- "TIMESTAMP 11 19 {ts ' '} null 1 0 2 0 0 0 null null TIMESTAMP", //$NON-NLS-1$
- "VARCHAR 12 2147483647 ' ' null 1 1 3 0 0 0 null null VARCHAR", }; //$NON-NLS-1$
- executeAndAssertResults(
- "select* FROM System.ODBC.OA_TYPES ORDER BY TYPE_NAME", //$NON-NLS-1$
- expected);
-
- }
-
- @Ignore("ODBC support to be readded")
- @Test public void testOAFKEYS() {
- String[] expected = {
- "PKTABLE_QUALIFIER[string] PKTABLE_OWNER[string] PKTABLE_NAME[string] PKCOLUMN_NAME[string] FKTABLE_QUALIFIER[string] FKTABLE_OWNER[string] FKTABLE_NAME[string] FKCOLUMN_NAME[string] KEY_SEQ[short] UPDATE_RULE[short] DELETE_RULE[short] FK_NAME[string] PK_NAME[string]", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER PARTS PART_ID PartsSupplier PartsSupplier/PARTSSUPPLIER null null 1 null null null PK_PARTS", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER PARTS PART_ID PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS PART_ID 1 null null FK_SPLIER_PRTS_PRTS PK_PARTS", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SHIP_VIA SHIPPER_ID PartsSupplier PartsSupplier/PARTSSUPPLIER null null 1 null null null PK_SHIP_VIA", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER STATUS STATUS_ID PartsSupplier PartsSupplier/PARTSSUPPLIER null null 1 null null null PK_STATUS", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER STATUS STATUS_ID PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER SUPPLIER_STATUS 1 null null FK_SPLIER_STATS PK_STATUS", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER SUPPLIER_ID PartsSupplier PartsSupplier/PARTSSUPPLIER null null 1 null null null PK_SUPPLIER", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER SUPPLIER_ID PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS SUPPLIER_ID 1 null null FK_SPLY_PRTS_SPLY PK_SUPPLIER", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS SUPPLIER_ID PartsSupplier PartsSupplier/PARTSSUPPLIER null null 1 null null null PK_SUPPLIER_PARTS", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS PART_ID PartsSupplier PartsSupplier/PARTSSUPPLIER null null 2 null null null PK_SUPPLIER_PARTS", //$NON-NLS-1$
-
- };
- executeAndAssertResults(
- "select* FROM System.ODBC.OA_FKEYS ORDER BY PK_NAME, KEY_SEQ", //$NON-NLS-1$
- expected);
-
- }
-
- @Ignore("ODBC support to be readded")
- @Test public void testOASTATISTICS() {
- String[] expected = {
- "TABLE_QUALIFIER[string] TABLE_OWNER[string] TABLE_NAME[string] NON_UNIQUE[short] INDEX_QUALIFIER[string] INDEX_NAME[string] OA_TYPE[short] SEQ_IN_INDEX[short] COLUMN_NAME[string] OA_COLLATION[string] OA_CARDINALITY[string] OA_PAGES[string] FILTER_CONDITIONS[string]", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER PARTS 0 PK_PARTS 3 1 PART_ID null null null", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SHIP_VIA 0 PK_SHIP_VIA 3 1 SHIPPER_ID null null null ", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER STATUS 0 PK_STATUS 3 1 STATUS_ID null null null ", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER 1 FK_SPLIER_STATS 3 1 SUPPLIER_STATUS null null null ", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER 0 PK_SUPPLIER 3 1 SUPPLIER_ID null null null ", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS 1 FK_SPLIER_PRTS_PRTS 3 1 PART_ID null null null ", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS 1 FK_SPLY_PRTS_SPLY 3 1 SUPPLIER_ID null null null ", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS 0 PK_SUPPLIER_PARTS 3 2 PART_ID null null null ", //$NON-NLS-1$
- "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS 0 PK_SUPPLIER_PARTS 3 1 SUPPLIER_ID null null null ", //$NON-NLS-1$
-
- };
- executeAndAssertResults("select* FROM System.ODBC.OA_STATISTICS order by TABLE_NAME, INDEX_NAME, COLUMN_NAME", //$NON-NLS-1$
- expected);
-
- }
-
- @Test public void testDefect12064() {
- String[] expected = {
- "KeyName[string] RefKeyUID[string] ", //$NON-NLS-1$
- "PK_PARTS null", //$NON-NLS-1$
- "PK_SHIP_VIA null", //$NON-NLS-1$
- "PK_STATUS null", //$NON-NLS-1$
- "PK_SUPPLIER null", //$NON-NLS-1$
- "PK_SUPPLIER_PARTS null", //$NON-NLS-1$
- "PK_SUPPLIER_PARTS null", //$NON-NLS-1$
-
-
- };
- executeAndAssertResults("select KeyName, RefKeyUID FROM System.KeyColumns WHERE RefKeyUID IS NULL order by KeyName",expected); //$NON-NLS-1$
- }
-
- @Test public void testReferenceKeyColumns() throws Exception {
- checkResult("testReferenceKeyColumns", "select* FROM System.ReferenceKeyColumns order by PKTABLE_NAME"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- @Test public void testVirtualLookup() {
- String[] expected = { "expr[string]", "null"}; //$NON-NLS-1$ //$NON-NLS-2$
- executeAndAssertResults(
- "select lookup('System.KeyColumns', 'RefKeyUID', 'KeyName', 'PK_PARTS')", expected); //$NON-NLS-1$
-
- }
-}
Deleted: trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestVirtualDocWithVirtualProc.java
===================================================================
--- trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestVirtualDocWithVirtualProc.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestVirtualDocWithVirtualProc.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,94 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.systemmodel;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.metamatrix.core.util.UnitTestUtil;
-import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
-
-/**
- * Tests xml virtual documents which are built on top of virtual
- * procedures (see defect 12309 and all related).
- */
-public class TestVirtualDocWithVirtualProc extends AbstractMMQueryTestCase {
-
- private static final String DQP_PROP_FILE = UnitTestUtil.getTestDataPath() + "/xml-vp/xmlvp.properties;user=test"; //$NON-NLS-1$
- private static final String VDB = "xmlvp"; //$NON-NLS-1$
-
- public TestVirtualDocWithVirtualProc() {
- // this is needed because the result files are generated
- // with another tool which uses tab as delimiter
- super.DELIMITER = "\t"; //$NON-NLS-1$
- }
-
- @Before public void setUp() {
- getConnection(VDB, DQP_PROP_FILE);
- }
-
- @After public void tearDown() {
- closeConnection();
- }
-
- @Test public void testDefect15241() {
-
- String sql = "SELECT SchemaName, Name, Description FROM System.Tables WHERE Name = 'yyyTestDocument'"; //$NON-NLS-1$
-
- String[] expected ={
- "SchemaName[string] Name[string] Description[string]", //$NON-NLS-1$
- "test13326Doc yyyTestDocument null", //$NON-NLS-1$
- "testDoc yyyTestDocument This is a test description of virtual doc yyyTestDocument" //$NON-NLS-1$
- };
- executeAndAssertResults(sql, expected);
- }
-
- @Test public void testDefect15241a() {
- String sql = "SELECT TableName, Name, Description FROM System.Columns WHERE Name = 'IntKey'"; //$NON-NLS-1$
- String[] expected ={
- "TableName[string] Name[string] Description[string]", //$NON-NLS-1$
- "HugeA IntKey null", //$NON-NLS-1$
- "HugeB IntKey null", //$NON-NLS-1$
- "LargeA IntKey null", //$NON-NLS-1$
- "LargeB IntKey null", //$NON-NLS-1$
- "MediumA IntKey null", //$NON-NLS-1$
- "MediumB IntKey null", //$NON-NLS-1$
- "SmallA IntKey This is a test description of SmallA.IntKey element", //$NON-NLS-1$
- "SmallB IntKey null" //$NON-NLS-1$
- };
- executeAndAssertResults(sql, expected);
- }
-
- @Test public void testDefect15241b() {
-
- String sql = "SELECT Name, Value, UID FROM System.Properties"; //$NON-NLS-1$
- String[] expected ={
- "Name[string] Value[string] UID[string]", //$NON-NLS-1$
- "NugentXAttribute Nuuuuuge22222 mmuuid:4789b280-841c-1f15-9526-ebd0cace03e1", //$NON-NLS-1$
- "NugentYAttribute Nuuuuuge44444 mmuuid:4789b280-841c-1f15-9526-ebd0cace03e1" //$NON-NLS-1$
- };
- executeAndAssertResults(sql, expected);
- }
-
-}
Deleted: trunk/test-integration/common/src/test/java/org/teiid/connector/metadata/runtime/TestMetadataInConnector.java
===================================================================
--- trunk/test-integration/common/src/test/java/org/teiid/connector/metadata/runtime/TestMetadataInConnector.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/java/org/teiid/connector/metadata/runtime/TestMetadataInConnector.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,30 +0,0 @@
-package org.teiid.connector.metadata.runtime;
-
-import org.junit.Test;
-
-import com.metamatrix.core.util.UnitTestUtil;
-import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
-
-public class TestMetadataInConnector extends AbstractMMQueryTestCase {
-
- private static final String DQP_PROP_FILE = UnitTestUtil.getTestDataPath() + "/metadata/dqp.properties;user=test"; //$NON-NLS-1$
- private static final String VDB = "TestExtensions"; //$NON-NLS-1$
-
-
- @Test public void testMetadataTable() throws Exception {
- getConnection(VDB, DQP_PROP_FILE, ""); //$NON-NLS-1$
- execute("Select * from TableA"); //$NON-NLS-1$
- String expected[] = {"column1[string] column2[integer]"}; //$NON-NLS-1$
- assertResults(expected);
- closeConnection();
- }
-
- @Test public void testMetadataProcedure() throws Exception {
- getConnection(VDB, DQP_PROP_FILE, ""); //$NON-NLS-1$
- execute("exec AnyModel.ProcedureB(?)", new Object[] {"foo"}); //$NON-NLS-1$ //$NON-NLS-2$
- String expected[] = {"column1[string] column2[integer]"}; //$NON-NLS-1$
- assertResults(expected);
- closeConnection();
- }
-
-}
Deleted: trunk/test-integration/common/src/test/resources/3473/3473.properties
===================================================================
--- trunk/test-integration/common/src/test/resources/3473/3473.properties 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/3473/3473.properties 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,37 +0,0 @@
-#
-# JBoss, Home of Professional Open Source.
-# See the COPYRIGHT.txt file distributed with this work for information
-# regarding copyright ownership. Some portions may be licensed
-# to Red Hat, Inc. under one or more contributor license agreements.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA.
-#
-
-dqp.configFile=../ServerConfig.xml
-#dqp.metadata.systemURL=file://${system-vdb-path}/System.vdb
-vdb.definition=./test.vdb
-#metamatrix.security.password.PasswordKeyStore=c3B1dG5pazEz
-#dqp.logFile=./logs/DQP.log
-dqp.logLevel=2
-
-processName=3473
-
-#only for testing, as this takes more time to start and shutdown
-xa.enable_recovery=false
-
-
-
-teiid.home=target/scratch
\ No newline at end of file
Deleted: trunk/test-integration/common/src/test/resources/3473/test.vdb
===================================================================
(Binary files differ)
Deleted: trunk/test-integration/common/src/test/resources/3473/testGetCrossReference.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/3473/testGetCrossReference.expected 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/3473/testGetCrossReference.expected 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,79 +0,0 @@
-getCrossReference1
-string string string string string string string string short integer integer string string integer
-PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
-test test all_databases database_id test test all_models database_id 1 3 3 databae_model_fk databases_pk 5
-Row Count : 1
-getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
-UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-getCrossReference2
-string string string string string string string string short integer integer string string integer
-PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
-Row Count : 0
-getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
-UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-getCrossReference3
-string string string string string string string string short integer integer string string integer
-PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
-Row Count : 0
-getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
-UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-getCrossReference4
-string string string string string string string string short integer integer string string integer
-PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
-test test all_databases database_id test test all_models database_id 1 3 3 databae_model_fk databases_pk 5
-test test all_models model_id test test all_tables model_id 1 3 3 table_model_fk models_pk 5
-Row Count : 2
-getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
-UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
Deleted: trunk/test-integration/common/src/test/resources/3473/testGetExportedKeys.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/3473/testGetExportedKeys.expected 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/3473/testGetExportedKeys.expected 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,55 +0,0 @@
-string string string string string string string string short integer integer string string integer
-PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
-test test all_models model_id test test all_tables model_id 1 3 3 table_model_fk models_pk 5
-Row Count : 1
-getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
-UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-string string string string string string string string short integer integer string string integer
-PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
-Row Count : 0
-getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
-UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-string string string string string string string string short integer integer string string integer
-PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
-Row Count : 0
-getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
-UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
Deleted: trunk/test-integration/common/src/test/resources/3473/testGetImportedKeys.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/3473/testGetImportedKeys.expected 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/3473/testGetImportedKeys.expected 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,58 +0,0 @@
-getImportedKeys1
-string string string string string string string string short integer integer string string integer
-PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
-test test all_databases database_id test test all_models database_id 1 3 3 databae_model_fk databases_pk 5
-Row Count : 1
-getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
-UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-getImportedKeys2
-string string string string string string string string short integer integer string string integer
-PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
-Row Count : 0
-getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
-UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-getImportedKeys3
-string string string string string string string string short integer integer string string integer
-PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
-Row Count : 0
-getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
-UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
-FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
-DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
Deleted: trunk/test-integration/common/src/test/resources/3473/testGetPrimaryKeys.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/3473/testGetPrimaryKeys.expected 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/3473/testGetPrimaryKeys.expected 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,31 +0,0 @@
-string string string string short string
-TABLE_CAT TABLE_SCHEM TABLE_NAME COLUMN_NAME KEY_SEQ PK_NAME
-test test all_models model_id 1 models_pk
-Row Count : 1
-getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-TABLE_CAT 12 test java.lang.String TABLE_CAT string System KeyColumns 255 255 0 false false false false 0 true true false false
-TABLE_SCHEM 12 test java.lang.String TABLE_SCHEM string System KeyColumns 255 255 0 false true false true 1 false true true true
-TABLE_NAME 12 test java.lang.String TABLE_NAME string System KeyColumns 2048 2048 0 false true false false 0 true true false false
-COLUMN_NAME 12 test java.lang.String COLUMN_NAME string System KeyColumns 255 255 0 false false false false 0 true true false false
-KEY_SEQ 5 test java.lang.Short KEY_SEQ short <null> <null> 6 5 0 false false false true 1 false true true true
-PK_NAME 12 test java.lang.String PK_NAME string System KeyColumns 255 255 0 false false false false 1 true true false false
-string string string string short string
-TABLE_CAT TABLE_SCHEM TABLE_NAME COLUMN_NAME KEY_SEQ PK_NAME
-Row Count : 0
-getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-TABLE_CAT 12 test java.lang.String TABLE_CAT string System KeyColumns 255 255 0 false false false false 0 true true false false
-TABLE_SCHEM 12 test java.lang.String TABLE_SCHEM string System KeyColumns 255 255 0 false true false true 1 false true true true
-TABLE_NAME 12 test java.lang.String TABLE_NAME string System KeyColumns 2048 2048 0 false true false false 0 true true false false
-COLUMN_NAME 12 test java.lang.String COLUMN_NAME string System KeyColumns 255 255 0 false false false false 0 true true false false
-KEY_SEQ 5 test java.lang.Short KEY_SEQ short <null> <null> 6 5 0 false false false true 1 false true true true
-PK_NAME 12 test java.lang.String PK_NAME string System KeyColumns 255 255 0 false false false false 1 true true false false
-string string string string short string
-TABLE_CAT TABLE_SCHEM TABLE_NAME COLUMN_NAME KEY_SEQ PK_NAME
-Row Count : 0
-getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-TABLE_CAT 12 test java.lang.String TABLE_CAT string System KeyColumns 255 255 0 false false false false 0 true true false false
-TABLE_SCHEM 12 test java.lang.String TABLE_SCHEM string System KeyColumns 255 255 0 false true false true 1 false true true true
-TABLE_NAME 12 test java.lang.String TABLE_NAME string System KeyColumns 2048 2048 0 false true false false 0 true true false false
-COLUMN_NAME 12 test java.lang.String COLUMN_NAME string System KeyColumns 255 255 0 false false false false 0 true true false false
-KEY_SEQ 5 test java.lang.Short KEY_SEQ short <null> <null> 6 5 0 false false false true 1 false true true true
-PK_NAME 12 test java.lang.String PK_NAME string System KeyColumns 255 255 0 false false false false 1 true true false false
Deleted: trunk/test-integration/common/src/test/resources/3473/testGetTables.expected
===================================================================
--- trunk/test-integration/common/src/test/resources/3473/testGetTables.expected 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/3473/testGetTables.expected 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,59 +0,0 @@
-string string string string string string string string string string boolean
-TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS TYPE_CAT TYPE_SCHEM TYPE_NAME SELF_REFERENCING_COL_NAME REF_GENERATION ISPHYSICAL
-test System Columns SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
-test System DataTypes SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
-test System KeyColumns SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
-test System Keys SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
-test System ProcedureParams SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
-test System Procedures SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
-test System Properties SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
-test System ReferenceKeyColumns SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
-test System Schemas SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
-test System Tables SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
-test System VirtualDatabases SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
-test test all_databases TABLE <null> <null> <null> <null> <null> <null> false
-test test all_models TABLE <null> <null> <null> <null> <null> <null> false
-test test all_tables TABLE <null> <null> <null> <null> <null> <null> false
-Row Count : 14
-getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-TABLE_CAT 12 test java.lang.String TABLE_CAT string System Tables 255 255 0 false true false true 1 false true true true
-TABLE_SCHEM 12 test java.lang.String TABLE_SCHEM string System Tables 255 255 0 false true false true 1 false true true true
-TABLE_NAME 12 test java.lang.String TABLE_NAME string System Tables 255 255 0 false true false false 0 true true false false
-TABLE_TYPE 12 test java.lang.String TABLE_TYPE string <null> <null> 4000 4000 0 false false false true 1 false true true true
-REMARKS 12 test java.lang.String REMARKS string System Tables 255 255 0 false true false true 1 false true true true
-TYPE_CAT 12 test java.lang.String TYPE_CAT string <null> <null> 4000 4000 0 false false false true 1 false true true true
-TYPE_SCHEM 12 test java.lang.String TYPE_SCHEM string <null> <null> 4000 4000 0 false false false true 1 false true true true
-TYPE_NAME 12 test java.lang.String TYPE_NAME string <null> <null> 4000 4000 0 false false false true 1 false true true true
-SELF_REFERENCING_COL_NAME 12 test java.lang.String SELF_REFERENCING_COL_NAME string <null> <null> 4000 4000 0 false false false true 1 false true true true
-REF_GENERATION 12 test java.lang.String REF_GENERATION string <null> <null> 4000 4000 0 false false false true 1 false true true true
-ISPHYSICAL -7 test java.lang.Boolean ISPHYSICAL boolean System Tables 5 1 0 false true false false 0 true true false false
-string string string string string string string string string string boolean
-TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS TYPE_CAT TYPE_SCHEM TYPE_NAME SELF_REFERENCING_COL_NAME REF_GENERATION ISPHYSICAL
-Row Count : 0
-getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-TABLE_CAT 12 test java.lang.String TABLE_CAT string System Tables 255 255 0 false true false true 1 false true true true
-TABLE_SCHEM 12 test java.lang.String TABLE_SCHEM string System Tables 255 255 0 false true false true 1 false true true true
-TABLE_NAME 12 test java.lang.String TABLE_NAME string System Tables 255 255 0 false true false false 0 true true false false
-TABLE_TYPE 12 test java.lang.String TABLE_TYPE string <null> <null> 4000 4000 0 false false false true 1 false true true true
-REMARKS 12 test java.lang.String REMARKS string System Tables 255 255 0 false true false true 1 false true true true
-TYPE_CAT 12 test java.lang.String TYPE_CAT string <null> <null> 4000 4000 0 false false false true 1 false true true true
-TYPE_SCHEM 12 test java.lang.String TYPE_SCHEM string <null> <null> 4000 4000 0 false false false true 1 false true true true
-TYPE_NAME 12 test java.lang.String TYPE_NAME string <null> <null> 4000 4000 0 false false false true 1 false true true true
-SELF_REFERENCING_COL_NAME 12 test java.lang.String SELF_REFERENCING_COL_NAME string <null> <null> 4000 4000 0 false false false true 1 false true true true
-REF_GENERATION 12 test java.lang.String REF_GENERATION string <null> <null> 4000 4000 0 false false false true 1 false true true true
-ISPHYSICAL -7 test java.lang.Boolean ISPHYSICAL boolean System Tables 5 1 0 false true false false 0 true true false false
-string string string string string string string string string string boolean
-TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS TYPE_CAT TYPE_SCHEM TYPE_NAME SELF_REFERENCING_COL_NAME REF_GENERATION ISPHYSICAL
-Row Count : 0
-getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
-TABLE_CAT 12 test java.lang.String TABLE_CAT string System Tables 255 255 0 false true false true 1 false true true true
-TABLE_SCHEM 12 test java.lang.String TABLE_SCHEM string System Tables 255 255 0 false true false true 1 false true true true
-TABLE_NAME 12 test java.lang.String TABLE_NAME string System Tables 255 255 0 false true false false 0 true true false false
-TABLE_TYPE 12 test java.lang.String TABLE_TYPE string <null> <null> 4000 4000 0 false false false true 1 false true true true
-REMARKS 12 test java.lang.String REMARKS string System Tables 255 255 0 false true false true 1 false true true true
-TYPE_CAT 12 test java.lang.String TYPE_CAT string <null> <null> 4000 4000 0 false false false true 1 false true true true
-TYPE_SCHEM 12 test java.lang.String TYPE_SCHEM string <null> <null> 4000 4000 0 false false false true 1 false true true true
-TYPE_NAME 12 test java.lang.String TYPE_NAME string <null> <null> 4000 4000 0 false false false true 1 false true true true
-SELF_REFERENCING_COL_NAME 12 test java.lang.String SELF_REFERENCING_COL_NAME string <null> <null> 4000 4000 0 false false false true 1 false true true true
-REF_GENERATION 12 test java.lang.String REF_GENERATION string <null> <null> 4000 4000 0 false false false true 1 false true true true
-ISPHYSICAL -7 test java.lang.Boolean ISPHYSICAL boolean System Tables 5 1 0 false true false false 0 true true false false
Deleted: trunk/test-integration/common/src/test/resources/bqt/bqt.properties
===================================================================
--- trunk/test-integration/common/src/test/resources/bqt/bqt.properties 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/bqt/bqt.properties 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,32 +0,0 @@
-#
-# JBoss, Home of Professional Open Source.
-# See the COPYRIGHT.txt file distributed with this work for information
-# regarding copyright ownership. Some portions may be licensed
-# to Red Hat, Inc. under one or more contributor license agreements.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA.
-#
-
-dqp.configFile=../ServerConfig.xml
-vdb.definition=./loopback.DEF
-
-#only for testing, as this takes more time to start and shutdown
-xa.enable_recovery=false
-
-
-
-teiid.home=target/scratch/bqt
-processName=bqt
\ No newline at end of file
Deleted: trunk/test-integration/common/src/test/resources/bqt/bqt.vdb
===================================================================
(Binary files differ)
Deleted: trunk/test-integration/common/src/test/resources/bqt/loopback.DEF
===================================================================
--- trunk/test-integration/common/src/test/resources/bqt/loopback.DEF 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/bqt/loopback.DEF 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<VDB>
- <Header>
- <VDBExporterVersion>4.1</VDBExporterVersion>
- <ApplicationCreatedBy>MetaMatrix Console</ApplicationCreatedBy>
- <ApplicationVersion>4.3:2162</ApplicationVersion>
- <UserCreatedBy>MetaMatrixAdmin</UserCreatedBy>
- <MetaMatrixSystemVersion>4.3</MetaMatrixSystemVersion>
- <Time>2005-07-20T16:19:36.847-06:00</Time>
- </Header>
- <VDBInfo>
- <Property Name="Name" Value="QT_Ora9DS" />
- <Property Name="GUID" Value="mmuuid:1e72ce82-820b-1f79-a21e-eed1d292e845" />
- <Property Name="Version" Value="1" />
- <Property Name="VDBArchiveName" Value="bqt.vdb" />
- <Property Name="Description" Value="" />
- <Property Name="IsActive" Value="true" />
- </VDBInfo>
- <Model>
- <Property Name="Name" Value="XQT" />
- <Property Name="Visibility" Value="Public" />
- <Property Name="MultiSourceEnabled" Value="false" />
- </Model>
- <Model>
- <Property Name="Name" Value="VQT" />
- <Property Name="Visibility" Value="Public" />
- <Property Name="MultiSourceEnabled" Value="false" />
- </Model>
- <Model>
- <Property Name="Name" Value="XQTDoc" />
- <Property Name="Visibility" Value="Public" />
- <Property Name="MultiSourceEnabled" Value="false" />
- </Model>
- <Model>
- <Property Name="Name" Value="BQT2" />
- <Property Name="Visibility" Value="Public" />
- <Property Name="MultiSourceEnabled" Value="false" />
- <ConnectorBindings>
- <Connector Name="BQT2 Oracle 9i Simple Cap" />
- </ConnectorBindings>
- </Model>
- <Model>
- <Property Name="Name" Value="XQTRecursiveDoc" />
- <Property Name="Visibility" Value="Public" />
- <Property Name="MultiSourceEnabled" Value="false" />
- </Model>
- <Model>
- <Property Name="Name" Value="XQTNestedDoc" />
- <Property Name="Visibility" Value="Public" />
- <Property Name="MultiSourceEnabled" Value="false" />
- </Model>
- <Model>
- <Property Name="Name" Value="SP" />
- <Property Name="Visibility" Value="Public" />
- <Property Name="MultiSourceEnabled" Value="false" />
- <ConnectorBindings>
- <Connector Name="BQT2 Oracle 9i Simple Cap" />
- </ConnectorBindings>
- </Model>
- <Model>
- <Property Name="Name" Value="BQT1" />
- <Property Name="Visibility" Value="Public" />
- <Property Name="MultiSourceEnabled" Value="false" />
- <ConnectorBindings>
- <Connector Name="BQT1 Oracle 9i Simple Cap" />
- </ConnectorBindings>
- </Model>
- <ComponentTypes>
- <ComponentType Name="Loopback Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2005-07-21T10:07:40.921-06:00" CreatedBy="ConfigurationStartup" CreationDate="2005-07-21T10:07:40.921-06:00">
- <ComponentTypeDefn Deprecated="false">
- <PropertyDefinition Name="CapabilitiesClass" DisplayName="Capabilities Class" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
- </ComponentTypeDefn>
- <ComponentTypeDefn Deprecated="false">
- <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.loopback.LoopbackConnector" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
- </ComponentTypeDefn>
- <ComponentTypeDefn Deprecated="false">
- <PropertyDefinition Name="RowCount" DisplayName="Rows Per Query" ShortDescription="" DefaultValue="1" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
- </ComponentTypeDefn>
- <ComponentTypeDefn Deprecated="false">
- <PropertyDefinition Name="WaitTime" DisplayName="Max Random Wait Time" ShortDescription="" DefaultValue="0" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
- </ComponentTypeDefn>
- <ComponentTypeDefn Deprecated="false">
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" DefaultValue="extensionjar:loopbackconn.jar;extensionjar:jdbcconn.jar" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
- </ComponentTypeDefn>
- </ComponentType>
- </ComponentTypes>
- <ConnectorBindings>
- <Connector Name="BQT1 Oracle 9i Simple Cap" ComponentType="Loopback Connector" LastChangedBy="metamatrixadmin" LastChangedDate="2005-07-20T12:58:35.551-06:00" CreatedBy="metamatrixadmin" CreationDate="2005-07-20T11:39:55.961-06:00" QueuedService="false" routingUUID="mmuuid:a6ea7cc0-c651-1f91-940a-b13465b430eb">
- <Properties>
- <Property Name="MaxResultRows">10000</Property>
- <Property Name="ConnectorThreadTTL">120000</Property>
- <Property Name="ConnectorMaxThreads">5</Property>
- <Property Name="CapabilitiesClass" />
- <Property Name="metamatrix.service.essentialservice">false</Property>
- <Property Name="ConnectorClassPath">extensionjar:loopbackconn.jar</Property>
- <Property Name="RowCount">1</Property>
- <Property Name="ServiceClassName">com.metamatrix.server.connector.service.ConnectorService</Property>
- <Property Name="ConnectorClass">com.metamatrix.connector.loopback.LoopbackConnector</Property>
- <Property Name="WaitTime">0</Property>
- </Properties>
- </Connector>
- <Connector Name="BQT2 Oracle 9i Simple Cap" ComponentType="Loopback Connector" LastChangedBy="metamatrixadmin" LastChangedDate="2005-07-20T12:58:25.229-06:00" CreatedBy="metamatrixadmin" CreationDate="2005-07-20T11:39:57.503-06:00" QueuedService="false" routingUUID="mmuuid:a6ea7cc1-c651-1f91-940a-b13465b430eb">
- <Properties>
- <Property Name="MaxResultRows">10000</Property>
- <Property Name="ConnectorThreadTTL">120000</Property>
- <Property Name="ConnectorMaxThreads">5</Property>
- <Property Name="CapabilitiesClass" />
- <Property Name="metamatrix.service.essentialservice">false</Property>
- <Property Name="ConnectorClassPath">extensionjar:loopbackconn.jar</Property>
- <Property Name="RowCount">1</Property>
- <Property Name="ServiceClassName">com.metamatrix.server.connector.service.ConnectorService</Property>
- <Property Name="ConnectorClass">com.metamatrix.connector.loopback.LoopbackConnector</Property>
- <Property Name="WaitTime">0</Property>
- </Properties>
- </Connector>
- </ConnectorBindings>
-</VDB>
-
Deleted: trunk/test-integration/common/src/test/resources/metadata/ConfigurationInfo.def
===================================================================
--- trunk/test-integration/common/src/test/resources/metadata/ConfigurationInfo.def 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/metadata/ConfigurationInfo.def 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<VDB>
- <Header>
- <VDBExporterVersion>4.1</VDBExporterVersion>
- <ApplicationCreatedBy>MetaBase Modeler</ApplicationCreatedBy>
- <UserCreatedBy>VDBWriter</UserCreatedBy>
- <MetaMatrixSystemVersion>5.5</MetaMatrixSystemVersion>
- <Time>2009-02-03T16:43:53.407-06:00</Time>
- </Header>
- <VDBInfo>
- <Property Name="Name" Value="TestExtensions" />
- <Property Name="GUID" Value="mmuuid:aab3f642-0a99-111f-b214-b4f3aeb96b39" />
- <Property Name="Version" Value="1" />
- <Property Name="VDBArchiveName" Value="TestExtensions.vdb" />
- </VDBInfo>
- <Model>
- <Property Name="Name" Value="ExtensionModel" />
- <Property Name="Visibility" Value="Public" />
- <Property Name="MultiSourceEnabled" Value="false" />
- </Model>
- <Model>
- <Property Name="Name" Value="AnyModel" />
- <Property Name="Visibility" Value="Public" />
- <Property Name="MultiSourceEnabled" Value="false" />
- <ConnectorBindings>
- <Connector Name="AnyModel Connector" />
- </ConnectorBindings>
- </Model>
- <ComponentTypes>
- <ComponentType Name="Fake Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-11-13T13:26:45.416-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-11-13T13:26:45.416-06:00">
- <PropertyDefinition Name="CapabilitiesClass" DisplayName="Capabilities Class" ShortDescription="" DefaultValue="com.metamatrix.connector.loopback.LoopbackCapabilities" Multiplicity="1" IsExpert="true" />
- <PropertyDefinition Name="RowCount" DisplayName="Rows Per Query" ShortDescription="" DefaultValue="1" Multiplicity="1" IsExpert="true" IsPreferred="true" />
- <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.loopback.LoopbackConnector" Multiplicity="1" IsExpert="true" />
- <PropertyDefinition Name="WaitTime" DisplayName="Max Random Wait Time" ShortDescription="" DefaultValue="0" Multiplicity="1" IsExpert="true" />
- <PropertyDefinition Name="Standard" DisplayName="Standard Type" ShortDescription="Standard Built-in Connector Type" DefaultValue="true" PropertyType="Boolean" IsExpert="true" IsModifiable="false" />
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" DefaultValue="extensionjar:connector_patch.jar;extensionjar:loopbackconn.jar;extensionjar:jdbcconn.jar" Multiplicity="1" />
- </ComponentType>
- </ComponentTypes>
- <ConnectorBindings>
- <Connector Name="AnyModel Connector" ComponentType="Fake Connector" QueuedService="false" routingUUID="mmuuid:2a20b100-1032-111f-b214-b4f3aeb96b39">
- <Properties>
- <Property Name="MaxResultRows">10000</Property>
- <Property Name="Standard">true</Property>
- <Property Name="ExceptionOnMaxRows">true</Property>
- <Property Name="ConnectorThreadTTL">120000</Property>
- <Property Name="ServiceMonitoringEnabled">true</Property>
- <Property Name="ConnectorMaxThreads">20</Property>
- <Property Name="SourceConnectionTestInterval">600</Property>
- <Property Name="metamatrix.service.essentialservice">false</Property>
- <Property Name="ConnectorClassPath"></Property>
- <Property Name="RowCount">1</Property>
- <Property Name="ConnectorClass">org.teiid.connector.metadata.runtime.MockConnector</Property>
- <Property Name="DeployedName">TestExtensions_1.AnyModel Connector</Property>
- <Property Name="WaitTime">0</Property>
- <Property Name="Immutable">false</Property>
- </Properties>
- </Connector>
- </ConnectorBindings>
-</VDB>
-
Deleted: trunk/test-integration/common/src/test/resources/metadata/TestExtensions.vdb
===================================================================
(Binary files differ)
Deleted: trunk/test-integration/common/src/test/resources/metadata/dqp.properties
===================================================================
--- trunk/test-integration/common/src/test/resources/metadata/dqp.properties 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/metadata/dqp.properties 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,33 +0,0 @@
-#
-# JBoss, Home of Professional Open Source.
-# See the COPYRIGHT.txt file distributed with this work for information
-# regarding copyright ownership. Some portions may be licensed
-# to Red Hat, Inc. under one or more contributor license agreements.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA.
-#
-
-dqp.configFile=../ServerConfig.xml
-vdb.definition=./TestExtensions.vdb
-dqp.buffer.usedisk=false
-vdb.definition=./ConfigurationInfo.def
-
-#only for testing, as this takes more time to start and shutdown
-xa.enable_recovery=false
-
-
-teiid.home=target/scratch/metadata
-processName=metadata
\ No newline at end of file
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/PartsSupplier.vdb
===================================================================
(Binary files differ)
Added: trunk/test-integration/common/src/test/resources/partssupplier/PartsSupplier.vdb
===================================================================
(Binary files differ)
Property changes on: trunk/test-integration/common/src/test/resources/partssupplier/PartsSupplier.vdb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/dqp.properties
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/dqp.properties 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/dqp.properties 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,38 +0,0 @@
-#
-# JBoss, Home of Professional Open Source.
-# See the COPYRIGHT.txt file distributed with this work for information
-# regarding copyright ownership. Some portions may be licensed
-# to Red Hat, Inc. under one or more contributor license agreements.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA.
-#
-
-dqp.configFile=../ServerConfig.xml
-#dqp.metadata.systemURL=file://${system-vdb-path}/System.vdb
-vdb.definition=./PartsSupplier.vdb
-#metamatrix.security.password.PasswordKeyStore=c3B1dG5pazEz
-#dqp.logFile=./logs/DQP.log
-#dqp.logLevel=1
-#dqp.classpath=./lib/;./license/;./lib/metamatrix-dqp.jar;./lib/bcprov-jdk14-122.jar;./extensions/MJjdbc.jar
-dqp.buffer.usedisk=false
-
-#only for testing, as this takes more time to start and shutdown
-xa.enable_recovery=false
-
-
-teiid.home=target/scratch/parts
-
-processName=partssupplier
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/Catalogs.metadata.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/Catalogs.metadata.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/Catalogs.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,2 +0,0 @@
-ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
-TABLE_CAT 12 string java.lang.String 1 null null PartsSupplier
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/Catalogs.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/Catalogs.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/Catalogs.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1 +0,0 @@
-TABLE_CAT[string]
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/Columns.metadata.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/Columns.metadata.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/Columns.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,24 +0,0 @@
-ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
-TABLE_CAT 12 string java.lang.String 0 Columns System PartsSupplier
-TABLE_SCHEM 12 string java.lang.String 1 Columns System PartsSupplier
-TABLE_NAME 12 string java.lang.String 0 Columns System PartsSupplier
-COLUMN_NAME 12 string java.lang.String 0 Columns System PartsSupplier
-DATA_TYPE 5 short java.lang.Short 1 null null PartsSupplier
-TYPE_NAME 12 string java.lang.String 0 Columns System PartsSupplier
-COLUMN_SIZE 4 integer java.lang.Integer 1 null null PartsSupplier
-BUFFER_LENGTH 12 string java.lang.String 1 null null PartsSupplier
-DECIMAL_DIGITS 4 integer java.lang.Integer 0 Columns System PartsSupplier
-NUM_PREC_RADIX 4 integer java.lang.Integer 0 Columns System PartsSupplier
-NULLABLE 4 integer java.lang.Integer 1 null null PartsSupplier
-REMARKS 12 string java.lang.String 1 Columns System PartsSupplier
-COLUMN_DEF 12 string java.lang.String 1 Columns System PartsSupplier
-SQL_DATA_TYPE 12 string java.lang.String 1 null null PartsSupplier
-SQL_DATETIME_SUB 12 string java.lang.String 1 null null PartsSupplier
-CHAR_OCTET_LENGTH 4 integer java.lang.Integer 1 Columns System PartsSupplier
-ORDINAL_POSITION 4 integer java.lang.Integer 0 Columns System PartsSupplier
-IS_NULLABLE 12 string java.lang.String 1 null null PartsSupplier
-SCOPE_CATALOG 12 string java.lang.String 1 null null PartsSupplier
-SCOPE_SCHEMA 12 string java.lang.String 1 null null PartsSupplier
-SCOPE_TABLE 12 string java.lang.String 1 null null PartsSupplier
-SOURCE_DATA_TYPE 12 string java.lang.String 1 null null PartsSupplier
-IS_AUTOINCREMENT 12 string java.lang.String 1 null null PartsSupplier
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/Columns.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/Columns.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/Columns.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,141 +0,0 @@
-TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] COLUMN_NAME[string] DATA_TYPE[short] TYPE_NAME[string] COLUMN_SIZE[integer] BUFFER_LENGTH[string] DECIMAL_DIGITS[integer] NUM_PREC_RADIX[integer] NULLABLE[integer] REMARKS[string] COLUMN_DEF[string] SQL_DATA_TYPE[string] SQL_DATETIME_SUB[string] CHAR_OCTET_LENGTH[integer] ORDINAL_POSITION[integer] IS_NULLABLE[string] SCOPE_CATALOG[string] SCOPE_SCHEMA[string] SCOPE_TABLE[string] SOURCE_DATA_TYPE[string] IS_AUTOINCREMENT[string]
-PartsSupplier System Columns VDBName 12 string 255 null 0 10 0 null null null null 255 1 YES null null null null NO
-PartsSupplier System Columns SchemaName 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
-PartsSupplier System Columns TableName 12 string 255 null 0 10 0 null null null null 255 3 YES null null null null NO
-PartsSupplier System Columns Name 12 string 255 null 0 10 0 null null null null 255 4 YES null null null null NO
-PartsSupplier System Columns Position 4 integer 10 null 0 10 0 null null null null 10 5 YES null null null null NO
-PartsSupplier System Columns NameInSource 12 string 255 null 0 10 1 null null null null 255 6 NO null null null null NO
-PartsSupplier System Columns DataType 12 string 100 null 0 10 0 null null null null 100 7 YES null null null null NO
-PartsSupplier System Columns Scale 4 integer 10 null 0 10 0 null null null null 10 8 YES null null null null NO
-PartsSupplier System Columns ElementLength 4 integer 10 null 0 10 0 null null null null 10 9 YES null null null null NO
-PartsSupplier System Columns IsLengthFixed -7 boolean 1 null 0 10 0 null null null null 1 10 YES null null null null NO
-PartsSupplier System Columns SupportsSelect -7 boolean 1 null 0 10 0 null null null null 1 11 YES null null null null NO
-PartsSupplier System Columns SupportsUpdates -7 boolean 1 null 0 10 0 null null null null 1 12 YES null null null null NO
-PartsSupplier System Columns IsCaseSensitive -7 boolean 1 null 0 10 0 null null null null 1 13 YES null null null null NO
-PartsSupplier System Columns IsSigned -7 boolean 1 null 0 10 0 null null null null 1 14 YES null null null null NO
-PartsSupplier System Columns IsCurrency -7 boolean 1 null 0 10 0 null null null null 1 15 YES null null null null NO
-PartsSupplier System Columns IsAutoIncremented -7 boolean 1 null 0 10 0 null null null null 1 16 YES null null null null NO
-PartsSupplier System Columns NullType 12 string 20 null 0 10 0 null null null null 20 17 YES null null null null NO
-PartsSupplier System Columns MinRange 12 string 50 null 0 10 1 null null null null 50 18 NO null null null null NO
-PartsSupplier System Columns MaxRange 12 string 50 null 0 10 1 null null null null 50 19 NO null null null null NO
-PartsSupplier System Columns SearchType 12 string 20 null 0 10 0 null null null null 20 20 YES null null null null NO
-PartsSupplier System Columns Format 12 string 255 null 0 10 1 null null null null 255 21 NO null null null null NO
-PartsSupplier System Columns DefaultValue 12 string 255 null 0 10 1 null null null null 255 22 NO null null null null NO
-PartsSupplier System Columns JavaClass 12 string 500 null 0 10 0 null null null null 500 23 YES null null null null NO
-PartsSupplier System Columns Precision 4 integer 10 null 0 10 0 null null null null 10 24 YES null null null null NO
-PartsSupplier System Columns CharOctetLength 4 integer 10 null 0 10 1 null null null null 10 25 NO null null null null NO
-PartsSupplier System Columns Radix 4 integer 10 null 0 10 0 null null null null 10 26 YES null null null null NO
-PartsSupplier System Columns UID 12 string 50 null 0 10 0 null null null null 50 27 YES null null null null NO
-PartsSupplier System Columns Description 12 string 255 null 0 10 1 null null null null 255 28 NO null null null null NO
-PartsSupplier System DataTypes Name 12 string 100 null 0 10 0 null null null null 100 1 YES null null null null NO
-PartsSupplier System DataTypes IsStandard -7 boolean 1 null 0 10 1 null null null null 1 2 NO null null null null NO
-PartsSupplier System DataTypes IsPhysical -7 boolean 1 null 0 10 1 null null null null 1 3 NO null null null null NO
-PartsSupplier System DataTypes TypeName 12 string 100 null 0 10 0 null null null null 100 4 YES null null null null NO
-PartsSupplier System DataTypes JavaClass 12 string 500 null 0 10 0 null null null null 500 5 YES null null null null NO
-PartsSupplier System DataTypes Scale 4 integer 10 null 0 10 1 null (0) null null 10 6 NO null null null null NO
-PartsSupplier System DataTypes TypeLength 4 integer 10 null 0 10 0 null (0) null null 10 7 YES null null null null NO
-PartsSupplier System DataTypes NullType 12 string 20 null 0 10 0 null null null null 20 8 YES null null null null NO
-PartsSupplier System DataTypes IsSigned -7 boolean 1 null 0 10 0 null ('0') null null 1 9 YES null null null null NO
-PartsSupplier System DataTypes IsAutoIncremented -7 boolean 1 null 0 10 0 null ('0') null null 1 10 YES null null null null NO
-PartsSupplier System DataTypes IsCaseSensitive -7 boolean 1 null 0 10 0 null ('0') null null 1 11 YES null null null null NO
-PartsSupplier System DataTypes Precision 4 integer 10 null 0 10 0 null null null null 10 12 YES null null null null NO
-PartsSupplier System DataTypes Radix 4 integer 10 null 0 10 1 null null null null 10 13 NO null null null null NO
-PartsSupplier System DataTypes SearchType 12 string 20 null 0 10 0 null null null null 20 14 YES null null null null NO
-PartsSupplier System DataTypes UID 12 string 50 null 0 10 0 null null null null 50 15 YES null null null null NO
-PartsSupplier System DataTypes RuntimeType 12 string 64 null 0 10 1 null null null null 64 16 NO null null null null NO
-PartsSupplier System DataTypes BaseType 12 string 64 null 0 10 1 null null null null 64 17 NO null null null null NO
-PartsSupplier System DataTypes Description 12 string 255 null 0 10 1 null null null null 255 18 NO null null null null NO
-PartsSupplier System KeyColumns VDBName 12 string 255 null 0 10 0 null null null null 255 1 YES null null null null NO
-PartsSupplier System KeyColumns SchemaName 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
-PartsSupplier System KeyColumns TableName 12 string 2048 null 0 10 0 null null null null 2048 3 YES null null null null NO
-PartsSupplier System KeyColumns Name 12 string 255 null 0 10 0 null null null null 255 4 YES null null null null NO
-PartsSupplier System KeyColumns KeyName 12 string 255 null 0 10 1 null null null null 255 5 NO null null null null NO
-PartsSupplier System KeyColumns KeyType 12 string 20 null 0 10 0 null null null null 20 6 YES null null null null NO
-PartsSupplier System KeyColumns RefKeyUID 12 string 50 null 0 10 1 null null null null 50 7 NO null null null null NO
-PartsSupplier System KeyColumns UID 12 string 50 null 0 10 0 null null null null 50 8 YES null null null null NO
-PartsSupplier System KeyColumns Position 4 integer 10 null 0 10 1 null null null null 10 9 NO null null null null NO
-PartsSupplier System Keys VDBName 12 string 255 null 0 10 0 null null null null 255 1 YES null null null null NO
-PartsSupplier System Keys SchemaName 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
-PartsSupplier System Keys TableName 12 string 2048 null 0 10 0 null null null null 2048 3 YES null null null null NO
-PartsSupplier System Keys Name 12 string 255 null 0 10 0 null null null null 255 4 YES null null null null NO
-PartsSupplier System Keys Description 12 string 255 null 0 10 1 null null null null 255 5 NO null null null null NO
-PartsSupplier System Keys NameInSource 12 string 255 null 0 10 1 null null null null 255 6 NO null null null null NO
-PartsSupplier System Keys Type 12 string 20 null 0 10 0 null null null null 20 7 YES null null null null NO
-PartsSupplier System Keys IsIndexed -7 boolean 1 null 0 10 0 null null null null 1 8 YES null null null null NO
-PartsSupplier System Keys RefKeyUID 12 string 50 null 0 10 1 null null null null 50 9 NO null null null null NO
-PartsSupplier System Keys UID 12 string 50 null 0 10 0 null null null null 50 10 YES null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_ID 12 string 4 null 0 10 0 null null null null 4 1 YES null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_NAME 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_COLOR 12 string 30 null 0 10 1 null null null null 30 3 NO null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_WEIGHT 12 string 255 null 0 10 1 null null null null 255 4 NO null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.SHIP_VIA SHIPPER_ID 5 short 2 null 0 10 0 null null null null 0 1 YES null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.SHIP_VIA SHIPPER_NAME 12 string 30 null 0 10 1 null null null null 30 2 NO null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS STATUS_ID 5 short 2 null 0 10 0 null null null null 0 1 YES null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS STATUS_NAME 12 string 30 null 0 10 1 null null null null 30 2 NO null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_ID 12 string 10 null 0 10 0 null null null null 10 1 YES null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_NAME 12 string 30 null 0 10 1 null null null null 30 2 NO null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_STATUS 5 short 2 null 0 10 1 null null null null 0 3 NO null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_CITY 12 string 30 null 0 10 1 null null null null 30 4 NO null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_STATE 12 string 2 null 0 10 1 null null null null 2 5 NO null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS SUPPLIER_ID 12 string 10 null 0 10 0 null null null null 10 1 YES null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS PART_ID 12 string 4 null 0 10 0 null null null null 4 2 YES null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS QUANTITY 5 short 3 null 0 10 1 null null null null 0 3 NO null null null null NO
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS SHIPPER_ID 5 short 2 null 0 10 1 null null null null 0 4 NO null null null null NO
-PartsSupplier System ProcedureParams VDBName 12 string 255 null 0 10 0 null null null null 255 1 YES null null null null NO
-PartsSupplier System ProcedureParams SchemaName 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
-PartsSupplier System ProcedureParams ProcedureName 12 string 255 null 0 10 0 null null null null 255 3 YES null null null null NO
-PartsSupplier System ProcedureParams Name 12 string 255 null 0 10 0 null null null null 255 4 YES null null null null NO
-PartsSupplier System ProcedureParams DataType 12 string 25 null 0 10 0 null null null null 25 5 YES null null null null NO
-PartsSupplier System ProcedureParams Position 4 integer 10 null 0 10 0 null null null null 10 6 YES null null null null NO
-PartsSupplier System ProcedureParams Type 12 string 100 null 0 10 0 null null null null 100 7 YES null null null null NO
-PartsSupplier System ProcedureParams Optional -7 boolean 1 null 0 10 0 null null null null 1 8 YES null null null null NO
-PartsSupplier System ProcedureParams Precision 4 integer 10 null 0 10 0 null null null null 10 9 YES null null null null NO
-PartsSupplier System ProcedureParams TypeLength 4 integer 10 null 0 10 0 null (0) null null 10 10 YES null null null null NO
-PartsSupplier System ProcedureParams Scale 4 integer 10 null 0 10 0 null (0) null null 10 11 YES null null null null NO
-PartsSupplier System ProcedureParams Radix 4 integer 10 null 0 10 0 null null null null 10 12 YES null null null null NO
-PartsSupplier System ProcedureParams NullType 12 string 10 null 0 10 0 null null null null 10 13 YES null null null null NO
-PartsSupplier System ProcedureParams UID 12 string 50 null 0 10 1 null null null null 50 14 NO null null null null NO
-PartsSupplier System Procedures VDBName 12 string 255 null 0 10 0 null null null null 255 1 YES null null null null NO
-PartsSupplier System Procedures SchemaName 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
-PartsSupplier System Procedures Name 12 string 255 null 0 10 0 null null null null 255 3 YES null null null null NO
-PartsSupplier System Procedures NameInSource 12 string 255 null 0 10 1 null null null null 255 4 NO null null null null NO
-PartsSupplier System Procedures ReturnsResults -7 boolean 1 null 0 10 0 null null null null 1 5 YES null null null null NO
-PartsSupplier System Procedures UID 12 string 50 null 0 10 0 null null null null 50 6 YES null null null null NO
-PartsSupplier System Procedures Description 12 string 255 null 0 10 1 null null null null 255 7 NO null null null null NO
-PartsSupplier System Properties Name 12 string 255 null 0 10 0 null null null null 255 1 YES null null null null NO
-PartsSupplier System Properties Value 12 string 255 null 0 10 0 null null null null 255 2 YES null null null null NO
-PartsSupplier System Properties UID 12 string 50 null 0 10 0 null null null null 50 3 YES null null null null NO
-PartsSupplier System ReferenceKeyColumns PKTABLE_CAT 12 string 255 null 0 10 1 null null null null 255 1 NO null null null null NO
-PartsSupplier System ReferenceKeyColumns PKTABLE_SCHEM 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
-PartsSupplier System ReferenceKeyColumns PKTABLE_NAME 12 string 255 null 0 10 1 null null null null 255 3 NO null null null null NO
-PartsSupplier System ReferenceKeyColumns PKCOLUMN_NAME 12 string 255 null 0 10 1 null null null null 255 4 NO null null null null NO
-PartsSupplier System ReferenceKeyColumns FKTABLE_CAT 12 string 255 null 0 10 1 null null null null 255 5 NO null null null null NO
-PartsSupplier System ReferenceKeyColumns FKTABLE_SCHEM 12 string 255 null 0 10 1 null null null null 255 6 NO null null null null NO
-PartsSupplier System ReferenceKeyColumns FKTABLE_NAME 12 string 255 null 0 10 1 null null null null 255 7 NO null null null null NO
-PartsSupplier System ReferenceKeyColumns FKCOLUMN_NAME 12 string 255 null 0 10 1 null null null null 255 8 NO null null null null NO
-PartsSupplier System ReferenceKeyColumns KEY_SEQ 5 short 5 null 0 10 1 null null null null 5 9 NO null null null null NO
-PartsSupplier System ReferenceKeyColumns UPDATE_RULE 4 integer 10 null 0 10 1 null null null null 10 10 NO null null null null NO
-PartsSupplier System ReferenceKeyColumns DELETE_RULE 4 integer 10 null 0 10 1 null null null null 10 11 NO null null null null NO
-PartsSupplier System ReferenceKeyColumns FK_NAME 12 string 255 null 0 10 1 null null null null 255 12 NO null null null null NO
-PartsSupplier System ReferenceKeyColumns PK_NAME 12 string 255 null 0 10 1 null null null null 255 13 NO null null null null NO
-PartsSupplier System ReferenceKeyColumns DEFERRABILITY 4 integer 10 null 0 10 1 null null null null 10 14 NO null null null null NO
-PartsSupplier System Schemas VDBName 12 string 255 null 0 10 1 null null null null 255 1 NO null null null null NO
-PartsSupplier System Schemas Name 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
-PartsSupplier System Schemas IsPhysical -7 boolean 1 null 0 10 0 null null null null 1 3 YES null null null null NO
-PartsSupplier System Schemas UID 12 string 50 null 0 10 0 null null null null 50 4 YES null null null null NO
-PartsSupplier System Schemas Description 12 string 255 null 0 10 1 null null null null 255 5 NO null null null null NO
-PartsSupplier System Schemas PrimaryMetamodelURI 12 string 255 null 0 10 0 null null null null 255 6 YES null null null null NO
-PartsSupplier System Tables VDBName 12 string 255 null 0 10 1 null null null null 255 1 NO null null null null NO
-PartsSupplier System Tables SchemaName 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
-PartsSupplier System Tables Name 12 string 255 null 0 10 0 null null null null 255 3 YES null null null null NO
-PartsSupplier System Tables Type 12 string 20 null 0 10 0 null null null null 20 4 YES null null null null NO
-PartsSupplier System Tables NameInSource 12 string 255 null 0 10 1 null null null null 255 5 NO null null null null NO
-PartsSupplier System Tables IsPhysical -7 boolean 1 null 0 10 0 null null null null 1 6 YES null null null null NO
-PartsSupplier System Tables SupportsUpdates -7 boolean 1 null 0 10 0 null null null null 1 7 YES null null null null NO
-PartsSupplier System Tables UID 12 string 50 null 0 10 0 null null null null 50 8 YES null null null null NO
-PartsSupplier System Tables Cardinality 4 integer 10 null 0 10 0 null null null null 10 9 YES null null null null NO
-PartsSupplier System Tables Description 12 string 255 null 0 10 1 null null null null 255 10 NO null null null null NO
-PartsSupplier System Tables IsSystem -7 boolean 1 null 0 10 1 null null null null 1 11 NO null null null null NO
-PartsSupplier System Tables IsMaterialized -7 boolean 1 null 0 10 0 null null null null 0 12 YES null null null null NO
-PartsSupplier System VirtualDatabases Name 12 string 255 null 0 10 0 null null null null 255 1 YES null null null null NO
-PartsSupplier System VirtualDatabases Version 12 string 50 null 0 10 0 null null null null 50 2 YES null null null null NO
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/CrossReference.metadata.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/CrossReference.metadata.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/CrossReference.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,15 +0,0 @@
-ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
-PKTABLE_CAT 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-PKTABLE_SCHEM 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-PKTABLE_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-PKCOLUMN_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-FKTABLE_CAT 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-FKTABLE_SCHEM 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-FKTABLE_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-FKCOLUMN_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-KEY_SEQ 5 short java.lang.Short 1 ReferenceKeyColumns System PartsSupplier
-UPDATE_RULE 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
-DELETE_RULE 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
-FK_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-PK_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-DEFERRABILITY 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/CrossReference.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/CrossReference.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/CrossReference.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,4 +0,0 @@
-PKTABLE_CAT[string] PKTABLE_SCHEM[string] PKTABLE_NAME[string] PKCOLUMN_NAME[string] FKTABLE_CAT[string] FKTABLE_SCHEM[string] FKTABLE_NAME[string] FKCOLUMN_NAME[string] KEY_SEQ[short] UPDATE_RULE[integer] DELETE_RULE[integer] FK_NAME[string] PK_NAME[string] DEFERRABILITY[integer]
-PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS STATUS_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_STATUS 1 3 3 FK_SPLIER_STATS PK_STATUS 5
-PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS PART_ID 1 3 3 FK_SPLIER_PRTS_PRTS PK_PARTS 5
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS SUPPLIER_ID 1 3 3 FK_SPLY_PRTS_SPLY PK_SUPPLIER 5
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/ExportedKeys.metadata.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/ExportedKeys.metadata.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/ExportedKeys.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,15 +0,0 @@
-ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
-PKTABLE_CAT 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-PKTABLE_SCHEM 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-PKTABLE_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-PKCOLUMN_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-FKTABLE_CAT 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-FKTABLE_SCHEM 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-FKTABLE_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-FKCOLUMN_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-KEY_SEQ 5 short java.lang.Short 1 ReferenceKeyColumns System PartsSupplier
-UPDATE_RULE 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
-DELETE_RULE 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
-FK_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-PK_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-DEFERRABILITY 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/ExportedKeys.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/ExportedKeys.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/ExportedKeys.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,4 +0,0 @@
-PKTABLE_CAT[string] PKTABLE_SCHEM[string] PKTABLE_NAME[string] PKCOLUMN_NAME[string] FKTABLE_CAT[string] FKTABLE_SCHEM[string] FKTABLE_NAME[string] FKCOLUMN_NAME[string] KEY_SEQ[short] UPDATE_RULE[integer] DELETE_RULE[integer] FK_NAME[string] PK_NAME[string] DEFERRABILITY[integer]
-PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS STATUS_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_STATUS 1 3 3 FK_SPLIER_STATS PK_STATUS 5
-PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS PART_ID 1 3 3 FK_SPLIER_PRTS_PRTS PK_PARTS 5
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS SUPPLIER_ID 1 3 3 FK_SPLY_PRTS_SPLY PK_SUPPLIER 5
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/ImportedKeys.metadata.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/ImportedKeys.metadata.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/ImportedKeys.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,15 +0,0 @@
-ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
-PKTABLE_CAT 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-PKTABLE_SCHEM 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-PKTABLE_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-PKCOLUMN_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-FKTABLE_CAT 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-FKTABLE_SCHEM 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-FKTABLE_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-FKCOLUMN_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-KEY_SEQ 5 short java.lang.Short 1 ReferenceKeyColumns System PartsSupplier
-UPDATE_RULE 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
-DELETE_RULE 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
-FK_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-PK_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
-DEFERRABILITY 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/ImportedKeys.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/ImportedKeys.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/ImportedKeys.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,4 +0,0 @@
-PKTABLE_CAT[string] PKTABLE_SCHEM[string] PKTABLE_NAME[string] PKCOLUMN_NAME[string] FKTABLE_CAT[string] FKTABLE_SCHEM[string] FKTABLE_NAME[string] FKCOLUMN_NAME[string] KEY_SEQ[short] UPDATE_RULE[integer] DELETE_RULE[integer] FK_NAME[string] PK_NAME[string] DEFERRABILITY[integer]
-PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS PART_ID 1 3 3 FK_SPLIER_PRTS_PRTS PK_PARTS 5
-PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS STATUS_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_STATUS 1 3 3 FK_SPLIER_STATS PK_STATUS 5
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS SUPPLIER_ID 1 3 3 FK_SPLY_PRTS_SPLY PK_SUPPLIER 5
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/IndexInfo.metadata.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/IndexInfo.metadata.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/IndexInfo.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,14 +0,0 @@
-ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
-TABLE_CAT 12 string java.lang.String 0 KeyColumns System PartsSupplier
-TABLE_SCHEM 12 string java.lang.String 1 KeyColumns System PartsSupplier
-TABLE_NAME 12 string java.lang.String 0 KeyColumns System PartsSupplier
-NON_UNIQUE -7 boolean java.lang.Boolean 1 null null PartsSupplier
-INDEX_QUALIFIER 12 string java.lang.String 1 null null PartsSupplier
-INDEX_NAME 12 string java.lang.String 1 KeyColumns System PartsSupplier
-TYPE 4 integer java.lang.Integer 1 null null PartsSupplier
-ORDINAL_POSITION 5 short java.lang.Short 1 null null PartsSupplier
-COLUMN_NAME 12 string java.lang.String 0 KeyColumns System PartsSupplier
-ASC_OR_DESC 12 string java.lang.String 1 null null PartsSupplier
-CARDINALITY 4 integer java.lang.Integer 1 null null PartsSupplier
-PAGES 4 integer java.lang.Integer 1 null null PartsSupplier
-FILTER_CONDITION 12 string java.lang.String 1 null null PartsSupplier
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/IndexInfo.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/IndexInfo.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/IndexInfo.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1 +0,0 @@
-TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] NON_UNIQUE[boolean] INDEX_QUALIFIER[string] INDEX_NAME[string] TYPE[integer] ORDINAL_POSITION[short] COLUMN_NAME[string] ASC_OR_DESC[string] CARDINALITY[integer] PAGES[integer] FILTER_CONDITION[string]
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/PrimaryKeys.metadata.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/PrimaryKeys.metadata.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/PrimaryKeys.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,7 +0,0 @@
-ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
-TABLE_CAT 12 string java.lang.String 0 KeyColumns System PartsSupplier
-TABLE_SCHEM 12 string java.lang.String 1 KeyColumns System PartsSupplier
-TABLE_NAME 12 string java.lang.String 0 KeyColumns System PartsSupplier
-COLUMN_NAME 12 string java.lang.String 0 KeyColumns System PartsSupplier
-KEY_SEQ 5 short java.lang.Short 1 null null PartsSupplier
-PK_NAME 12 string java.lang.String 1 KeyColumns System PartsSupplier
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/PrimaryKeys.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/PrimaryKeys.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/PrimaryKeys.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,7 +0,0 @@
-TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] COLUMN_NAME[string] KEY_SEQ[short] PK_NAME[string]
-PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_ID 1 PK_PARTS
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS PART_ID 2 PK_SUPPLIER_PARTS
-PartsSupplier PartsSupplier PARTSSUPPLIER.SHIP_VIA SHIPPER_ID 1 PK_SHIP_VIA
-PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS STATUS_ID 1 PK_STATUS
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS SUPPLIER_ID 1 PK_SUPPLIER_PARTS
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_ID 1 PK_SUPPLIER
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/ProcedureColumns.metadata.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/ProcedureColumns.metadata.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/ProcedureColumns.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,21 +0,0 @@
-ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
-PROCEDURE_CAT 12 string java.lang.String 0 ProcedureParams System PartsSupplier
-PROCEDURE_SCHEM 12 string java.lang.String 1 ProcedureParams System PartsSupplier
-PROCEDURE_NAME 12 string java.lang.String 0 ProcedureParams System PartsSupplier
-COLUMN_NAME 12 string java.lang.String 0 ProcedureParams System PartsSupplier
-COLUMN_TYPE 5 short java.lang.Short 1 null null PartsSupplier
-DATA_TYPE 4 integer java.lang.Integer 1 null null PartsSupplier
-TYPE_NAME 12 string java.lang.String 0 ProcedureParams System PartsSupplier
-PRECISION 4 integer java.lang.Integer 1 null null PartsSupplier
-LENGTH 4 integer java.lang.Integer 1 null null PartsSupplier
-SCALE 5 short java.lang.Short 1 null null PartsSupplier
-RADIX 4 integer java.lang.Integer 0 ProcedureParams System PartsSupplier
-NULLABLE 4 integer java.lang.Integer 1 null null PartsSupplier
-REMARKS 12 string java.lang.String 1 null null PartsSupplier
-COLUMN_DEF 12 string java.lang.String 1 null null PartsSupplier
-SQL_DATA_TYPE 12 string java.lang.String 1 null null PartsSupplier
-SQL_DATETIME_SUB 12 string java.lang.String 1 null null PartsSupplier
-CHAR_OCTET_LENGTH 12 string java.lang.String 1 null null PartsSupplier
-ORDINAL_POSITION 4 integer java.lang.Integer 0 ProcedureParams System PartsSupplier
-IS_NULLABLE 12 string java.lang.String 1 null null PartsSupplier
-SPECIFIC_NAME 12 string java.lang.String 0 ProcedureParams System PartsSupplier
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/ProcedureColumns.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/ProcedureColumns.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/ProcedureColumns.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,7 +0,0 @@
-PROCEDURE_CAT[string] PROCEDURE_SCHEM[string] PROCEDURE_NAME[string] COLUMN_NAME[string] COLUMN_TYPE[short] DATA_TYPE[integer] TYPE_NAME[string] PRECISION[integer] LENGTH[integer] SCALE[short] RADIX[integer] NULLABLE[integer] REMARKS[string] COLUMN_DEF[string] SQL_DATA_TYPE[string] SQL_DATETIME_SUB[string] CHAR_OCTET_LENGTH[string] ORDINAL_POSITION[integer] IS_NULLABLE[string] SPECIFIC_NAME[string]
-PartsSupplier System getBinaryVDBResource resourcePath 1 12 string 50 50 0 10 0 null null null null null 1 NO getBinaryVDBResource
-PartsSupplier System getBinaryVDBResource VdbResource 3 2004 blob 2147483647 2147483647 0 10 1 null null null null null 1 YES getBinaryVDBResource
-PartsSupplier System getCharacterVDBResource resourcePath 1 12 string 50 50 0 10 0 null null null null null 1 NO getCharacterVDBResource
-PartsSupplier System getCharacterVDBResource VdbResource 3 2005 clob 2147483647 2147483647 0 10 1 null null null null null 1 YES getCharacterVDBResource
-PartsSupplier System getVDBResourcePaths ResourcePath 3 12 string 50 50 0 10 1 null null null null null 1 YES getVDBResourcePaths
-PartsSupplier System getVDBResourcePaths isBinary 3 -7 boolean 1 1 0 10 1 null null null null null 2 YES getVDBResourcePaths
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/Procedures.metadata.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/Procedures.metadata.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/Procedures.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,10 +0,0 @@
-ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
-PROCEDURE_CAT 12 string java.lang.String 0 Procedures System PartsSupplier
-PROCEDURE_SCHEM 12 string java.lang.String 1 Procedures System PartsSupplier
-PROCEDURE_NAME 12 string java.lang.String 0 Procedures System PartsSupplier
-RESERVED_1 12 string java.lang.String 1 null null PartsSupplier
-RESERVED_2 12 string java.lang.String 1 null null PartsSupplier
-RESERVED_3 12 string java.lang.String 1 null null PartsSupplier
-REMARKS 12 string java.lang.String 1 Procedures System PartsSupplier
-PROCEDURE_TYPE 5 short java.lang.Short 1 null null PartsSupplier
-SPECIFIC_NAME 12 string java.lang.String 0 Procedures System PartsSupplier
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/Procedures.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/Procedures.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/Procedures.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,4 +0,0 @@
-PROCEDURE_CAT[string] PROCEDURE_SCHEM[string] PROCEDURE_NAME[string] RESERVED_1[string] RESERVED_2[string] RESERVED_3[string] REMARKS[string] PROCEDURE_TYPE[short] SPECIFIC_NAME[string]
-PartsSupplier System getBinaryVDBResource null null null null 2 getBinaryVDBResource
-PartsSupplier System getCharacterVDBResource null null null null 2 getCharacterVDBResource
-PartsSupplier System getVDBResourcePaths null null null null 2 getVDBResourcePaths
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/Schemas.metadata.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/Schemas.metadata.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/Schemas.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,3 +0,0 @@
-ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
-TABLE_SCHEM 12 string java.lang.String 1 Schemas System PartsSupplier
-TABLE_CATALOG 12 string java.lang.String 1 Schemas System PartsSupplier
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/Schemas.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/Schemas.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/Schemas.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,3 +0,0 @@
-TABLE_SCHEM[string] TABLE_CATALOG[string]
-PartsSupplier PartsSupplier
-System PartsSupplier
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/Tables.metadata.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/Tables.metadata.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/Tables.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,12 +0,0 @@
-ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
-TABLE_CAT 12 string java.lang.String 1 Tables System PartsSupplier
-TABLE_SCHEM 12 string java.lang.String 1 Tables System PartsSupplier
-TABLE_NAME 12 string java.lang.String 0 Tables System PartsSupplier
-TABLE_TYPE 12 string java.lang.String 1 null null PartsSupplier
-REMARKS 12 string java.lang.String 1 Tables System PartsSupplier
-TYPE_CAT 12 string java.lang.String 1 null null PartsSupplier
-TYPE_SCHEM 12 string java.lang.String 1 null null PartsSupplier
-TYPE_NAME 12 string java.lang.String 1 null null PartsSupplier
-SELF_REFERENCING_COL_NAME 12 string java.lang.String 1 null null PartsSupplier
-REF_GENERATION 12 string java.lang.String 1 null null PartsSupplier
-ISPHYSICAL -7 boolean java.lang.Boolean 0 Tables System PartsSupplier
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/Tables.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/Tables.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/Tables.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,17 +0,0 @@
-TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] TABLE_TYPE[string] REMARKS[string] TYPE_CAT[string] TYPE_SCHEM[string] TYPE_NAME[string] SELF_REFERENCING_COL_NAME[string] REF_GENERATION[string] ISPHYSICAL[boolean]
-PartsSupplier System Columns SYSTEM TABLE null null null null null null true
-PartsSupplier System DataTypes SYSTEM TABLE null null null null null null true
-PartsSupplier System KeyColumns SYSTEM TABLE null null null null null null true
-PartsSupplier System Keys SYSTEM TABLE null null null null null null true
-PartsSupplier System ProcedureParams SYSTEM TABLE null null null null null null true
-PartsSupplier System Procedures SYSTEM TABLE null null null null null null true
-PartsSupplier System Properties SYSTEM TABLE null null null null null null true
-PartsSupplier System ReferenceKeyColumns SYSTEM TABLE null null null null null null true
-PartsSupplier System Schemas SYSTEM TABLE null null null null null null true
-PartsSupplier System Tables SYSTEM TABLE null null null null null null true
-PartsSupplier System VirtualDatabases SYSTEM TABLE null null null null null null true
-PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS TABLE null null null null null null true
-PartsSupplier PartsSupplier PARTSSUPPLIER.SHIP_VIA TABLE null null null null null null true
-PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS TABLE null null null null null null true
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER TABLE null null null null null null true
-PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS TABLE null null null null null null true
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/TypeInfo.metadata.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/TypeInfo.metadata.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/TypeInfo.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,19 +0,0 @@
-ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
-TYPE_NAME 12 string java.lang.String 0 DataTypes System PartsSupplier
-DATA_TYPE 4 integer java.lang.Integer 1 DataTypes System PartsSupplier
-PRECISION 4 integer java.lang.Integer 1 DataTypes System PartsSupplier
-LITERAL_PREFIX 12 string java.lang.String 1 DataTypes System PartsSupplier
-LITERAL_SUFFIX 12 string java.lang.String 1 DataTypes System PartsSupplier
-CREATE_PARAMS 12 string java.lang.String 1 DataTypes System PartsSupplier
-NULLABLE 5 short java.lang.Short 1 DataTypes System PartsSupplier
-CASE_SENSITIVE -7 boolean java.lang.Boolean 0 DataTypes System PartsSupplier
-SEARCHABLE 5 short java.lang.Short 1 DataTypes System PartsSupplier
-UNSIGNED_ATTRIBUTE -7 boolean java.lang.Boolean 1 DataTypes System PartsSupplier
-FIXED_PREC_SCALE -7 boolean java.lang.Boolean 1 DataTypes System PartsSupplier
-AUTO_INCREMENT -7 boolean java.lang.Boolean 0 DataTypes System PartsSupplier
-LOCAL_TYPE_NAME 12 string java.lang.String 0 DataTypes System PartsSupplier
-MINIMUM_SCALE 5 short java.lang.Short 1 DataTypes System PartsSupplier
-MAXIMUM_SCALE 5 short java.lang.Short 1 DataTypes System PartsSupplier
-SQL_DATA_TYPE 4 integer java.lang.Integer 1 DataTypes System PartsSupplier
-SQL_DATETIME_SUB 4 integer java.lang.Integer 1 DataTypes System PartsSupplier
-NUM_PREC_RADIX 4 integer java.lang.Integer 1 DataTypes System PartsSupplier
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/TypeInfo.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/TypeInfo.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/TypeInfo.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,19 +0,0 @@
-TYPE_NAME[string] DATA_TYPE[integer] PRECISION[integer] LITERAL_PREFIX[string] LITERAL_SUFFIX[string] CREATE_PARAMS[string] NULLABLE[short] CASE_SENSITIVE[boolean] SEARCHABLE[short] UNSIGNED_ATTRIBUTE[boolean] FIXED_PREC_SCALE[boolean] AUTO_INCREMENT[boolean] LOCAL_TYPE_NAME[string] MINIMUM_SCALE[short] MAXIMUM_SCALE[short] SQL_DATA_TYPE[integer] SQL_DATETIME_SUB[integer] NUM_PREC_RADIX[integer]
-boolean -7 1 {b' } null 1 false 3 true true false boolean 0 255 null null 0
-byte -6 3 null null null 1 false 3 true true false byte 0 255 null null 0
-long -5 19 null null null 1 false 3 false false false long 0 255 null null 10
-char 1 1 ' ' null 1 false 3 true true false char 0 255 null null 0
-bigdecimal 2 20 null null null 1 false 3 false true false bigdecimal 0 255 null null 10
-biginteger 2 19 null null null 1 false 3 false false false biginteger 0 255 null null 10
-integer 4 10 null null null 1 false 3 false false false integer 0 255 null null 10
-short 5 5 null null null 1 false 3 false false false short 0 255 null null 10
-float 7 20 null null null 1 false 3 false false false float 0 255 null null 10
-double 8 20 null null null 1 false 3 false false false double 0 255 null null 10
-string 12 4000 ' ' null 1 false 3 true true false string 0 255 null null 0
-xml 2009 2147483647 null null null 1 false 3 true true false xml 0 255 null null 0
-date 91 10 {d' } null 1 false 3 true true false date 0 255 null null 0
-time 92 8 {t' } null 1 false 3 true true false time 0 255 null null 0
-timestamp 93 29 {ts' } null 1 false 3 true true false timestamp 0 255 null null 0
-object 2000 2147483647 null null null 1 false 3 true true false object 0 255 null null 0
-blob 2004 2147483647 null null null 1 false 3 true true false blob 0 255 null null 0
-clob 2005 2147483647 null null null 1 false 3 true true false clob 0 255 null null 0
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/UDTs.metadata.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/UDTs.metadata.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/UDTs.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,8 +0,0 @@
-ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
-TYPE_CAT 12 string java.lang.String 2 null null PartsSupplier
-TYPE_SCHEM 12 string java.lang.String 2 null null PartsSupplier
-TYPE_NAME 12 string java.lang.String 2 null null PartsSupplier
-CLASS_NAME 12 string java.lang.String 2 null null PartsSupplier
-DATA_TYPE 12 string java.lang.String 2 null null PartsSupplier
-REMARKS 12 string java.lang.String 2 null null PartsSupplier
-BASE_TYPE 5 short java.lang.Short 2 null null PartsSupplier
Deleted: trunk/test-integration/common/src/test/resources/partssupplier/expected/UDTs.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/partssupplier/expected/UDTs.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/partssupplier/expected/UDTs.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1 +0,0 @@
-TYPE_CAT[string] TYPE_SCHEM[string] TYPE_NAME[string] CLASS_NAME[string] DATA_TYPE[string] REMARKS[string] BASE_TYPE[short]
Deleted: trunk/test-integration/common/src/test/resources/vdbless/ConfigurationInfo.def
===================================================================
--- trunk/test-integration/common/src/test/resources/vdbless/ConfigurationInfo.def 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/vdbless/ConfigurationInfo.def 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<VDB>
- <VDBInfo>
- <Property Name="Name" Value="VDBLess" />
- <Property Name="Version" Value="2" />
- <Property Name="UseConnectorMetadata" Value="cached" />
- </VDBInfo>
- <Model>
- <Property Name="Name" Value="SummitData" />
- <ConnectorBindings>
- <Connector Name="Text Connector" />
- </ConnectorBindings>
- </Model>
- <Model>
- <Property Name="Name" Value="Derby" />
-
- <ConnectorBindings>
- <Connector Name="Derby Connector" />
- </ConnectorBindings>
-
- <!-- import settings -->
- <Property Name="importer.useFullSchemaName" Value="false"/>
- </Model>
- <ConnectorBindings>
- <Connector Name="Text Connector" ComponentType="Text File Connector">
- <Properties>
- <Property Name="Immutable">true</Property>
- <Property Name="DescriptorFile">src/test/resources/vdbless/TextDescriptor.txt</Property>
- </Properties>
- </Connector>
- <Connector Name="Derby Connector" ComponentType="Apache Derby Embedded Connector">
- <Properties>
- <Property Name="Immutable">true</Property>
- <Property Name="URL">jdbc:derby:jar:(src/test/resources/derby/sample.zip)bqt</Property>
- </Properties>
- </Connector>
- </ConnectorBindings>
-</VDB>
-
Deleted: trunk/test-integration/common/src/test/resources/vdbless/TextData.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/vdbless/TextData.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/vdbless/TextData.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,2 +0,0 @@
-x,1
-y,2
\ No newline at end of file
Deleted: trunk/test-integration/common/src/test/resources/vdbless/TextDescriptor.txt
===================================================================
--- trunk/test-integration/common/src/test/resources/vdbless/TextDescriptor.txt 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/vdbless/TextDescriptor.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,4 +0,0 @@
-SummitData.Example.location = src/test/resources/vdbless/TextData.txt
-SummitData.Example.delimiter = ,
-SummitData.Example.columns = TRADEID,NOTIONAL
-SummitData.Example.types = STRING, INTEGER
Deleted: trunk/test-integration/common/src/test/resources/vdbless/dqp.properties
===================================================================
--- trunk/test-integration/common/src/test/resources/vdbless/dqp.properties 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/vdbless/dqp.properties 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,32 +0,0 @@
-#
-# JBoss, Home of Professional Open Source.
-# See the COPYRIGHT.txt file distributed with this work for information
-# regarding copyright ownership. Some portions may be licensed
-# to Red Hat, Inc. under one or more contributor license agreements.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA.
-#
-
-dqp.configFile=../ServerConfig.xml
-dqp.buffer.usedisk=false
-vdb.definition=./ConfigurationInfo.def
-processorDebugAllowed=true
-#only for testing, as this takes more time to start and shutdown
-xa.enable_recovery=false
-
-teiid.home=target/scratch/vdbsless
-
-processName=vdbless
\ No newline at end of file
Deleted: trunk/test-integration/common/src/test/resources/xml-vp/xmlvp.DEF
===================================================================
--- trunk/test-integration/common/src/test/resources/xml-vp/xmlvp.DEF 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/xml-vp/xmlvp.DEF 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<VDB>
- <Header>
- <VDBExporterVersion>4.1</VDBExporterVersion>
- <ApplicationCreatedBy>MetaMatrix Console</ApplicationCreatedBy>
- <ApplicationVersion>4.3:2164</ApplicationVersion>
- <UserCreatedBy>MetaMatrixAdmin</UserCreatedBy>
- <MetaMatrixSystemVersion>4.3</MetaMatrixSystemVersion>
- <Time>2005-07-25T13:19:44.501-06:00</Time>
- </Header>
- <VDBInfo>
- <Property Name="Name" Value="xmlvp" />
- <Property Name="GUID" Value="mmuuid:c101df82-0b8a-1f51-ae3d-96f82e6d8836" />
- <Property Name="Version" Value="1" />
- <Property Name="VDBArchiveName" Value="xmlvp_1.vdb" />
- <Property Name="Description" Value="" />
- <Property Name="IsActive" Value="true" />
- </VDBInfo>
- <Model>
- <Property Name="Name" Value="test2" />
- <Property Name="Visibility" Value="Public" />
- <Property Name="MultiSourceEnabled" Value="false" />
- </Model>
- <Model>
- <Property Name="Name" Value="BQT1" />
- <Property Name="Visibility" Value="Public" />
- <Property Name="MultiSourceEnabled" Value="false" />
- <ConnectorBindings>
- <Connector Name="BQT2 Oracle 9i Simple Cap" />
- </ConnectorBindings>
- </Model>
- <Model>
- <Property Name="Name" Value="testDoc" />
- <Property Name="Visibility" Value="Public" />
- <Property Name="MultiSourceEnabled" Value="false" />
- </Model>
- <Model>
- <Property Name="Name" Value="test" />
- <Property Name="Visibility" Value="Public" />
- <Property Name="MultiSourceEnabled" Value="false" />
- </Model>
- <Model>
- <Property Name="Name" Value="test13326Doc" />
- <Property Name="Visibility" Value="Public" />
- <Property Name="MultiSourceEnabled" Value="false" />
- </Model>
- <ComponentTypes>
- <ComponentType Name="Loopback Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2005-07-21T10:07:40.921-06:00" CreatedBy="ConfigurationStartup" CreationDate="2005-07-21T10:07:40.921-06:00">
- <ComponentTypeDefn Deprecated="false">
- <PropertyDefinition Name="CapabilitiesClass" DisplayName="Capabilities Class" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
- </ComponentTypeDefn>
- <ComponentTypeDefn Deprecated="false">
- <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.loopback.LoopbackConnector" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
- </ComponentTypeDefn>
- <ComponentTypeDefn Deprecated="false">
- <PropertyDefinition Name="RowCount" DisplayName="Rows Per Query" ShortDescription="" DefaultValue="1" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
- </ComponentTypeDefn>
- <ComponentTypeDefn Deprecated="false">
- <PropertyDefinition Name="WaitTime" DisplayName="Max Random Wait Time" ShortDescription="" DefaultValue="0" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
- </ComponentTypeDefn>
- <ComponentTypeDefn Deprecated="false">
- <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" DefaultValue="extensionjar:loopbackconn.jar;extensionjar:jdbcconn.jar" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
- </ComponentTypeDefn>
- </ComponentType>
- </ComponentTypes>
- <ConnectorBindings>
- <Connector Name="BQT2 Oracle 9i Simple Cap" ComponentType="Loopback Connector" LastChangedBy="metamatrixadmin" LastChangedDate="2005-07-20T12:58:35.551-06:00" CreatedBy="metamatrixadmin" CreationDate="2005-07-20T11:39:55.961-06:00" QueuedService="false" routingUUID="mmuuid:a6ea7cc0-c651-1f91-940a-b13465b430eb">
- <Properties>
- <Property Name="MaxResultRows">10000</Property>
- <Property Name="ConnectorThreadTTL">120000</Property>
- <Property Name="ConnectorMaxThreads">5</Property>
- <Property Name="CapabilitiesClass" />
- <Property Name="metamatrix.service.essentialservice">false</Property>
- <Property Name="ConnectorClassPath">extensionjar:loopbackconn.jar</Property>
- <Property Name="RowCount">1</Property>
- <Property Name="ServiceClassName">com.metamatrix.server.connector.service.ConnectorService</Property>
- <Property Name="ConnectorClass">com.metamatrix.connector.loopback.LoopbackConnector</Property>
- <Property Name="WaitTime">0</Property>
- </Properties>
- </Connector>
- </ConnectorBindings>
-</VDB>
-
Deleted: trunk/test-integration/common/src/test/resources/xml-vp/xmlvp.properties
===================================================================
--- trunk/test-integration/common/src/test/resources/xml-vp/xmlvp.properties 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/common/src/test/resources/xml-vp/xmlvp.properties 2010-03-06 17:12:02 UTC (rev 1932)
@@ -1,37 +0,0 @@
-#
-# JBoss, Home of Professional Open Source.
-# See the COPYRIGHT.txt file distributed with this work for information
-# regarding copyright ownership. Some portions may be licensed
-# to Red Hat, Inc. under one or more contributor license agreements.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 USA.
-#
-
-dqp.configFile=../ServerConfig.xml
-#dqp.metadata.systemURL=file://${system-vdb-path}/System.vdb
-vdb.definition=./xmlvp.DEF
-#metamatrix.security.password.PasswordKeyStore=c3B1dG5pazEz
-#dqp.logFile=./logs/DQP.log
-#dqp.logLevel=2
-#dqp.classpath=./lib/;./license/;./lib/metamatrix-dqp.jar;./lib/bcprov-jdk14-122.jar;./extensions/MJjdbc.jar
-dqp.buffer.usedisk=false
-
-#only for testing, as this takes more time to start and shutdown
-xa.enable_recovery=false
-
-teiid.home=target/scratch/xml-vp
-
-processName=xml-vp
Deleted: trunk/test-integration/common/src/test/resources/xml-vp/xmlvp_1.vdb
===================================================================
(Binary files differ)
Modified: trunk/test-integration/db/.classpath
===================================================================
--- trunk/test-integration/db/.classpath 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/db/.classpath 2010-03-06 17:12:02 UTC (rev 1932)
@@ -3,6 +3,7 @@
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" path="resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
Copied: trunk/test-integration/db/resources/3473/3473.properties (from rev 1930, trunk/test-integration/common/src/test/resources/3473/3473.properties)
===================================================================
--- trunk/test-integration/db/resources/3473/3473.properties (rev 0)
+++ trunk/test-integration/db/resources/3473/3473.properties 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,37 @@
+#
+# JBoss, Home of Professional Open Source.
+# See the COPYRIGHT.txt file distributed with this work for information
+# regarding copyright ownership. Some portions may be licensed
+# to Red Hat, Inc. under one or more contributor license agreements.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
+#
+
+dqp.configFile=../ServerConfig.xml
+#dqp.metadata.systemURL=file://${system-vdb-path}/System.vdb
+vdb.definition=./test.vdb
+#metamatrix.security.password.PasswordKeyStore=c3B1dG5pazEz
+#dqp.logFile=./logs/DQP.log
+dqp.logLevel=2
+
+processName=3473
+
+#only for testing, as this takes more time to start and shutdown
+xa.enable_recovery=false
+
+
+
+teiid.home=target/scratch
\ No newline at end of file
Copied: trunk/test-integration/db/resources/3473/test.vdb (from rev 1930, trunk/test-integration/common/src/test/resources/3473/test.vdb)
===================================================================
(Binary files differ)
Property changes on: trunk/test-integration/db/resources/3473/test.vdb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/test-integration/db/resources/3473/testGetCrossReference.expected (from rev 1930, trunk/test-integration/common/src/test/resources/3473/testGetCrossReference.expected)
===================================================================
--- trunk/test-integration/db/resources/3473/testGetCrossReference.expected (rev 0)
+++ trunk/test-integration/db/resources/3473/testGetCrossReference.expected 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,79 @@
+getCrossReference1
+string string string string string string string string short integer integer string string integer
+PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
+test test all_databases database_id test test all_models database_id 1 3 3 databae_model_fk databases_pk 5
+Row Count : 1
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
+UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+getCrossReference2
+string string string string string string string string short integer integer string string integer
+PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
+Row Count : 0
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
+UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+getCrossReference3
+string string string string string string string string short integer integer string string integer
+PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
+Row Count : 0
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
+UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+getCrossReference4
+string string string string string string string string short integer integer string string integer
+PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
+test test all_databases database_id test test all_models database_id 1 3 3 databae_model_fk databases_pk 5
+test test all_models model_id test test all_tables model_id 1 3 3 table_model_fk models_pk 5
+Row Count : 2
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
+UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
Copied: trunk/test-integration/db/resources/3473/testGetExportedKeys.expected (from rev 1930, trunk/test-integration/common/src/test/resources/3473/testGetExportedKeys.expected)
===================================================================
--- trunk/test-integration/db/resources/3473/testGetExportedKeys.expected (rev 0)
+++ trunk/test-integration/db/resources/3473/testGetExportedKeys.expected 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,55 @@
+string string string string string string string string short integer integer string string integer
+PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
+test test all_models model_id test test all_tables model_id 1 3 3 table_model_fk models_pk 5
+Row Count : 1
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
+UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+string string string string string string string string short integer integer string string integer
+PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
+Row Count : 0
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
+UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+string string string string string string string string short integer integer string string integer
+PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
+Row Count : 0
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
+UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
Copied: trunk/test-integration/db/resources/3473/testGetImportedKeys.expected (from rev 1930, trunk/test-integration/common/src/test/resources/3473/testGetImportedKeys.expected)
===================================================================
--- trunk/test-integration/db/resources/3473/testGetImportedKeys.expected (rev 0)
+++ trunk/test-integration/db/resources/3473/testGetImportedKeys.expected 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,58 @@
+getImportedKeys1
+string string string string string string string string short integer integer string string integer
+PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
+test test all_databases database_id test test all_models database_id 1 3 3 databae_model_fk databases_pk 5
+Row Count : 1
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
+UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+getImportedKeys2
+string string string string string string string string short integer integer string string integer
+PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
+Row Count : 0
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
+UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+getImportedKeys3
+string string string string string string string string short integer integer string string integer
+PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
+Row Count : 0
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+PKTABLE_CAT 12 test java.lang.String PKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_SCHEM 12 test java.lang.String PKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKTABLE_NAME 12 test java.lang.String PKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PKCOLUMN_NAME 12 test java.lang.String PKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_CAT 12 test java.lang.String FKTABLE_CAT string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_SCHEM 12 test java.lang.String FKTABLE_SCHEM string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKTABLE_NAME 12 test java.lang.String FKTABLE_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+FKCOLUMN_NAME 12 test java.lang.String FKCOLUMN_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+KEY_SEQ 5 test java.lang.Short KEY_SEQ short System ReferenceKeyColumns 6 5 0 false true false true 1 false true true true
+UPDATE_RULE 4 test java.lang.Integer UPDATE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+DELETE_RULE 4 test java.lang.Integer DELETE_RULE integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
+FK_NAME 12 test java.lang.String FK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+PK_NAME 12 test java.lang.String PK_NAME string System ReferenceKeyColumns 255 255 0 false true false true 1 false true true true
+DEFERRABILITY 4 test java.lang.Integer DEFERRABILITY integer System ReferenceKeyColumns 11 10 0 false true false true 1 false true true true
Copied: trunk/test-integration/db/resources/3473/testGetPrimaryKeys.expected (from rev 1930, trunk/test-integration/common/src/test/resources/3473/testGetPrimaryKeys.expected)
===================================================================
--- trunk/test-integration/db/resources/3473/testGetPrimaryKeys.expected (rev 0)
+++ trunk/test-integration/db/resources/3473/testGetPrimaryKeys.expected 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,31 @@
+string string string string short string
+TABLE_CAT TABLE_SCHEM TABLE_NAME COLUMN_NAME KEY_SEQ PK_NAME
+test test all_models model_id 1 models_pk
+Row Count : 1
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+TABLE_CAT 12 test java.lang.String TABLE_CAT string System KeyColumns 255 255 0 false false false false 0 true true false false
+TABLE_SCHEM 12 test java.lang.String TABLE_SCHEM string System KeyColumns 255 255 0 false true false true 1 false true true true
+TABLE_NAME 12 test java.lang.String TABLE_NAME string System KeyColumns 2048 2048 0 false true false false 0 true true false false
+COLUMN_NAME 12 test java.lang.String COLUMN_NAME string System KeyColumns 255 255 0 false false false false 0 true true false false
+KEY_SEQ 5 test java.lang.Short KEY_SEQ short <null> <null> 6 5 0 false false false true 1 false true true true
+PK_NAME 12 test java.lang.String PK_NAME string System KeyColumns 255 255 0 false false false false 1 true true false false
+string string string string short string
+TABLE_CAT TABLE_SCHEM TABLE_NAME COLUMN_NAME KEY_SEQ PK_NAME
+Row Count : 0
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+TABLE_CAT 12 test java.lang.String TABLE_CAT string System KeyColumns 255 255 0 false false false false 0 true true false false
+TABLE_SCHEM 12 test java.lang.String TABLE_SCHEM string System KeyColumns 255 255 0 false true false true 1 false true true true
+TABLE_NAME 12 test java.lang.String TABLE_NAME string System KeyColumns 2048 2048 0 false true false false 0 true true false false
+COLUMN_NAME 12 test java.lang.String COLUMN_NAME string System KeyColumns 255 255 0 false false false false 0 true true false false
+KEY_SEQ 5 test java.lang.Short KEY_SEQ short <null> <null> 6 5 0 false false false true 1 false true true true
+PK_NAME 12 test java.lang.String PK_NAME string System KeyColumns 255 255 0 false false false false 1 true true false false
+string string string string short string
+TABLE_CAT TABLE_SCHEM TABLE_NAME COLUMN_NAME KEY_SEQ PK_NAME
+Row Count : 0
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+TABLE_CAT 12 test java.lang.String TABLE_CAT string System KeyColumns 255 255 0 false false false false 0 true true false false
+TABLE_SCHEM 12 test java.lang.String TABLE_SCHEM string System KeyColumns 255 255 0 false true false true 1 false true true true
+TABLE_NAME 12 test java.lang.String TABLE_NAME string System KeyColumns 2048 2048 0 false true false false 0 true true false false
+COLUMN_NAME 12 test java.lang.String COLUMN_NAME string System KeyColumns 255 255 0 false false false false 0 true true false false
+KEY_SEQ 5 test java.lang.Short KEY_SEQ short <null> <null> 6 5 0 false false false true 1 false true true true
+PK_NAME 12 test java.lang.String PK_NAME string System KeyColumns 255 255 0 false false false false 1 true true false false
Copied: trunk/test-integration/db/resources/3473/testGetTables.expected (from rev 1930, trunk/test-integration/common/src/test/resources/3473/testGetTables.expected)
===================================================================
--- trunk/test-integration/db/resources/3473/testGetTables.expected (rev 0)
+++ trunk/test-integration/db/resources/3473/testGetTables.expected 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,59 @@
+string string string string string string string string string string boolean
+TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS TYPE_CAT TYPE_SCHEM TYPE_NAME SELF_REFERENCING_COL_NAME REF_GENERATION ISPHYSICAL
+test System Columns SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
+test System DataTypes SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
+test System KeyColumns SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
+test System Keys SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
+test System ProcedureParams SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
+test System Procedures SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
+test System Properties SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
+test System ReferenceKeyColumns SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
+test System Schemas SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
+test System Tables SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
+test System VirtualDatabases SYSTEM TABLE <null> <null> <null> <null> <null> <null> true
+test test all_databases TABLE <null> <null> <null> <null> <null> <null> false
+test test all_models TABLE <null> <null> <null> <null> <null> <null> false
+test test all_tables TABLE <null> <null> <null> <null> <null> <null> false
+Row Count : 14
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+TABLE_CAT 12 test java.lang.String TABLE_CAT string System Tables 255 255 0 false true false true 1 false true true true
+TABLE_SCHEM 12 test java.lang.String TABLE_SCHEM string System Tables 255 255 0 false true false true 1 false true true true
+TABLE_NAME 12 test java.lang.String TABLE_NAME string System Tables 255 255 0 false true false false 0 true true false false
+TABLE_TYPE 12 test java.lang.String TABLE_TYPE string <null> <null> 4000 4000 0 false false false true 1 false true true true
+REMARKS 12 test java.lang.String REMARKS string System Tables 255 255 0 false true false true 1 false true true true
+TYPE_CAT 12 test java.lang.String TYPE_CAT string <null> <null> 4000 4000 0 false false false true 1 false true true true
+TYPE_SCHEM 12 test java.lang.String TYPE_SCHEM string <null> <null> 4000 4000 0 false false false true 1 false true true true
+TYPE_NAME 12 test java.lang.String TYPE_NAME string <null> <null> 4000 4000 0 false false false true 1 false true true true
+SELF_REFERENCING_COL_NAME 12 test java.lang.String SELF_REFERENCING_COL_NAME string <null> <null> 4000 4000 0 false false false true 1 false true true true
+REF_GENERATION 12 test java.lang.String REF_GENERATION string <null> <null> 4000 4000 0 false false false true 1 false true true true
+ISPHYSICAL -7 test java.lang.Boolean ISPHYSICAL boolean System Tables 5 1 0 false true false false 0 true true false false
+string string string string string string string string string string boolean
+TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS TYPE_CAT TYPE_SCHEM TYPE_NAME SELF_REFERENCING_COL_NAME REF_GENERATION ISPHYSICAL
+Row Count : 0
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+TABLE_CAT 12 test java.lang.String TABLE_CAT string System Tables 255 255 0 false true false true 1 false true true true
+TABLE_SCHEM 12 test java.lang.String TABLE_SCHEM string System Tables 255 255 0 false true false true 1 false true true true
+TABLE_NAME 12 test java.lang.String TABLE_NAME string System Tables 255 255 0 false true false false 0 true true false false
+TABLE_TYPE 12 test java.lang.String TABLE_TYPE string <null> <null> 4000 4000 0 false false false true 1 false true true true
+REMARKS 12 test java.lang.String REMARKS string System Tables 255 255 0 false true false true 1 false true true true
+TYPE_CAT 12 test java.lang.String TYPE_CAT string <null> <null> 4000 4000 0 false false false true 1 false true true true
+TYPE_SCHEM 12 test java.lang.String TYPE_SCHEM string <null> <null> 4000 4000 0 false false false true 1 false true true true
+TYPE_NAME 12 test java.lang.String TYPE_NAME string <null> <null> 4000 4000 0 false false false true 1 false true true true
+SELF_REFERENCING_COL_NAME 12 test java.lang.String SELF_REFERENCING_COL_NAME string <null> <null> 4000 4000 0 false false false true 1 false true true true
+REF_GENERATION 12 test java.lang.String REF_GENERATION string <null> <null> 4000 4000 0 false false false true 1 false true true true
+ISPHYSICAL -7 test java.lang.Boolean ISPHYSICAL boolean System Tables 5 1 0 false true false false 0 true true false false
+string string string string string string string string string string boolean
+TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS TYPE_CAT TYPE_SCHEM TYPE_NAME SELF_REFERENCING_COL_NAME REF_GENERATION ISPHYSICAL
+Row Count : 0
+getColumnName getColumnType getCatalogName getColumnClassName getColumnLabel getColumnTypeName getSchemaName getTableName getColumnDisplaySize getPrecision getScale isAutoIncrement isCaseSensitive isCurrency isDefinitelyWritable isNullable isReadOnly isSearchable isSigned isWritable
+TABLE_CAT 12 test java.lang.String TABLE_CAT string System Tables 255 255 0 false true false true 1 false true true true
+TABLE_SCHEM 12 test java.lang.String TABLE_SCHEM string System Tables 255 255 0 false true false true 1 false true true true
+TABLE_NAME 12 test java.lang.String TABLE_NAME string System Tables 255 255 0 false true false false 0 true true false false
+TABLE_TYPE 12 test java.lang.String TABLE_TYPE string <null> <null> 4000 4000 0 false false false true 1 false true true true
+REMARKS 12 test java.lang.String REMARKS string System Tables 255 255 0 false true false true 1 false true true true
+TYPE_CAT 12 test java.lang.String TYPE_CAT string <null> <null> 4000 4000 0 false false false true 1 false true true true
+TYPE_SCHEM 12 test java.lang.String TYPE_SCHEM string <null> <null> 4000 4000 0 false false false true 1 false true true true
+TYPE_NAME 12 test java.lang.String TYPE_NAME string <null> <null> 4000 4000 0 false false false true 1 false true true true
+SELF_REFERENCING_COL_NAME 12 test java.lang.String SELF_REFERENCING_COL_NAME string <null> <null> 4000 4000 0 false false false true 1 false true true true
+REF_GENERATION 12 test java.lang.String REF_GENERATION string <null> <null> 4000 4000 0 false false false true 1 false true true true
+ISPHYSICAL -7 test java.lang.Boolean ISPHYSICAL boolean System Tables 5 1 0 false true false false 0 true true false false
Copied: trunk/test-integration/db/resources/bqt/bqt.properties (from rev 1930, trunk/test-integration/common/src/test/resources/bqt/bqt.properties)
===================================================================
--- trunk/test-integration/db/resources/bqt/bqt.properties (rev 0)
+++ trunk/test-integration/db/resources/bqt/bqt.properties 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,32 @@
+#
+# JBoss, Home of Professional Open Source.
+# See the COPYRIGHT.txt file distributed with this work for information
+# regarding copyright ownership. Some portions may be licensed
+# to Red Hat, Inc. under one or more contributor license agreements.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
+#
+
+dqp.configFile=../ServerConfig.xml
+vdb.definition=./loopback.DEF
+
+#only for testing, as this takes more time to start and shutdown
+xa.enable_recovery=false
+
+
+
+teiid.home=target/scratch/bqt
+processName=bqt
\ No newline at end of file
Copied: trunk/test-integration/db/resources/bqt/bqt.vdb (from rev 1930, trunk/test-integration/common/src/test/resources/bqt/bqt.vdb)
===================================================================
(Binary files differ)
Property changes on: trunk/test-integration/db/resources/bqt/bqt.vdb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/test-integration/db/resources/bqt/loopback.DEF (from rev 1930, trunk/test-integration/common/src/test/resources/bqt/loopback.DEF)
===================================================================
--- trunk/test-integration/db/resources/bqt/loopback.DEF (rev 0)
+++ trunk/test-integration/db/resources/bqt/loopback.DEF 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VDB>
+ <Header>
+ <VDBExporterVersion>4.1</VDBExporterVersion>
+ <ApplicationCreatedBy>MetaMatrix Console</ApplicationCreatedBy>
+ <ApplicationVersion>4.3:2162</ApplicationVersion>
+ <UserCreatedBy>MetaMatrixAdmin</UserCreatedBy>
+ <MetaMatrixSystemVersion>4.3</MetaMatrixSystemVersion>
+ <Time>2005-07-20T16:19:36.847-06:00</Time>
+ </Header>
+ <VDBInfo>
+ <Property Name="Name" Value="QT_Ora9DS" />
+ <Property Name="GUID" Value="mmuuid:1e72ce82-820b-1f79-a21e-eed1d292e845" />
+ <Property Name="Version" Value="1" />
+ <Property Name="VDBArchiveName" Value="bqt.vdb" />
+ <Property Name="Description" Value="" />
+ <Property Name="IsActive" Value="true" />
+ </VDBInfo>
+ <Model>
+ <Property Name="Name" Value="XQT" />
+ <Property Name="Visibility" Value="Public" />
+ <Property Name="MultiSourceEnabled" Value="false" />
+ </Model>
+ <Model>
+ <Property Name="Name" Value="VQT" />
+ <Property Name="Visibility" Value="Public" />
+ <Property Name="MultiSourceEnabled" Value="false" />
+ </Model>
+ <Model>
+ <Property Name="Name" Value="XQTDoc" />
+ <Property Name="Visibility" Value="Public" />
+ <Property Name="MultiSourceEnabled" Value="false" />
+ </Model>
+ <Model>
+ <Property Name="Name" Value="BQT2" />
+ <Property Name="Visibility" Value="Public" />
+ <Property Name="MultiSourceEnabled" Value="false" />
+ <ConnectorBindings>
+ <Connector Name="BQT2 Oracle 9i Simple Cap" />
+ </ConnectorBindings>
+ </Model>
+ <Model>
+ <Property Name="Name" Value="XQTRecursiveDoc" />
+ <Property Name="Visibility" Value="Public" />
+ <Property Name="MultiSourceEnabled" Value="false" />
+ </Model>
+ <Model>
+ <Property Name="Name" Value="XQTNestedDoc" />
+ <Property Name="Visibility" Value="Public" />
+ <Property Name="MultiSourceEnabled" Value="false" />
+ </Model>
+ <Model>
+ <Property Name="Name" Value="SP" />
+ <Property Name="Visibility" Value="Public" />
+ <Property Name="MultiSourceEnabled" Value="false" />
+ <ConnectorBindings>
+ <Connector Name="BQT2 Oracle 9i Simple Cap" />
+ </ConnectorBindings>
+ </Model>
+ <Model>
+ <Property Name="Name" Value="BQT1" />
+ <Property Name="Visibility" Value="Public" />
+ <Property Name="MultiSourceEnabled" Value="false" />
+ <ConnectorBindings>
+ <Connector Name="BQT1 Oracle 9i Simple Cap" />
+ </ConnectorBindings>
+ </Model>
+ <ComponentTypes>
+ <ComponentType Name="Loopback Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2005-07-21T10:07:40.921-06:00" CreatedBy="ConfigurationStartup" CreationDate="2005-07-21T10:07:40.921-06:00">
+ <ComponentTypeDefn Deprecated="false">
+ <PropertyDefinition Name="CapabilitiesClass" DisplayName="Capabilities Class" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
+ </ComponentTypeDefn>
+ <ComponentTypeDefn Deprecated="false">
+ <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.loopback.LoopbackConnector" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
+ </ComponentTypeDefn>
+ <ComponentTypeDefn Deprecated="false">
+ <PropertyDefinition Name="RowCount" DisplayName="Rows Per Query" ShortDescription="" DefaultValue="1" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
+ </ComponentTypeDefn>
+ <ComponentTypeDefn Deprecated="false">
+ <PropertyDefinition Name="WaitTime" DisplayName="Max Random Wait Time" ShortDescription="" DefaultValue="0" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
+ </ComponentTypeDefn>
+ <ComponentTypeDefn Deprecated="false">
+ <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" DefaultValue="extensionjar:loopbackconn.jar;extensionjar:jdbcconn.jar" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
+ </ComponentTypeDefn>
+ </ComponentType>
+ </ComponentTypes>
+ <ConnectorBindings>
+ <Connector Name="BQT1 Oracle 9i Simple Cap" ComponentType="Loopback Connector" LastChangedBy="metamatrixadmin" LastChangedDate="2005-07-20T12:58:35.551-06:00" CreatedBy="metamatrixadmin" CreationDate="2005-07-20T11:39:55.961-06:00" QueuedService="false" routingUUID="mmuuid:a6ea7cc0-c651-1f91-940a-b13465b430eb">
+ <Properties>
+ <Property Name="MaxResultRows">10000</Property>
+ <Property Name="ConnectorThreadTTL">120000</Property>
+ <Property Name="ConnectorMaxThreads">5</Property>
+ <Property Name="CapabilitiesClass" />
+ <Property Name="metamatrix.service.essentialservice">false</Property>
+ <Property Name="ConnectorClassPath">extensionjar:loopbackconn.jar</Property>
+ <Property Name="RowCount">1</Property>
+ <Property Name="ServiceClassName">com.metamatrix.server.connector.service.ConnectorService</Property>
+ <Property Name="ConnectorClass">com.metamatrix.connector.loopback.LoopbackConnector</Property>
+ <Property Name="WaitTime">0</Property>
+ </Properties>
+ </Connector>
+ <Connector Name="BQT2 Oracle 9i Simple Cap" ComponentType="Loopback Connector" LastChangedBy="metamatrixadmin" LastChangedDate="2005-07-20T12:58:25.229-06:00" CreatedBy="metamatrixadmin" CreationDate="2005-07-20T11:39:57.503-06:00" QueuedService="false" routingUUID="mmuuid:a6ea7cc1-c651-1f91-940a-b13465b430eb">
+ <Properties>
+ <Property Name="MaxResultRows">10000</Property>
+ <Property Name="ConnectorThreadTTL">120000</Property>
+ <Property Name="ConnectorMaxThreads">5</Property>
+ <Property Name="CapabilitiesClass" />
+ <Property Name="metamatrix.service.essentialservice">false</Property>
+ <Property Name="ConnectorClassPath">extensionjar:loopbackconn.jar</Property>
+ <Property Name="RowCount">1</Property>
+ <Property Name="ServiceClassName">com.metamatrix.server.connector.service.ConnectorService</Property>
+ <Property Name="ConnectorClass">com.metamatrix.connector.loopback.LoopbackConnector</Property>
+ <Property Name="WaitTime">0</Property>
+ </Properties>
+ </Connector>
+ </ConnectorBindings>
+</VDB>
+
Copied: trunk/test-integration/db/resources/metadata/ConfigurationInfo.def (from rev 1930, trunk/test-integration/common/src/test/resources/metadata/ConfigurationInfo.def)
===================================================================
--- trunk/test-integration/db/resources/metadata/ConfigurationInfo.def (rev 0)
+++ trunk/test-integration/db/resources/metadata/ConfigurationInfo.def 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VDB>
+ <Header>
+ <VDBExporterVersion>4.1</VDBExporterVersion>
+ <ApplicationCreatedBy>MetaBase Modeler</ApplicationCreatedBy>
+ <UserCreatedBy>VDBWriter</UserCreatedBy>
+ <MetaMatrixSystemVersion>5.5</MetaMatrixSystemVersion>
+ <Time>2009-02-03T16:43:53.407-06:00</Time>
+ </Header>
+ <VDBInfo>
+ <Property Name="Name" Value="TestExtensions" />
+ <Property Name="GUID" Value="mmuuid:aab3f642-0a99-111f-b214-b4f3aeb96b39" />
+ <Property Name="Version" Value="1" />
+ <Property Name="VDBArchiveName" Value="TestExtensions.vdb" />
+ </VDBInfo>
+ <Model>
+ <Property Name="Name" Value="ExtensionModel" />
+ <Property Name="Visibility" Value="Public" />
+ <Property Name="MultiSourceEnabled" Value="false" />
+ </Model>
+ <Model>
+ <Property Name="Name" Value="AnyModel" />
+ <Property Name="Visibility" Value="Public" />
+ <Property Name="MultiSourceEnabled" Value="false" />
+ <ConnectorBindings>
+ <Connector Name="AnyModel Connector" />
+ </ConnectorBindings>
+ </Model>
+ <ComponentTypes>
+ <ComponentType Name="Fake Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2008-11-13T13:26:45.416-06:00" CreatedBy="ConfigurationStartup" CreationDate="2008-11-13T13:26:45.416-06:00">
+ <PropertyDefinition Name="CapabilitiesClass" DisplayName="Capabilities Class" ShortDescription="" DefaultValue="com.metamatrix.connector.loopback.LoopbackCapabilities" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="RowCount" DisplayName="Rows Per Query" ShortDescription="" DefaultValue="1" Multiplicity="1" IsExpert="true" IsPreferred="true" />
+ <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.loopback.LoopbackConnector" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="WaitTime" DisplayName="Max Random Wait Time" ShortDescription="" DefaultValue="0" Multiplicity="1" IsExpert="true" />
+ <PropertyDefinition Name="Standard" DisplayName="Standard Type" ShortDescription="Standard Built-in Connector Type" DefaultValue="true" PropertyType="Boolean" IsExpert="true" IsModifiable="false" />
+ <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" DefaultValue="extensionjar:connector_patch.jar;extensionjar:loopbackconn.jar;extensionjar:jdbcconn.jar" Multiplicity="1" />
+ </ComponentType>
+ </ComponentTypes>
+ <ConnectorBindings>
+ <Connector Name="AnyModel Connector" ComponentType="Fake Connector" QueuedService="false" routingUUID="mmuuid:2a20b100-1032-111f-b214-b4f3aeb96b39">
+ <Properties>
+ <Property Name="MaxResultRows">10000</Property>
+ <Property Name="Standard">true</Property>
+ <Property Name="ExceptionOnMaxRows">true</Property>
+ <Property Name="ConnectorThreadTTL">120000</Property>
+ <Property Name="ServiceMonitoringEnabled">true</Property>
+ <Property Name="ConnectorMaxThreads">20</Property>
+ <Property Name="SourceConnectionTestInterval">600</Property>
+ <Property Name="metamatrix.service.essentialservice">false</Property>
+ <Property Name="ConnectorClassPath"></Property>
+ <Property Name="RowCount">1</Property>
+ <Property Name="ConnectorClass">org.teiid.connector.metadata.runtime.MockConnector</Property>
+ <Property Name="DeployedName">TestExtensions_1.AnyModel Connector</Property>
+ <Property Name="WaitTime">0</Property>
+ <Property Name="Immutable">false</Property>
+ </Properties>
+ </Connector>
+ </ConnectorBindings>
+</VDB>
+
Copied: trunk/test-integration/db/resources/metadata/TestExtensions.vdb (from rev 1930, trunk/test-integration/common/src/test/resources/metadata/TestExtensions.vdb)
===================================================================
(Binary files differ)
Property changes on: trunk/test-integration/db/resources/metadata/TestExtensions.vdb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/test-integration/db/resources/metadata/dqp.properties (from rev 1930, trunk/test-integration/common/src/test/resources/metadata/dqp.properties)
===================================================================
--- trunk/test-integration/db/resources/metadata/dqp.properties (rev 0)
+++ trunk/test-integration/db/resources/metadata/dqp.properties 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,33 @@
+#
+# JBoss, Home of Professional Open Source.
+# See the COPYRIGHT.txt file distributed with this work for information
+# regarding copyright ownership. Some portions may be licensed
+# to Red Hat, Inc. under one or more contributor license agreements.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
+#
+
+dqp.configFile=../ServerConfig.xml
+vdb.definition=./TestExtensions.vdb
+dqp.buffer.usedisk=false
+vdb.definition=./ConfigurationInfo.def
+
+#only for testing, as this takes more time to start and shutdown
+xa.enable_recovery=false
+
+
+teiid.home=target/scratch/metadata
+processName=metadata
\ No newline at end of file
Property changes on: trunk/test-integration/db/resources/metadata/dqp.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/test-integration/db/resources/partsupplier/PartsSupplier.vdb (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/PartsSupplier.vdb)
===================================================================
(Binary files differ)
Property changes on: trunk/test-integration/db/resources/partsupplier/PartsSupplier.vdb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/test-integration/db/resources/partsupplier/dqp.properties (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/dqp.properties)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/dqp.properties (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/dqp.properties 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,38 @@
+#
+# JBoss, Home of Professional Open Source.
+# See the COPYRIGHT.txt file distributed with this work for information
+# regarding copyright ownership. Some portions may be licensed
+# to Red Hat, Inc. under one or more contributor license agreements.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
+#
+
+dqp.configFile=../ServerConfig.xml
+#dqp.metadata.systemURL=file://${system-vdb-path}/System.vdb
+vdb.definition=./PartsSupplier.vdb
+#metamatrix.security.password.PasswordKeyStore=c3B1dG5pazEz
+#dqp.logFile=./logs/DQP.log
+#dqp.logLevel=1
+#dqp.classpath=./lib/;./license/;./lib/metamatrix-dqp.jar;./lib/bcprov-jdk14-122.jar;./extensions/MJjdbc.jar
+dqp.buffer.usedisk=false
+
+#only for testing, as this takes more time to start and shutdown
+xa.enable_recovery=false
+
+
+teiid.home=target/scratch/parts
+
+processName=partssupplier
Copied: trunk/test-integration/db/resources/partsupplier/expected/Catalogs.metadata.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/Catalogs.metadata.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/Catalogs.metadata.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/Catalogs.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,2 @@
+ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
+TABLE_CAT 12 string java.lang.String 1 null null PartsSupplier
Copied: trunk/test-integration/db/resources/partsupplier/expected/Catalogs.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/Catalogs.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/Catalogs.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/Catalogs.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1 @@
+TABLE_CAT[string]
Copied: trunk/test-integration/db/resources/partsupplier/expected/Columns.metadata.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/Columns.metadata.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/Columns.metadata.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/Columns.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,24 @@
+ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
+TABLE_CAT 12 string java.lang.String 0 Columns System PartsSupplier
+TABLE_SCHEM 12 string java.lang.String 1 Columns System PartsSupplier
+TABLE_NAME 12 string java.lang.String 0 Columns System PartsSupplier
+COLUMN_NAME 12 string java.lang.String 0 Columns System PartsSupplier
+DATA_TYPE 5 short java.lang.Short 1 null null PartsSupplier
+TYPE_NAME 12 string java.lang.String 0 Columns System PartsSupplier
+COLUMN_SIZE 4 integer java.lang.Integer 1 null null PartsSupplier
+BUFFER_LENGTH 12 string java.lang.String 1 null null PartsSupplier
+DECIMAL_DIGITS 4 integer java.lang.Integer 0 Columns System PartsSupplier
+NUM_PREC_RADIX 4 integer java.lang.Integer 0 Columns System PartsSupplier
+NULLABLE 4 integer java.lang.Integer 1 null null PartsSupplier
+REMARKS 12 string java.lang.String 1 Columns System PartsSupplier
+COLUMN_DEF 12 string java.lang.String 1 Columns System PartsSupplier
+SQL_DATA_TYPE 12 string java.lang.String 1 null null PartsSupplier
+SQL_DATETIME_SUB 12 string java.lang.String 1 null null PartsSupplier
+CHAR_OCTET_LENGTH 4 integer java.lang.Integer 1 Columns System PartsSupplier
+ORDINAL_POSITION 4 integer java.lang.Integer 0 Columns System PartsSupplier
+IS_NULLABLE 12 string java.lang.String 1 null null PartsSupplier
+SCOPE_CATALOG 12 string java.lang.String 1 null null PartsSupplier
+SCOPE_SCHEMA 12 string java.lang.String 1 null null PartsSupplier
+SCOPE_TABLE 12 string java.lang.String 1 null null PartsSupplier
+SOURCE_DATA_TYPE 12 string java.lang.String 1 null null PartsSupplier
+IS_AUTOINCREMENT 12 string java.lang.String 1 null null PartsSupplier
Copied: trunk/test-integration/db/resources/partsupplier/expected/Columns.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/Columns.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/Columns.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/Columns.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,141 @@
+TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] COLUMN_NAME[string] DATA_TYPE[short] TYPE_NAME[string] COLUMN_SIZE[integer] BUFFER_LENGTH[string] DECIMAL_DIGITS[integer] NUM_PREC_RADIX[integer] NULLABLE[integer] REMARKS[string] COLUMN_DEF[string] SQL_DATA_TYPE[string] SQL_DATETIME_SUB[string] CHAR_OCTET_LENGTH[integer] ORDINAL_POSITION[integer] IS_NULLABLE[string] SCOPE_CATALOG[string] SCOPE_SCHEMA[string] SCOPE_TABLE[string] SOURCE_DATA_TYPE[string] IS_AUTOINCREMENT[string]
+PartsSupplier System Columns VDBName 12 string 255 null 0 10 0 null null null null 255 1 YES null null null null NO
+PartsSupplier System Columns SchemaName 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
+PartsSupplier System Columns TableName 12 string 255 null 0 10 0 null null null null 255 3 YES null null null null NO
+PartsSupplier System Columns Name 12 string 255 null 0 10 0 null null null null 255 4 YES null null null null NO
+PartsSupplier System Columns Position 4 integer 10 null 0 10 0 null null null null 10 5 YES null null null null NO
+PartsSupplier System Columns NameInSource 12 string 255 null 0 10 1 null null null null 255 6 NO null null null null NO
+PartsSupplier System Columns DataType 12 string 100 null 0 10 0 null null null null 100 7 YES null null null null NO
+PartsSupplier System Columns Scale 4 integer 10 null 0 10 0 null null null null 10 8 YES null null null null NO
+PartsSupplier System Columns ElementLength 4 integer 10 null 0 10 0 null null null null 10 9 YES null null null null NO
+PartsSupplier System Columns IsLengthFixed -7 boolean 1 null 0 10 0 null null null null 1 10 YES null null null null NO
+PartsSupplier System Columns SupportsSelect -7 boolean 1 null 0 10 0 null null null null 1 11 YES null null null null NO
+PartsSupplier System Columns SupportsUpdates -7 boolean 1 null 0 10 0 null null null null 1 12 YES null null null null NO
+PartsSupplier System Columns IsCaseSensitive -7 boolean 1 null 0 10 0 null null null null 1 13 YES null null null null NO
+PartsSupplier System Columns IsSigned -7 boolean 1 null 0 10 0 null null null null 1 14 YES null null null null NO
+PartsSupplier System Columns IsCurrency -7 boolean 1 null 0 10 0 null null null null 1 15 YES null null null null NO
+PartsSupplier System Columns IsAutoIncremented -7 boolean 1 null 0 10 0 null null null null 1 16 YES null null null null NO
+PartsSupplier System Columns NullType 12 string 20 null 0 10 0 null null null null 20 17 YES null null null null NO
+PartsSupplier System Columns MinRange 12 string 50 null 0 10 1 null null null null 50 18 NO null null null null NO
+PartsSupplier System Columns MaxRange 12 string 50 null 0 10 1 null null null null 50 19 NO null null null null NO
+PartsSupplier System Columns SearchType 12 string 20 null 0 10 0 null null null null 20 20 YES null null null null NO
+PartsSupplier System Columns Format 12 string 255 null 0 10 1 null null null null 255 21 NO null null null null NO
+PartsSupplier System Columns DefaultValue 12 string 255 null 0 10 1 null null null null 255 22 NO null null null null NO
+PartsSupplier System Columns JavaClass 12 string 500 null 0 10 0 null null null null 500 23 YES null null null null NO
+PartsSupplier System Columns Precision 4 integer 10 null 0 10 0 null null null null 10 24 YES null null null null NO
+PartsSupplier System Columns CharOctetLength 4 integer 10 null 0 10 1 null null null null 10 25 NO null null null null NO
+PartsSupplier System Columns Radix 4 integer 10 null 0 10 0 null null null null 10 26 YES null null null null NO
+PartsSupplier System Columns UID 12 string 50 null 0 10 0 null null null null 50 27 YES null null null null NO
+PartsSupplier System Columns Description 12 string 255 null 0 10 1 null null null null 255 28 NO null null null null NO
+PartsSupplier System DataTypes Name 12 string 100 null 0 10 0 null null null null 100 1 YES null null null null NO
+PartsSupplier System DataTypes IsStandard -7 boolean 1 null 0 10 1 null null null null 1 2 NO null null null null NO
+PartsSupplier System DataTypes IsPhysical -7 boolean 1 null 0 10 1 null null null null 1 3 NO null null null null NO
+PartsSupplier System DataTypes TypeName 12 string 100 null 0 10 0 null null null null 100 4 YES null null null null NO
+PartsSupplier System DataTypes JavaClass 12 string 500 null 0 10 0 null null null null 500 5 YES null null null null NO
+PartsSupplier System DataTypes Scale 4 integer 10 null 0 10 1 null (0) null null 10 6 NO null null null null NO
+PartsSupplier System DataTypes TypeLength 4 integer 10 null 0 10 0 null (0) null null 10 7 YES null null null null NO
+PartsSupplier System DataTypes NullType 12 string 20 null 0 10 0 null null null null 20 8 YES null null null null NO
+PartsSupplier System DataTypes IsSigned -7 boolean 1 null 0 10 0 null ('0') null null 1 9 YES null null null null NO
+PartsSupplier System DataTypes IsAutoIncremented -7 boolean 1 null 0 10 0 null ('0') null null 1 10 YES null null null null NO
+PartsSupplier System DataTypes IsCaseSensitive -7 boolean 1 null 0 10 0 null ('0') null null 1 11 YES null null null null NO
+PartsSupplier System DataTypes Precision 4 integer 10 null 0 10 0 null null null null 10 12 YES null null null null NO
+PartsSupplier System DataTypes Radix 4 integer 10 null 0 10 1 null null null null 10 13 NO null null null null NO
+PartsSupplier System DataTypes SearchType 12 string 20 null 0 10 0 null null null null 20 14 YES null null null null NO
+PartsSupplier System DataTypes UID 12 string 50 null 0 10 0 null null null null 50 15 YES null null null null NO
+PartsSupplier System DataTypes RuntimeType 12 string 64 null 0 10 1 null null null null 64 16 NO null null null null NO
+PartsSupplier System DataTypes BaseType 12 string 64 null 0 10 1 null null null null 64 17 NO null null null null NO
+PartsSupplier System DataTypes Description 12 string 255 null 0 10 1 null null null null 255 18 NO null null null null NO
+PartsSupplier System KeyColumns VDBName 12 string 255 null 0 10 0 null null null null 255 1 YES null null null null NO
+PartsSupplier System KeyColumns SchemaName 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
+PartsSupplier System KeyColumns TableName 12 string 2048 null 0 10 0 null null null null 2048 3 YES null null null null NO
+PartsSupplier System KeyColumns Name 12 string 255 null 0 10 0 null null null null 255 4 YES null null null null NO
+PartsSupplier System KeyColumns KeyName 12 string 255 null 0 10 1 null null null null 255 5 NO null null null null NO
+PartsSupplier System KeyColumns KeyType 12 string 20 null 0 10 0 null null null null 20 6 YES null null null null NO
+PartsSupplier System KeyColumns RefKeyUID 12 string 50 null 0 10 1 null null null null 50 7 NO null null null null NO
+PartsSupplier System KeyColumns UID 12 string 50 null 0 10 0 null null null null 50 8 YES null null null null NO
+PartsSupplier System KeyColumns Position 4 integer 10 null 0 10 1 null null null null 10 9 NO null null null null NO
+PartsSupplier System Keys VDBName 12 string 255 null 0 10 0 null null null null 255 1 YES null null null null NO
+PartsSupplier System Keys SchemaName 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
+PartsSupplier System Keys TableName 12 string 2048 null 0 10 0 null null null null 2048 3 YES null null null null NO
+PartsSupplier System Keys Name 12 string 255 null 0 10 0 null null null null 255 4 YES null null null null NO
+PartsSupplier System Keys Description 12 string 255 null 0 10 1 null null null null 255 5 NO null null null null NO
+PartsSupplier System Keys NameInSource 12 string 255 null 0 10 1 null null null null 255 6 NO null null null null NO
+PartsSupplier System Keys Type 12 string 20 null 0 10 0 null null null null 20 7 YES null null null null NO
+PartsSupplier System Keys IsIndexed -7 boolean 1 null 0 10 0 null null null null 1 8 YES null null null null NO
+PartsSupplier System Keys RefKeyUID 12 string 50 null 0 10 1 null null null null 50 9 NO null null null null NO
+PartsSupplier System Keys UID 12 string 50 null 0 10 0 null null null null 50 10 YES null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_ID 12 string 4 null 0 10 0 null null null null 4 1 YES null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_NAME 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_COLOR 12 string 30 null 0 10 1 null null null null 30 3 NO null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_WEIGHT 12 string 255 null 0 10 1 null null null null 255 4 NO null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.SHIP_VIA SHIPPER_ID 5 short 2 null 0 10 0 null null null null 0 1 YES null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.SHIP_VIA SHIPPER_NAME 12 string 30 null 0 10 1 null null null null 30 2 NO null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS STATUS_ID 5 short 2 null 0 10 0 null null null null 0 1 YES null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS STATUS_NAME 12 string 30 null 0 10 1 null null null null 30 2 NO null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_ID 12 string 10 null 0 10 0 null null null null 10 1 YES null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_NAME 12 string 30 null 0 10 1 null null null null 30 2 NO null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_STATUS 5 short 2 null 0 10 1 null null null null 0 3 NO null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_CITY 12 string 30 null 0 10 1 null null null null 30 4 NO null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_STATE 12 string 2 null 0 10 1 null null null null 2 5 NO null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS SUPPLIER_ID 12 string 10 null 0 10 0 null null null null 10 1 YES null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS PART_ID 12 string 4 null 0 10 0 null null null null 4 2 YES null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS QUANTITY 5 short 3 null 0 10 1 null null null null 0 3 NO null null null null NO
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS SHIPPER_ID 5 short 2 null 0 10 1 null null null null 0 4 NO null null null null NO
+PartsSupplier System ProcedureParams VDBName 12 string 255 null 0 10 0 null null null null 255 1 YES null null null null NO
+PartsSupplier System ProcedureParams SchemaName 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
+PartsSupplier System ProcedureParams ProcedureName 12 string 255 null 0 10 0 null null null null 255 3 YES null null null null NO
+PartsSupplier System ProcedureParams Name 12 string 255 null 0 10 0 null null null null 255 4 YES null null null null NO
+PartsSupplier System ProcedureParams DataType 12 string 25 null 0 10 0 null null null null 25 5 YES null null null null NO
+PartsSupplier System ProcedureParams Position 4 integer 10 null 0 10 0 null null null null 10 6 YES null null null null NO
+PartsSupplier System ProcedureParams Type 12 string 100 null 0 10 0 null null null null 100 7 YES null null null null NO
+PartsSupplier System ProcedureParams Optional -7 boolean 1 null 0 10 0 null null null null 1 8 YES null null null null NO
+PartsSupplier System ProcedureParams Precision 4 integer 10 null 0 10 0 null null null null 10 9 YES null null null null NO
+PartsSupplier System ProcedureParams TypeLength 4 integer 10 null 0 10 0 null (0) null null 10 10 YES null null null null NO
+PartsSupplier System ProcedureParams Scale 4 integer 10 null 0 10 0 null (0) null null 10 11 YES null null null null NO
+PartsSupplier System ProcedureParams Radix 4 integer 10 null 0 10 0 null null null null 10 12 YES null null null null NO
+PartsSupplier System ProcedureParams NullType 12 string 10 null 0 10 0 null null null null 10 13 YES null null null null NO
+PartsSupplier System ProcedureParams UID 12 string 50 null 0 10 1 null null null null 50 14 NO null null null null NO
+PartsSupplier System Procedures VDBName 12 string 255 null 0 10 0 null null null null 255 1 YES null null null null NO
+PartsSupplier System Procedures SchemaName 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
+PartsSupplier System Procedures Name 12 string 255 null 0 10 0 null null null null 255 3 YES null null null null NO
+PartsSupplier System Procedures NameInSource 12 string 255 null 0 10 1 null null null null 255 4 NO null null null null NO
+PartsSupplier System Procedures ReturnsResults -7 boolean 1 null 0 10 0 null null null null 1 5 YES null null null null NO
+PartsSupplier System Procedures UID 12 string 50 null 0 10 0 null null null null 50 6 YES null null null null NO
+PartsSupplier System Procedures Description 12 string 255 null 0 10 1 null null null null 255 7 NO null null null null NO
+PartsSupplier System Properties Name 12 string 255 null 0 10 0 null null null null 255 1 YES null null null null NO
+PartsSupplier System Properties Value 12 string 255 null 0 10 0 null null null null 255 2 YES null null null null NO
+PartsSupplier System Properties UID 12 string 50 null 0 10 0 null null null null 50 3 YES null null null null NO
+PartsSupplier System ReferenceKeyColumns PKTABLE_CAT 12 string 255 null 0 10 1 null null null null 255 1 NO null null null null NO
+PartsSupplier System ReferenceKeyColumns PKTABLE_SCHEM 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
+PartsSupplier System ReferenceKeyColumns PKTABLE_NAME 12 string 255 null 0 10 1 null null null null 255 3 NO null null null null NO
+PartsSupplier System ReferenceKeyColumns PKCOLUMN_NAME 12 string 255 null 0 10 1 null null null null 255 4 NO null null null null NO
+PartsSupplier System ReferenceKeyColumns FKTABLE_CAT 12 string 255 null 0 10 1 null null null null 255 5 NO null null null null NO
+PartsSupplier System ReferenceKeyColumns FKTABLE_SCHEM 12 string 255 null 0 10 1 null null null null 255 6 NO null null null null NO
+PartsSupplier System ReferenceKeyColumns FKTABLE_NAME 12 string 255 null 0 10 1 null null null null 255 7 NO null null null null NO
+PartsSupplier System ReferenceKeyColumns FKCOLUMN_NAME 12 string 255 null 0 10 1 null null null null 255 8 NO null null null null NO
+PartsSupplier System ReferenceKeyColumns KEY_SEQ 5 short 5 null 0 10 1 null null null null 5 9 NO null null null null NO
+PartsSupplier System ReferenceKeyColumns UPDATE_RULE 4 integer 10 null 0 10 1 null null null null 10 10 NO null null null null NO
+PartsSupplier System ReferenceKeyColumns DELETE_RULE 4 integer 10 null 0 10 1 null null null null 10 11 NO null null null null NO
+PartsSupplier System ReferenceKeyColumns FK_NAME 12 string 255 null 0 10 1 null null null null 255 12 NO null null null null NO
+PartsSupplier System ReferenceKeyColumns PK_NAME 12 string 255 null 0 10 1 null null null null 255 13 NO null null null null NO
+PartsSupplier System ReferenceKeyColumns DEFERRABILITY 4 integer 10 null 0 10 1 null null null null 10 14 NO null null null null NO
+PartsSupplier System Schemas VDBName 12 string 255 null 0 10 1 null null null null 255 1 NO null null null null NO
+PartsSupplier System Schemas Name 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
+PartsSupplier System Schemas IsPhysical -7 boolean 1 null 0 10 0 null null null null 1 3 YES null null null null NO
+PartsSupplier System Schemas UID 12 string 50 null 0 10 0 null null null null 50 4 YES null null null null NO
+PartsSupplier System Schemas Description 12 string 255 null 0 10 1 null null null null 255 5 NO null null null null NO
+PartsSupplier System Schemas PrimaryMetamodelURI 12 string 255 null 0 10 0 null null null null 255 6 YES null null null null NO
+PartsSupplier System Tables VDBName 12 string 255 null 0 10 1 null null null null 255 1 NO null null null null NO
+PartsSupplier System Tables SchemaName 12 string 255 null 0 10 1 null null null null 255 2 NO null null null null NO
+PartsSupplier System Tables Name 12 string 255 null 0 10 0 null null null null 255 3 YES null null null null NO
+PartsSupplier System Tables Type 12 string 20 null 0 10 0 null null null null 20 4 YES null null null null NO
+PartsSupplier System Tables NameInSource 12 string 255 null 0 10 1 null null null null 255 5 NO null null null null NO
+PartsSupplier System Tables IsPhysical -7 boolean 1 null 0 10 0 null null null null 1 6 YES null null null null NO
+PartsSupplier System Tables SupportsUpdates -7 boolean 1 null 0 10 0 null null null null 1 7 YES null null null null NO
+PartsSupplier System Tables UID 12 string 50 null 0 10 0 null null null null 50 8 YES null null null null NO
+PartsSupplier System Tables Cardinality 4 integer 10 null 0 10 0 null null null null 10 9 YES null null null null NO
+PartsSupplier System Tables Description 12 string 255 null 0 10 1 null null null null 255 10 NO null null null null NO
+PartsSupplier System Tables IsSystem -7 boolean 1 null 0 10 1 null null null null 1 11 NO null null null null NO
+PartsSupplier System Tables IsMaterialized -7 boolean 1 null 0 10 0 null null null null 0 12 YES null null null null NO
+PartsSupplier System VirtualDatabases Name 12 string 255 null 0 10 0 null null null null 255 1 YES null null null null NO
+PartsSupplier System VirtualDatabases Version 12 string 50 null 0 10 0 null null null null 50 2 YES null null null null NO
Copied: trunk/test-integration/db/resources/partsupplier/expected/CrossReference.metadata.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/CrossReference.metadata.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/CrossReference.metadata.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/CrossReference.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,15 @@
+ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
+PKTABLE_CAT 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+PKTABLE_SCHEM 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+PKTABLE_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+PKCOLUMN_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+FKTABLE_CAT 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+FKTABLE_SCHEM 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+FKTABLE_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+FKCOLUMN_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+KEY_SEQ 5 short java.lang.Short 1 ReferenceKeyColumns System PartsSupplier
+UPDATE_RULE 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
+DELETE_RULE 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
+FK_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+PK_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+DEFERRABILITY 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
Copied: trunk/test-integration/db/resources/partsupplier/expected/CrossReference.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/CrossReference.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/CrossReference.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/CrossReference.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,4 @@
+PKTABLE_CAT[string] PKTABLE_SCHEM[string] PKTABLE_NAME[string] PKCOLUMN_NAME[string] FKTABLE_CAT[string] FKTABLE_SCHEM[string] FKTABLE_NAME[string] FKCOLUMN_NAME[string] KEY_SEQ[short] UPDATE_RULE[integer] DELETE_RULE[integer] FK_NAME[string] PK_NAME[string] DEFERRABILITY[integer]
+PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS STATUS_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_STATUS 1 3 3 FK_SPLIER_STATS PK_STATUS 5
+PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS PART_ID 1 3 3 FK_SPLIER_PRTS_PRTS PK_PARTS 5
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS SUPPLIER_ID 1 3 3 FK_SPLY_PRTS_SPLY PK_SUPPLIER 5
Copied: trunk/test-integration/db/resources/partsupplier/expected/ExportedKeys.metadata.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/ExportedKeys.metadata.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/ExportedKeys.metadata.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/ExportedKeys.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,15 @@
+ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
+PKTABLE_CAT 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+PKTABLE_SCHEM 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+PKTABLE_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+PKCOLUMN_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+FKTABLE_CAT 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+FKTABLE_SCHEM 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+FKTABLE_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+FKCOLUMN_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+KEY_SEQ 5 short java.lang.Short 1 ReferenceKeyColumns System PartsSupplier
+UPDATE_RULE 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
+DELETE_RULE 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
+FK_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+PK_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+DEFERRABILITY 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
Copied: trunk/test-integration/db/resources/partsupplier/expected/ExportedKeys.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/ExportedKeys.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/ExportedKeys.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/ExportedKeys.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,4 @@
+PKTABLE_CAT[string] PKTABLE_SCHEM[string] PKTABLE_NAME[string] PKCOLUMN_NAME[string] FKTABLE_CAT[string] FKTABLE_SCHEM[string] FKTABLE_NAME[string] FKCOLUMN_NAME[string] KEY_SEQ[short] UPDATE_RULE[integer] DELETE_RULE[integer] FK_NAME[string] PK_NAME[string] DEFERRABILITY[integer]
+PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS STATUS_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_STATUS 1 3 3 FK_SPLIER_STATS PK_STATUS 5
+PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS PART_ID 1 3 3 FK_SPLIER_PRTS_PRTS PK_PARTS 5
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS SUPPLIER_ID 1 3 3 FK_SPLY_PRTS_SPLY PK_SUPPLIER 5
Copied: trunk/test-integration/db/resources/partsupplier/expected/ImportedKeys.metadata.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/ImportedKeys.metadata.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/ImportedKeys.metadata.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/ImportedKeys.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,15 @@
+ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
+PKTABLE_CAT 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+PKTABLE_SCHEM 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+PKTABLE_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+PKCOLUMN_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+FKTABLE_CAT 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+FKTABLE_SCHEM 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+FKTABLE_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+FKCOLUMN_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+KEY_SEQ 5 short java.lang.Short 1 ReferenceKeyColumns System PartsSupplier
+UPDATE_RULE 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
+DELETE_RULE 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
+FK_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+PK_NAME 12 string java.lang.String 1 ReferenceKeyColumns System PartsSupplier
+DEFERRABILITY 4 integer java.lang.Integer 1 ReferenceKeyColumns System PartsSupplier
Copied: trunk/test-integration/db/resources/partsupplier/expected/ImportedKeys.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/ImportedKeys.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/ImportedKeys.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/ImportedKeys.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,4 @@
+PKTABLE_CAT[string] PKTABLE_SCHEM[string] PKTABLE_NAME[string] PKCOLUMN_NAME[string] FKTABLE_CAT[string] FKTABLE_SCHEM[string] FKTABLE_NAME[string] FKCOLUMN_NAME[string] KEY_SEQ[short] UPDATE_RULE[integer] DELETE_RULE[integer] FK_NAME[string] PK_NAME[string] DEFERRABILITY[integer]
+PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS PART_ID 1 3 3 FK_SPLIER_PRTS_PRTS PK_PARTS 5
+PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS STATUS_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_STATUS 1 3 3 FK_SPLIER_STATS PK_STATUS 5
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_ID PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS SUPPLIER_ID 1 3 3 FK_SPLY_PRTS_SPLY PK_SUPPLIER 5
Copied: trunk/test-integration/db/resources/partsupplier/expected/IndexInfo.metadata.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/IndexInfo.metadata.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/IndexInfo.metadata.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/IndexInfo.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,14 @@
+ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
+TABLE_CAT 12 string java.lang.String 0 KeyColumns System PartsSupplier
+TABLE_SCHEM 12 string java.lang.String 1 KeyColumns System PartsSupplier
+TABLE_NAME 12 string java.lang.String 0 KeyColumns System PartsSupplier
+NON_UNIQUE -7 boolean java.lang.Boolean 1 null null PartsSupplier
+INDEX_QUALIFIER 12 string java.lang.String 1 null null PartsSupplier
+INDEX_NAME 12 string java.lang.String 1 KeyColumns System PartsSupplier
+TYPE 4 integer java.lang.Integer 1 null null PartsSupplier
+ORDINAL_POSITION 5 short java.lang.Short 1 null null PartsSupplier
+COLUMN_NAME 12 string java.lang.String 0 KeyColumns System PartsSupplier
+ASC_OR_DESC 12 string java.lang.String 1 null null PartsSupplier
+CARDINALITY 4 integer java.lang.Integer 1 null null PartsSupplier
+PAGES 4 integer java.lang.Integer 1 null null PartsSupplier
+FILTER_CONDITION 12 string java.lang.String 1 null null PartsSupplier
Copied: trunk/test-integration/db/resources/partsupplier/expected/IndexInfo.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/IndexInfo.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/IndexInfo.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/IndexInfo.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1 @@
+TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] NON_UNIQUE[boolean] INDEX_QUALIFIER[string] INDEX_NAME[string] TYPE[integer] ORDINAL_POSITION[short] COLUMN_NAME[string] ASC_OR_DESC[string] CARDINALITY[integer] PAGES[integer] FILTER_CONDITION[string]
Copied: trunk/test-integration/db/resources/partsupplier/expected/PrimaryKeys.metadata.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/PrimaryKeys.metadata.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/PrimaryKeys.metadata.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/PrimaryKeys.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,7 @@
+ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
+TABLE_CAT 12 string java.lang.String 0 KeyColumns System PartsSupplier
+TABLE_SCHEM 12 string java.lang.String 1 KeyColumns System PartsSupplier
+TABLE_NAME 12 string java.lang.String 0 KeyColumns System PartsSupplier
+COLUMN_NAME 12 string java.lang.String 0 KeyColumns System PartsSupplier
+KEY_SEQ 5 short java.lang.Short 1 null null PartsSupplier
+PK_NAME 12 string java.lang.String 1 KeyColumns System PartsSupplier
Copied: trunk/test-integration/db/resources/partsupplier/expected/PrimaryKeys.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/PrimaryKeys.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/PrimaryKeys.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/PrimaryKeys.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,7 @@
+TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] COLUMN_NAME[string] KEY_SEQ[short] PK_NAME[string]
+PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS PART_ID 1 PK_PARTS
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS PART_ID 2 PK_SUPPLIER_PARTS
+PartsSupplier PartsSupplier PARTSSUPPLIER.SHIP_VIA SHIPPER_ID 1 PK_SHIP_VIA
+PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS STATUS_ID 1 PK_STATUS
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS SUPPLIER_ID 1 PK_SUPPLIER_PARTS
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER SUPPLIER_ID 1 PK_SUPPLIER
Copied: trunk/test-integration/db/resources/partsupplier/expected/ProcedureColumns.metadata.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/ProcedureColumns.metadata.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/ProcedureColumns.metadata.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/ProcedureColumns.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,21 @@
+ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
+PROCEDURE_CAT 12 string java.lang.String 0 ProcedureParams System PartsSupplier
+PROCEDURE_SCHEM 12 string java.lang.String 1 ProcedureParams System PartsSupplier
+PROCEDURE_NAME 12 string java.lang.String 0 ProcedureParams System PartsSupplier
+COLUMN_NAME 12 string java.lang.String 0 ProcedureParams System PartsSupplier
+COLUMN_TYPE 5 short java.lang.Short 1 null null PartsSupplier
+DATA_TYPE 4 integer java.lang.Integer 1 null null PartsSupplier
+TYPE_NAME 12 string java.lang.String 0 ProcedureParams System PartsSupplier
+PRECISION 4 integer java.lang.Integer 1 null null PartsSupplier
+LENGTH 4 integer java.lang.Integer 1 null null PartsSupplier
+SCALE 5 short java.lang.Short 1 null null PartsSupplier
+RADIX 4 integer java.lang.Integer 0 ProcedureParams System PartsSupplier
+NULLABLE 4 integer java.lang.Integer 1 null null PartsSupplier
+REMARKS 12 string java.lang.String 1 null null PartsSupplier
+COLUMN_DEF 12 string java.lang.String 1 null null PartsSupplier
+SQL_DATA_TYPE 12 string java.lang.String 1 null null PartsSupplier
+SQL_DATETIME_SUB 12 string java.lang.String 1 null null PartsSupplier
+CHAR_OCTET_LENGTH 12 string java.lang.String 1 null null PartsSupplier
+ORDINAL_POSITION 4 integer java.lang.Integer 0 ProcedureParams System PartsSupplier
+IS_NULLABLE 12 string java.lang.String 1 null null PartsSupplier
+SPECIFIC_NAME 12 string java.lang.String 0 ProcedureParams System PartsSupplier
Copied: trunk/test-integration/db/resources/partsupplier/expected/ProcedureColumns.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/ProcedureColumns.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/ProcedureColumns.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/ProcedureColumns.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,7 @@
+PROCEDURE_CAT[string] PROCEDURE_SCHEM[string] PROCEDURE_NAME[string] COLUMN_NAME[string] COLUMN_TYPE[short] DATA_TYPE[integer] TYPE_NAME[string] PRECISION[integer] LENGTH[integer] SCALE[short] RADIX[integer] NULLABLE[integer] REMARKS[string] COLUMN_DEF[string] SQL_DATA_TYPE[string] SQL_DATETIME_SUB[string] CHAR_OCTET_LENGTH[string] ORDINAL_POSITION[integer] IS_NULLABLE[string] SPECIFIC_NAME[string]
+PartsSupplier System getBinaryVDBResource resourcePath 1 12 string 50 50 0 10 0 null null null null null 1 NO getBinaryVDBResource
+PartsSupplier System getBinaryVDBResource VdbResource 3 2004 blob 2147483647 2147483647 0 10 1 null null null null null 1 YES getBinaryVDBResource
+PartsSupplier System getCharacterVDBResource resourcePath 1 12 string 50 50 0 10 0 null null null null null 1 NO getCharacterVDBResource
+PartsSupplier System getCharacterVDBResource VdbResource 3 2005 clob 2147483647 2147483647 0 10 1 null null null null null 1 YES getCharacterVDBResource
+PartsSupplier System getVDBResourcePaths ResourcePath 3 12 string 50 50 0 10 1 null null null null null 1 YES getVDBResourcePaths
+PartsSupplier System getVDBResourcePaths isBinary 3 -7 boolean 1 1 0 10 1 null null null null null 2 YES getVDBResourcePaths
Copied: trunk/test-integration/db/resources/partsupplier/expected/Procedures.metadata.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/Procedures.metadata.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/Procedures.metadata.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/Procedures.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,10 @@
+ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
+PROCEDURE_CAT 12 string java.lang.String 0 Procedures System PartsSupplier
+PROCEDURE_SCHEM 12 string java.lang.String 1 Procedures System PartsSupplier
+PROCEDURE_NAME 12 string java.lang.String 0 Procedures System PartsSupplier
+RESERVED_1 12 string java.lang.String 1 null null PartsSupplier
+RESERVED_2 12 string java.lang.String 1 null null PartsSupplier
+RESERVED_3 12 string java.lang.String 1 null null PartsSupplier
+REMARKS 12 string java.lang.String 1 Procedures System PartsSupplier
+PROCEDURE_TYPE 5 short java.lang.Short 1 null null PartsSupplier
+SPECIFIC_NAME 12 string java.lang.String 0 Procedures System PartsSupplier
Copied: trunk/test-integration/db/resources/partsupplier/expected/Procedures.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/Procedures.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/Procedures.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/Procedures.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,4 @@
+PROCEDURE_CAT[string] PROCEDURE_SCHEM[string] PROCEDURE_NAME[string] RESERVED_1[string] RESERVED_2[string] RESERVED_3[string] REMARKS[string] PROCEDURE_TYPE[short] SPECIFIC_NAME[string]
+PartsSupplier System getBinaryVDBResource null null null null 2 getBinaryVDBResource
+PartsSupplier System getCharacterVDBResource null null null null 2 getCharacterVDBResource
+PartsSupplier System getVDBResourcePaths null null null null 2 getVDBResourcePaths
Copied: trunk/test-integration/db/resources/partsupplier/expected/Schemas.metadata.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/Schemas.metadata.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/Schemas.metadata.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/Schemas.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,3 @@
+ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
+TABLE_SCHEM 12 string java.lang.String 1 Schemas System PartsSupplier
+TABLE_CATALOG 12 string java.lang.String 1 Schemas System PartsSupplier
Copied: trunk/test-integration/db/resources/partsupplier/expected/Schemas.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/Schemas.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/Schemas.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/Schemas.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,3 @@
+TABLE_SCHEM[string] TABLE_CATALOG[string]
+PartsSupplier PartsSupplier
+System PartsSupplier
Copied: trunk/test-integration/db/resources/partsupplier/expected/Tables.metadata.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/Tables.metadata.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/Tables.metadata.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/Tables.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,12 @@
+ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
+TABLE_CAT 12 string java.lang.String 1 Tables System PartsSupplier
+TABLE_SCHEM 12 string java.lang.String 1 Tables System PartsSupplier
+TABLE_NAME 12 string java.lang.String 0 Tables System PartsSupplier
+TABLE_TYPE 12 string java.lang.String 1 null null PartsSupplier
+REMARKS 12 string java.lang.String 1 Tables System PartsSupplier
+TYPE_CAT 12 string java.lang.String 1 null null PartsSupplier
+TYPE_SCHEM 12 string java.lang.String 1 null null PartsSupplier
+TYPE_NAME 12 string java.lang.String 1 null null PartsSupplier
+SELF_REFERENCING_COL_NAME 12 string java.lang.String 1 null null PartsSupplier
+REF_GENERATION 12 string java.lang.String 1 null null PartsSupplier
+ISPHYSICAL -7 boolean java.lang.Boolean 0 Tables System PartsSupplier
Copied: trunk/test-integration/db/resources/partsupplier/expected/Tables.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/Tables.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/Tables.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/Tables.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,17 @@
+TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] TABLE_TYPE[string] REMARKS[string] TYPE_CAT[string] TYPE_SCHEM[string] TYPE_NAME[string] SELF_REFERENCING_COL_NAME[string] REF_GENERATION[string] ISPHYSICAL[boolean]
+PartsSupplier System Columns SYSTEM TABLE null null null null null null true
+PartsSupplier System DataTypes SYSTEM TABLE null null null null null null true
+PartsSupplier System KeyColumns SYSTEM TABLE null null null null null null true
+PartsSupplier System Keys SYSTEM TABLE null null null null null null true
+PartsSupplier System ProcedureParams SYSTEM TABLE null null null null null null true
+PartsSupplier System Procedures SYSTEM TABLE null null null null null null true
+PartsSupplier System Properties SYSTEM TABLE null null null null null null true
+PartsSupplier System ReferenceKeyColumns SYSTEM TABLE null null null null null null true
+PartsSupplier System Schemas SYSTEM TABLE null null null null null null true
+PartsSupplier System Tables SYSTEM TABLE null null null null null null true
+PartsSupplier System VirtualDatabases SYSTEM TABLE null null null null null null true
+PartsSupplier PartsSupplier PARTSSUPPLIER.PARTS TABLE null null null null null null true
+PartsSupplier PartsSupplier PARTSSUPPLIER.SHIP_VIA TABLE null null null null null null true
+PartsSupplier PartsSupplier PARTSSUPPLIER.STATUS TABLE null null null null null null true
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER TABLE null null null null null null true
+PartsSupplier PartsSupplier PARTSSUPPLIER.SUPPLIER_PARTS TABLE null null null null null null true
Copied: trunk/test-integration/db/resources/partsupplier/expected/TypeInfo.metadata.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/TypeInfo.metadata.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/TypeInfo.metadata.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/TypeInfo.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,19 @@
+ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
+TYPE_NAME 12 string java.lang.String 0 DataTypes System PartsSupplier
+DATA_TYPE 4 integer java.lang.Integer 1 DataTypes System PartsSupplier
+PRECISION 4 integer java.lang.Integer 1 DataTypes System PartsSupplier
+LITERAL_PREFIX 12 string java.lang.String 1 DataTypes System PartsSupplier
+LITERAL_SUFFIX 12 string java.lang.String 1 DataTypes System PartsSupplier
+CREATE_PARAMS 12 string java.lang.String 1 DataTypes System PartsSupplier
+NULLABLE 5 short java.lang.Short 1 DataTypes System PartsSupplier
+CASE_SENSITIVE -7 boolean java.lang.Boolean 0 DataTypes System PartsSupplier
+SEARCHABLE 5 short java.lang.Short 1 DataTypes System PartsSupplier
+UNSIGNED_ATTRIBUTE -7 boolean java.lang.Boolean 1 DataTypes System PartsSupplier
+FIXED_PREC_SCALE -7 boolean java.lang.Boolean 1 DataTypes System PartsSupplier
+AUTO_INCREMENT -7 boolean java.lang.Boolean 0 DataTypes System PartsSupplier
+LOCAL_TYPE_NAME 12 string java.lang.String 0 DataTypes System PartsSupplier
+MINIMUM_SCALE 5 short java.lang.Short 1 DataTypes System PartsSupplier
+MAXIMUM_SCALE 5 short java.lang.Short 1 DataTypes System PartsSupplier
+SQL_DATA_TYPE 4 integer java.lang.Integer 1 DataTypes System PartsSupplier
+SQL_DATETIME_SUB 4 integer java.lang.Integer 1 DataTypes System PartsSupplier
+NUM_PREC_RADIX 4 integer java.lang.Integer 1 DataTypes System PartsSupplier
Copied: trunk/test-integration/db/resources/partsupplier/expected/TypeInfo.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/TypeInfo.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/TypeInfo.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/TypeInfo.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,19 @@
+TYPE_NAME[string] DATA_TYPE[integer] PRECISION[integer] LITERAL_PREFIX[string] LITERAL_SUFFIX[string] CREATE_PARAMS[string] NULLABLE[short] CASE_SENSITIVE[boolean] SEARCHABLE[short] UNSIGNED_ATTRIBUTE[boolean] FIXED_PREC_SCALE[boolean] AUTO_INCREMENT[boolean] LOCAL_TYPE_NAME[string] MINIMUM_SCALE[short] MAXIMUM_SCALE[short] SQL_DATA_TYPE[integer] SQL_DATETIME_SUB[integer] NUM_PREC_RADIX[integer]
+boolean -7 1 {b' } null 1 false 3 true true false boolean 0 255 null null 0
+byte -6 3 null null null 1 false 3 true true false byte 0 255 null null 0
+long -5 19 null null null 1 false 3 false false false long 0 255 null null 10
+char 1 1 ' ' null 1 false 3 true true false char 0 255 null null 0
+bigdecimal 2 20 null null null 1 false 3 false true false bigdecimal 0 255 null null 10
+biginteger 2 19 null null null 1 false 3 false false false biginteger 0 255 null null 10
+integer 4 10 null null null 1 false 3 false false false integer 0 255 null null 10
+short 5 5 null null null 1 false 3 false false false short 0 255 null null 10
+float 7 20 null null null 1 false 3 false false false float 0 255 null null 10
+double 8 20 null null null 1 false 3 false false false double 0 255 null null 10
+string 12 4000 ' ' null 1 false 3 true true false string 0 255 null null 0
+xml 2009 2147483647 null null null 1 false 3 true true false xml 0 255 null null 0
+date 91 10 {d' } null 1 false 3 true true false date 0 255 null null 0
+time 92 8 {t' } null 1 false 3 true true false time 0 255 null null 0
+timestamp 93 29 {ts' } null 1 false 3 true true false timestamp 0 255 null null 0
+object 2000 2147483647 null null null 1 false 3 true true false object 0 255 null null 0
+blob 2004 2147483647 null null null 1 false 3 true true false blob 0 255 null null 0
+clob 2005 2147483647 null null null 1 false 3 true true false clob 0 255 null null 0
Copied: trunk/test-integration/db/resources/partsupplier/expected/UDTs.metadata.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/UDTs.metadata.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/UDTs.metadata.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/UDTs.metadata.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,8 @@
+ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName
+TYPE_CAT 12 string java.lang.String 2 null null PartsSupplier
+TYPE_SCHEM 12 string java.lang.String 2 null null PartsSupplier
+TYPE_NAME 12 string java.lang.String 2 null null PartsSupplier
+CLASS_NAME 12 string java.lang.String 2 null null PartsSupplier
+DATA_TYPE 12 string java.lang.String 2 null null PartsSupplier
+REMARKS 12 string java.lang.String 2 null null PartsSupplier
+BASE_TYPE 5 short java.lang.Short 2 null null PartsSupplier
Copied: trunk/test-integration/db/resources/partsupplier/expected/UDTs.txt (from rev 1930, trunk/test-integration/common/src/test/resources/partssupplier/expected/UDTs.txt)
===================================================================
--- trunk/test-integration/db/resources/partsupplier/expected/UDTs.txt (rev 0)
+++ trunk/test-integration/db/resources/partsupplier/expected/UDTs.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1 @@
+TYPE_CAT[string] TYPE_SCHEM[string] TYPE_NAME[string] CLASS_NAME[string] DATA_TYPE[string] REMARKS[string] BASE_TYPE[short]
Copied: trunk/test-integration/db/resources/vdbless/ConfigurationInfo.def (from rev 1930, trunk/test-integration/common/src/test/resources/vdbless/ConfigurationInfo.def)
===================================================================
--- trunk/test-integration/db/resources/vdbless/ConfigurationInfo.def (rev 0)
+++ trunk/test-integration/db/resources/vdbless/ConfigurationInfo.def 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VDB>
+ <VDBInfo>
+ <Property Name="Name" Value="VDBLess" />
+ <Property Name="Version" Value="2" />
+ <Property Name="UseConnectorMetadata" Value="cached" />
+ </VDBInfo>
+ <Model>
+ <Property Name="Name" Value="SummitData" />
+ <ConnectorBindings>
+ <Connector Name="Text Connector" />
+ </ConnectorBindings>
+ </Model>
+ <Model>
+ <Property Name="Name" Value="Derby" />
+
+ <ConnectorBindings>
+ <Connector Name="Derby Connector" />
+ </ConnectorBindings>
+
+ <!-- import settings -->
+ <Property Name="importer.useFullSchemaName" Value="false"/>
+ </Model>
+ <ConnectorBindings>
+ <Connector Name="Text Connector" ComponentType="Text File Connector">
+ <Properties>
+ <Property Name="Immutable">true</Property>
+ <Property Name="DescriptorFile">src/test/resources/vdbless/TextDescriptor.txt</Property>
+ </Properties>
+ </Connector>
+ <Connector Name="Derby Connector" ComponentType="Apache Derby Embedded Connector">
+ <Properties>
+ <Property Name="Immutable">true</Property>
+ <Property Name="URL">jdbc:derby:jar:(src/test/resources/derby/sample.zip)bqt</Property>
+ </Properties>
+ </Connector>
+ </ConnectorBindings>
+</VDB>
+
Copied: trunk/test-integration/db/resources/vdbless/TextData.txt (from rev 1930, trunk/test-integration/common/src/test/resources/vdbless/TextData.txt)
===================================================================
--- trunk/test-integration/db/resources/vdbless/TextData.txt (rev 0)
+++ trunk/test-integration/db/resources/vdbless/TextData.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,2 @@
+x,1
+y,2
\ No newline at end of file
Property changes on: trunk/test-integration/db/resources/vdbless/TextData.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/test-integration/db/resources/vdbless/TextDescriptor.txt (from rev 1930, trunk/test-integration/common/src/test/resources/vdbless/TextDescriptor.txt)
===================================================================
--- trunk/test-integration/db/resources/vdbless/TextDescriptor.txt (rev 0)
+++ trunk/test-integration/db/resources/vdbless/TextDescriptor.txt 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,4 @@
+SummitData.Example.location = src/test/resources/vdbless/TextData.txt
+SummitData.Example.delimiter = ,
+SummitData.Example.columns = TRADEID,NOTIONAL
+SummitData.Example.types = STRING, INTEGER
Property changes on: trunk/test-integration/db/resources/vdbless/TextDescriptor.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/test-integration/db/resources/vdbless/dqp.properties (from rev 1930, trunk/test-integration/common/src/test/resources/vdbless/dqp.properties)
===================================================================
--- trunk/test-integration/db/resources/vdbless/dqp.properties (rev 0)
+++ trunk/test-integration/db/resources/vdbless/dqp.properties 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,32 @@
+#
+# JBoss, Home of Professional Open Source.
+# See the COPYRIGHT.txt file distributed with this work for information
+# regarding copyright ownership. Some portions may be licensed
+# to Red Hat, Inc. under one or more contributor license agreements.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
+#
+
+dqp.configFile=../ServerConfig.xml
+dqp.buffer.usedisk=false
+vdb.definition=./ConfigurationInfo.def
+processorDebugAllowed=true
+#only for testing, as this takes more time to start and shutdown
+xa.enable_recovery=false
+
+teiid.home=target/scratch/vdbsless
+
+processName=vdbless
\ No newline at end of file
Property changes on: trunk/test-integration/db/resources/vdbless/dqp.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/test-integration/db/resources/xml-vp/xmlvp.DEF (from rev 1930, trunk/test-integration/common/src/test/resources/xml-vp/xmlvp.DEF)
===================================================================
--- trunk/test-integration/db/resources/xml-vp/xmlvp.DEF (rev 0)
+++ trunk/test-integration/db/resources/xml-vp/xmlvp.DEF 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VDB>
+ <Header>
+ <VDBExporterVersion>4.1</VDBExporterVersion>
+ <ApplicationCreatedBy>MetaMatrix Console</ApplicationCreatedBy>
+ <ApplicationVersion>4.3:2164</ApplicationVersion>
+ <UserCreatedBy>MetaMatrixAdmin</UserCreatedBy>
+ <MetaMatrixSystemVersion>4.3</MetaMatrixSystemVersion>
+ <Time>2005-07-25T13:19:44.501-06:00</Time>
+ </Header>
+ <VDBInfo>
+ <Property Name="Name" Value="xmlvp" />
+ <Property Name="GUID" Value="mmuuid:c101df82-0b8a-1f51-ae3d-96f82e6d8836" />
+ <Property Name="Version" Value="1" />
+ <Property Name="VDBArchiveName" Value="xmlvp_1.vdb" />
+ <Property Name="Description" Value="" />
+ <Property Name="IsActive" Value="true" />
+ </VDBInfo>
+ <Model>
+ <Property Name="Name" Value="test2" />
+ <Property Name="Visibility" Value="Public" />
+ <Property Name="MultiSourceEnabled" Value="false" />
+ </Model>
+ <Model>
+ <Property Name="Name" Value="BQT1" />
+ <Property Name="Visibility" Value="Public" />
+ <Property Name="MultiSourceEnabled" Value="false" />
+ <ConnectorBindings>
+ <Connector Name="BQT2 Oracle 9i Simple Cap" />
+ </ConnectorBindings>
+ </Model>
+ <Model>
+ <Property Name="Name" Value="testDoc" />
+ <Property Name="Visibility" Value="Public" />
+ <Property Name="MultiSourceEnabled" Value="false" />
+ </Model>
+ <Model>
+ <Property Name="Name" Value="test" />
+ <Property Name="Visibility" Value="Public" />
+ <Property Name="MultiSourceEnabled" Value="false" />
+ </Model>
+ <Model>
+ <Property Name="Name" Value="test13326Doc" />
+ <Property Name="Visibility" Value="Public" />
+ <Property Name="MultiSourceEnabled" Value="false" />
+ </Model>
+ <ComponentTypes>
+ <ComponentType Name="Loopback Connector" ComponentTypeCode="2" Deployable="true" Deprecated="false" Monitorable="false" SuperComponentType="Connector" ParentComponentType="Connectors" LastChangedBy="ConfigurationStartup" LastChangedDate="2005-07-21T10:07:40.921-06:00" CreatedBy="ConfigurationStartup" CreationDate="2005-07-21T10:07:40.921-06:00">
+ <ComponentTypeDefn Deprecated="false">
+ <PropertyDefinition Name="CapabilitiesClass" DisplayName="Capabilities Class" ShortDescription="" DefaultValue="" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
+ </ComponentTypeDefn>
+ <ComponentTypeDefn Deprecated="false">
+ <PropertyDefinition Name="ConnectorClass" DisplayName="Connector Class" ShortDescription="" DefaultValue="com.metamatrix.connector.loopback.LoopbackConnector" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
+ </ComponentTypeDefn>
+ <ComponentTypeDefn Deprecated="false">
+ <PropertyDefinition Name="RowCount" DisplayName="Rows Per Query" ShortDescription="" DefaultValue="1" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="true" />
+ </ComponentTypeDefn>
+ <ComponentTypeDefn Deprecated="false">
+ <PropertyDefinition Name="WaitTime" DisplayName="Max Random Wait Time" ShortDescription="" DefaultValue="0" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="true" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
+ </ComponentTypeDefn>
+ <ComponentTypeDefn Deprecated="false">
+ <PropertyDefinition Name="ConnectorClassPath" DisplayName="Class Path" ShortDescription="" DefaultValue="extensionjar:loopbackconn.jar;extensionjar:jdbcconn.jar" Multiplicity="1" PropertyType="String" ValueDelimiter="," IsConstrainedToAllowedValues="true" IsExpert="false" IsHidden="false" IsMasked="false" IsModifiable="true" IsPreferred="false" />
+ </ComponentTypeDefn>
+ </ComponentType>
+ </ComponentTypes>
+ <ConnectorBindings>
+ <Connector Name="BQT2 Oracle 9i Simple Cap" ComponentType="Loopback Connector" LastChangedBy="metamatrixadmin" LastChangedDate="2005-07-20T12:58:35.551-06:00" CreatedBy="metamatrixadmin" CreationDate="2005-07-20T11:39:55.961-06:00" QueuedService="false" routingUUID="mmuuid:a6ea7cc0-c651-1f91-940a-b13465b430eb">
+ <Properties>
+ <Property Name="MaxResultRows">10000</Property>
+ <Property Name="ConnectorThreadTTL">120000</Property>
+ <Property Name="ConnectorMaxThreads">5</Property>
+ <Property Name="CapabilitiesClass" />
+ <Property Name="metamatrix.service.essentialservice">false</Property>
+ <Property Name="ConnectorClassPath">extensionjar:loopbackconn.jar</Property>
+ <Property Name="RowCount">1</Property>
+ <Property Name="ServiceClassName">com.metamatrix.server.connector.service.ConnectorService</Property>
+ <Property Name="ConnectorClass">com.metamatrix.connector.loopback.LoopbackConnector</Property>
+ <Property Name="WaitTime">0</Property>
+ </Properties>
+ </Connector>
+ </ConnectorBindings>
+</VDB>
+
Copied: trunk/test-integration/db/resources/xml-vp/xmlvp.properties (from rev 1930, trunk/test-integration/common/src/test/resources/xml-vp/xmlvp.properties)
===================================================================
--- trunk/test-integration/db/resources/xml-vp/xmlvp.properties (rev 0)
+++ trunk/test-integration/db/resources/xml-vp/xmlvp.properties 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,37 @@
+#
+# JBoss, Home of Professional Open Source.
+# See the COPYRIGHT.txt file distributed with this work for information
+# regarding copyright ownership. Some portions may be licensed
+# to Red Hat, Inc. under one or more contributor license agreements.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
+#
+
+dqp.configFile=../ServerConfig.xml
+#dqp.metadata.systemURL=file://${system-vdb-path}/System.vdb
+vdb.definition=./xmlvp.DEF
+#metamatrix.security.password.PasswordKeyStore=c3B1dG5pazEz
+#dqp.logFile=./logs/DQP.log
+#dqp.logLevel=2
+#dqp.classpath=./lib/;./license/;./lib/metamatrix-dqp.jar;./lib/bcprov-jdk14-122.jar;./extensions/MJjdbc.jar
+dqp.buffer.usedisk=false
+
+#only for testing, as this takes more time to start and shutdown
+xa.enable_recovery=false
+
+teiid.home=target/scratch/xml-vp
+
+processName=xml-vp
Copied: trunk/test-integration/db/resources/xml-vp/xmlvp_1.vdb (from rev 1930, trunk/test-integration/common/src/test/resources/xml-vp/xmlvp_1.vdb)
===================================================================
(Binary files differ)
Property changes on: trunk/test-integration/db/resources/xml-vp/xmlvp_1.vdb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/DataSourceConnection.java
===================================================================
--- trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/DataSourceConnection.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/DataSourceConnection.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -12,7 +12,6 @@
import javax.sql.XAConnection;
import javax.sql.XADataSource;
-import org.teiid.connector.jdbc.JDBCPropertyNames;
import org.teiid.jdbc.TeiidDataSource;
import org.teiid.test.framework.TestLogger;
import org.teiid.test.framework.datasource.DataSourceFactory;
@@ -28,8 +27,8 @@
// need both user variables because Teiid uses 'user' and connectors use
// 'username'
- public static final String DS_USERNAME = JDBCPropertyNames.USERNAME; //$NON-NLS-1$
- public static final String DS_PASSWORD = JDBCPropertyNames.PASSWORD; //$NON-NLS-1$
+ public static final String DS_USERNAME = "User"; //$NON-NLS-1$
+ public static final String DS_PASSWORD = "Password"; //$NON-NLS-1$
// the driver is only used for making direct connections to the source, the
// connector type will provide the JDBCPropertyNames.CONNECTION_SOURCE
Modified: trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/DriverConnection.java
===================================================================
--- trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/DriverConnection.java 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/DriverConnection.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -9,7 +9,6 @@
import java.sql.SQLException;
import java.util.Properties;
-import org.teiid.connector.jdbc.JDBCPropertyNames;
import org.teiid.test.framework.TestLogger;
import org.teiid.test.framework.datasource.DataSourceFactory;
import org.teiid.test.framework.exception.QueryTestFailedException;
@@ -26,15 +25,15 @@
// need both user variables because Teiid uses 'user' and connectors use
// 'username'
- public static final String DS_USERNAME = JDBCPropertyNames.USERNAME; //$NON-NLS-1$
- public static final String DS_PASSWORD = JDBCPropertyNames.PASSWORD; //$NON-NLS-1$
+ public static final String DS_USERNAME = "User"; //$NON-NLS-1$
+ public static final String DS_PASSWORD = "Password"; //$NON-NLS-1$
// the driver is only used for making direct connections to the source, the
// connector type will provide the JDBCPropertyNames.CONNECTION_SOURCE
// driver class
public static final String DS_DRIVER = "driver"; //$NON-NLS-1$
- public static final String DS_URL = JDBCPropertyNames.URL; //$NON-NLS-1$
+ public static final String DS_URL = "URL"; //$NON-NLS-1$
public static final String DS_APPLICATION_NAME = "application-name"; //$NON-NLS-1$
private String url = null;
Added: trunk/test-integration/db/src/test/java/com/metamatrix/jdbc/TestCase3473.java
===================================================================
--- trunk/test-integration/db/src/test/java/com/metamatrix/jdbc/TestCase3473.java (rev 0)
+++ trunk/test-integration/db/src/test/java/com/metamatrix/jdbc/TestCase3473.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,273 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.jdbc;
+
+import static junit.framework.Assert.*;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Collections;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.metamatrix.core.util.UnitTestUtil;
+import com.metamatrix.jdbc.MMDatabaseMetaData;
+import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
+import com.metamatrix.jdbc.util.ResultSetUtil;
+
+/**
+ */
+public class TestCase3473 extends AbstractMMQueryTestCase {
+
+ private static final String DQP_CONFIG_FILE = UnitTestUtil.getTestDataPath() + "/3473/3473.properties;user=test"; //$NON-NLS-1$
+
+ private MMDatabaseMetaData dbmd = null;
+
+ ////////////////////Query Related Methods///////////////////////////
+
+ public static final short ALWAYS_NULL = 0;
+ public static final short NEVER_NULL = 1;
+ public static final short MAY_BE_NULL = 2;
+
+ private static final boolean REPLACE_EXPECTED = false;
+ private static final boolean WRITE_ACTUAL_RESULTS_TO_FILE = false;
+ private static final boolean PRINT_RESULTSETS_TO_CONSOLE = false;
+
+ private static final int MAX_COL_WIDTH = 65;
+
+ private FileOutputStream actualOut = null;
+ private BufferedReader expectedIn = null;
+ private PrintStream stream = null;
+
+ @Before public void setUp() throws SQLException {
+ Connection conn = getConnection("test", DQP_CONFIG_FILE); //$NON-NLS-1$
+ dbmd = (MMDatabaseMetaData)conn.getMetaData();
+ }
+
+ private void initResultSetStreams(String testName) {
+ if (REPLACE_EXPECTED) {
+ File actual = new File(UnitTestUtil.getTestDataPath() + "/3473/"+testName+".expected"); //$NON-NLS-1$ //$NON-NLS-2$
+ try {
+ actualOut = new FileOutputStream(actual);
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ } else {
+ if (WRITE_ACTUAL_RESULTS_TO_FILE) {
+ File actual = new File(UnitTestUtil.getTestDataPath() + "/3473/"+testName+".actual"); //$NON-NLS-1$ //$NON-NLS-2$
+ try {
+ actualOut = new FileOutputStream(actual);
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ }
+ File expected = new File(UnitTestUtil.getTestDataPath() + "/3473/"+testName+".expected"); //$NON-NLS-1$ //$NON-NLS-2$
+ try {
+ expectedIn = new BufferedReader(new FileReader(expected));
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ }
+ PrintStream defaultStream = null;
+ if (PRINT_RESULTSETS_TO_CONSOLE) {
+ defaultStream = new PrintStream(System.out) {
+ // System.out should be protected from being closed.
+ public void close() {}
+ };
+ }
+ stream = ResultSetUtil.getPrintStream(actualOut, expectedIn, defaultStream);
+
+ }
+
+ private void closeResultSetTestStreams() throws IOException {
+ stream.close();
+ if (actualOut != null) {
+ actualOut.close();
+ }
+ if (expectedIn != null) {
+ expectedIn.close();
+ }
+ }
+
+ public void checkColumn(String expectedName, short nullable, Class type, String metadataName, Object value) {
+ if(nullable == ALWAYS_NULL) {
+ assertNull("Column " + expectedName + " should always be null but was: " + value, value); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if(nullable == NEVER_NULL) {
+ assertNotNull("Column " + expectedName + " should never be null but was", value); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if(value != null) {
+ assertTrue("Column " + expectedName + " is of wrong type", value.getClass().isAssignableFrom(type)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ assertEquals("Got incorrect column name", expectedName, metadataName); //$NON-NLS-1$
+ }
+
+
+
+ @Test public void testGetCrossReference() throws Exception {
+ initResultSetStreams("testGetCrossReference"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+ stream.println("getCrossReference1"); //$NON-NLS-1$
+ rs = dbmd.getCrossReference(null,"test", "all_databases", null,"test", "all_models");//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ // Check for empty
+ stream.println("getCrossReference2"); //$NON-NLS-1$
+ rs = dbmd.getCrossReference(null, "Foo%", "%", null, null, "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ // Check for empty
+ stream.println("getCrossReference3"); //$NON-NLS-1$
+ rs = dbmd.getCrossReference("foo", "Foo%", "%", null, null, "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+
+ // Check for all cross references
+ stream.println("getCrossReference4"); //$NON-NLS-1$
+ rs = dbmd.getCrossReference(null, null, null, null, null, null);
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test public void testGetImportedKeys() throws Exception {
+ initResultSetStreams("testGetImportedKeys"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+ stream.println("getImportedKeys1"); //$NON-NLS-1$
+ rs = dbmd.getImportedKeys(null,"test", "all_models"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ stream.println("getImportedKeys2"); //$NON-NLS-1$
+ rs = dbmd.getImportedKeys(null, "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ stream.println("getImportedKeys3"); //$NON-NLS-1$
+ rs = dbmd.getImportedKeys("foo", "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test public void testGetExportedKeys() throws Exception {
+ initResultSetStreams("testGetExportedKeys"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+ rs = dbmd.getExportedKeys(null,"test", "all_models"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ rs = dbmd.getExportedKeys(null, "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getExportedKeys("foo", "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+
+ @Test public void testGetPrimaryKeys() throws Exception {
+ initResultSetStreams("testGetPrimaryKeys"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+ rs = dbmd.getPrimaryKeys(null,"test", "all_models"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ // Check for empty
+ rs = dbmd.getPrimaryKeys(null, "Foo%", "test.all_models"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getPrimaryKeys("foo", "Foo%", "test.all_models"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test public void testGetTables() throws Exception{
+ initResultSetStreams("testGetTables"); //$NON-NLS-1$
+ ResultSet rs = dbmd.getTables(null, null, null, null);
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getTables(null, "%foo", null, null); //$NON-NLS-1$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getTables("foo", "%foo", null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+}
Added: trunk/test-integration/db/src/test/java/com/metamatrix/jdbc/TestMMDatabaseMetaData.java
===================================================================
--- trunk/test-integration/db/src/test/java/com/metamatrix/jdbc/TestMMDatabaseMetaData.java (rev 0)
+++ trunk/test-integration/db/src/test/java/com/metamatrix/jdbc/TestMMDatabaseMetaData.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,1491 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.jdbc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.lang.reflect.Method;
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.Types;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.teiid.jdbc.TeiidDriver;
+
+import com.metamatrix.common.util.ApplicationInfo;
+import com.metamatrix.core.util.UnitTestUtil;
+import com.metamatrix.jdbc.MMConnection;
+import com.metamatrix.jdbc.MMDatabaseMetaData;
+import com.metamatrix.jdbc.util.ResultSetUtil;
+
+/**
+ */
+public class TestMMDatabaseMetaData {
+
+ private static final String DQP_CONFIG_FILE = UnitTestUtil.getTestDataPath() + "/bqt/bqt.properties;user=test"; //$NON-NLS-1$
+
+ static Connection conn = null;
+ static String primaryUrl = "jdbc:metamatrix:QT_Ora9DS@" + DQP_CONFIG_FILE + ";version=1"; //$NON-NLS-1$ //$NON-NLS-2$
+ // URL for local DQP
+ static String serverUrl = primaryUrl + ";logLevel=1;partialResultsMode=false"; //$NON-NLS-1$
+
+ // URL for integration test
+ MMDatabaseMetaData dbmd = null;
+ private Map expectedMap = new HashMap();
+
+ // constant
+ private static final int NO_LIMIT = 0;
+ // constant value giving the key words used in metamatrix not in SQL-92
+ private final static String KEY_WORDS = "OPTION, SHOWPLAN, DEBUG"; //$NON-NLS-1$
+
+ //==============================================================================
+ // The following 2 constants are defined here to provide access to constants
+ // defined in the JDBC 3.0 implementation that comes with the 1.4 JRE.
+ // They are defined this way to allow this class to compile with the 1.3 JRE.
+ //==============================================================================
+ private static final int ResultSet_HOLD_CURSORS_OVER_COMMIT = 1; // ResultSet.HOLD_CURSORS_OVER_COMMIT == 1
+ private static final int ResultSet_CLOSE_CURSORS_AT_COMMIT = 2; // ResultSet.CLOSE_CURSORS_AT_COMMIT == 2
+
+ @Before
+ public void setUp() throws Exception {
+ dbmd = new MMDatabaseMetaData((MMConnection) conn);
+ }
+
+ @AfterClass
+ public static void oneTimeTearDown() throws Exception {
+ if (conn != null) {
+ conn.close();
+ }
+ }
+
+ @BeforeClass
+ public static void oneTimeSetUp() throws Exception {
+ Class.forName(TeiidDriver.class.getName());
+ conn = DriverManager.getConnection(serverUrl);
+ }
+
+ /** Test all the non-query methods */
+ @Test
+ public void testMethodsWithoutParams() throws Exception {
+ Class dbmdClass = dbmd.getClass();
+ // non-query Methods return String, boolean or int
+ Method[] methods = dbmdClass.getDeclaredMethods();
+
+ expectedMap = getExpected();
+ //System.out.println(" -- total method == " + methods.length + ", non-query == " + expectedMap.size());
+ for (int i = 0; i < methods.length; i++) {
+ if (expectedMap.containsKey(methods[i].getName())) {
+
+ Object actualValue = null;
+ Object expectedValue = null;
+ Object expectedReturn = expectedMap.get(methods[i].getName());
+ Object[] params = null;
+
+ if (methods[i].getName().equalsIgnoreCase(DQP_CONFIG_FILE))
+
+ if (expectedReturn instanceof List) {
+ // has input parameters
+ List returned = (List) expectedReturn;
+ params = (Object[]) returned.get(1);
+ //System.out.println(" params == " + params[0]);
+ expectedValue = returned.get(0);
+ actualValue = methods[i].invoke(dbmd, params);
+ } else {
+ // without params
+ expectedValue = expectedReturn;
+ actualValue = methods[i].invoke(dbmd, new Object[0]);
+ }
+
+ assertEquals(" Expected doesn't match with actual for method - " + //$NON-NLS-1$
+ methods[i].getName(), expectedValue, actualValue);
+ //System.out.println("method [" + methods[i].getName() + " ] 's expectedValue == " + expectedValue + " actual == " + actualValue);
+ }
+ }
+ }
+
+ /** Test all the methods that throw exception */
+ @Test
+ public void testMethodsWithExceptions() throws Exception {
+ Class dbmdClass = dbmd.getClass();
+ Method[] methods = dbmdClass.getDeclaredMethods();
+
+ expectedMap = new HashMap(); //none expected
+ //System.out.println(" -- total method == " + methods.length + ", non-query == " + expectedMap.size());
+ for (int i =0; i< methods.length; i++) {
+ if (expectedMap.containsKey(methods[i].getName())) {
+ methods[i].invoke(dbmd, new Object[0]);
+ }
+ }
+ }
+
+ /** test supportResultSetConcurrency() with params and test them with different input values */
+ @Test
+ public void testSupportResultSetConcurrency() throws Exception {
+ boolean returned = true;
+ String functionName = "supportResultSetConcurrency"; //$NON-NLS-1$
+
+ // should return true;
+ Object[] params =
+ new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY), new Integer(ResultSet.CONCUR_READ_ONLY)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // shoud return true;
+ params =
+ new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE), new Integer(ResultSet.CONCUR_READ_ONLY)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // should return false;
+ params =
+ new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE), new Integer(ResultSet.CONCUR_UPDATABLE)};
+ returned = false;
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // should return false;
+ params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY), new Integer(ResultSet.CONCUR_UPDATABLE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+ }
+
+ /** test supportResultSetHoldability() with params and test them with different input values */
+ @Test
+ public void testSupportResultSetHoldability() throws Exception {
+ boolean returned = false;
+ String functionName = "supportResultSetHoldability"; //$NON-NLS-1$
+
+ // should return false;
+ Object[] params = new Object[] { new Integer(ResultSet_HOLD_CURSORS_OVER_COMMIT)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // shoud return false;
+ params = new Object[] { new Integer(ResultSet_CLOSE_CURSORS_AT_COMMIT)};
+ helpTestMethodsWithParams(functionName, returned, params);
+ }
+
+ /** test supportResultSetType() with params and test them with different input values */
+ @Test
+ public void testSupportResultSetType() throws Exception {
+ boolean returned = true;
+ String functionName = "supportResultSetType"; //$NON-NLS-1$
+
+ // should return true;
+ Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // shoud return true;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // should return false;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
+ returned = false;
+ helpTestMethodsWithParams(functionName, returned, params);
+ }
+
+ /** test supportsTransactionIsolationLevel() with params and test them with different input values */
+ @Test
+ public void testSupportsTransactionIsolationLevel() throws Exception {
+ boolean returned = false;
+ String functionName = "supportsTransactionIsolationLevel"; //$NON-NLS-1$
+
+ // should return true;
+ //TODO: what is transaction isolation level?
+ Object[] params = new Object[] { new Integer(1)};
+ helpTestMethodsWithParams(functionName, returned, params);
+ }
+
+ /** test deletesAreDetected() with params and test them with different input values */
+ @Test
+ public void testDeletesAreDetected() throws Exception {
+ boolean returned = false;
+ String functionName = "deletesAreDetected"; //$NON-NLS-1$
+
+ // should return true;
+ Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // shoud return true;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // should return false;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+ }
+
+ /** test insertsAreDetected() with params and test them with different input values */
+ @Test
+ public void testInsertsAreDetected() throws Exception {
+ boolean returned = false;
+ String functionName = "insertsAreDetected"; //$NON-NLS-1$
+
+ // should return true;
+ Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // shoud return true;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // should return false;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+ }
+
+ /** test updatesAreDetected() with params and test them with different input values */
+ @Test
+ public void testUpdatesAreDetected() throws Exception {
+ boolean returned = false;
+ String functionName = "updatesAreDetected"; //$NON-NLS-1$
+
+ // should return true;
+ Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // shoud return true;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // should return false;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+ }
+
+ /** test ownUpdatesAreVisible() with params and test them with different input values */
+ @Test
+ public void testOwnUpdatesAreVisible() throws Exception {
+ boolean returned = false;
+ String functionName = "ownUpdatesAreVisible"; //$NON-NLS-1$
+
+ // should return true;
+ Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // shoud return true;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // should return false;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+ }
+
+ /** test ownInsertsAreVisible() with params and test them with different input values */
+ @Test
+ public void testOwnInsertsAreVisible() throws Exception {
+ boolean returned = false;
+ String functionName = "ownInsertsAreVisible"; //$NON-NLS-1$
+
+ // should return true;
+ Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // shoud return true;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // should return false;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+ }
+
+ /** test othersUpdatesAreVisible() with params and test them with different input values */
+ @Test
+ public void testOthersUpdatesAreVisible() throws Exception {
+ boolean returned = false;
+ String functionName = "othersUpdatesAreVisible"; //$NON-NLS-1$
+
+ // should return true;
+ Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // shoud return true;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // should return false;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+ }
+
+ /** test othersInsertsAreVisible() with params and test them with different input values */
+ @Test
+ public void testOthersInsertsAreVisible() throws Exception {
+ boolean returned = false;
+ String functionName = "othersInsertsAreVisible"; //$NON-NLS-1$
+
+ // should return true;
+ Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // shoud return true;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // should return false;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+ }
+
+ /** test othersInsertsAreVisible() with params and test them with different input values */
+ @Test
+ public void testOthersDeletesAreVisible() throws Exception {
+ boolean returned = false;
+ String functionName = "othersDeletesAreVisible"; //$NON-NLS-1$
+
+ // should return true;
+ Object[] params = new Object[] { new Integer(ResultSet.TYPE_FORWARD_ONLY)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // shoud return true;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_INSENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+
+ // should return false;
+ params = new Object[] { new Integer(ResultSet.TYPE_SCROLL_SENSITIVE)};
+ helpTestMethodsWithParams(functionName, returned, params);
+ }
+
+ /** test overloaded method supportsConvert() with params and test them with different input values */
+ @Test
+ public void testSupportsConvert1() throws Exception {
+ assertEquals("Expected doesn't match with actual for method - supportsConvert()", //$NON-NLS-1$
+ true, dbmd.supportsConvert());
+ }
+
+ /** test overloaded method supportsConvert() without params */
+ @Test
+ public void testSupportsConvert2() throws Exception {
+ // should succeed
+ helpTestSupportsConverts(Types.CHAR, Types.CHAR, true);
+ helpTestSupportsConverts(Types.CHAR, Types.VARCHAR, true);
+ helpTestSupportsConverts(Types.CHAR, Types.LONGVARCHAR, true);
+ helpTestSupportsConverts(Types.CHAR, Types.BIT, true);
+ helpTestSupportsConverts(Types.CHAR, Types.SMALLINT, true);
+ helpTestSupportsConverts(Types.CHAR, Types.TINYINT, true);
+ helpTestSupportsConverts(Types.CHAR, Types.INTEGER, true);
+ helpTestSupportsConverts(Types.CHAR, Types.BIGINT, true);
+ helpTestSupportsConverts(Types.CHAR, Types.FLOAT, true);
+ helpTestSupportsConverts(Types.CHAR, Types.REAL, true);
+ helpTestSupportsConverts(Types.CHAR, Types.DOUBLE, true);
+ helpTestSupportsConverts(Types.CHAR, Types.NUMERIC, true);
+ helpTestSupportsConverts(Types.CHAR, Types.DECIMAL, true);
+ helpTestSupportsConverts(Types.CHAR, Types.DATE, true);
+ helpTestSupportsConverts(Types.CHAR, Types.TIME, true);
+ helpTestSupportsConverts(Types.CHAR, Types.TIMESTAMP, true);
+
+ // should fail
+ helpTestSupportsConverts(Types.DATE, Types.INTEGER, false);
+
+ // TODO: there are other combination tests
+ helpTestSupportsConverts(Types.CHAR, Types.BIGINT, true);
+ helpTestSupportsConverts(Types.CHAR, Types.FLOAT, true);
+ helpTestSupportsConverts(Types.CHAR, Types.REAL, true);
+ }
+
+ ////////////////////Query Related Methods///////////////////////////
+
+ public static final short ALWAYS_NULL = 0;
+ public static final short NEVER_NULL = 1;
+ public static final short MAY_BE_NULL = 2;
+
+ private static final boolean REPLACE_EXPECTED = false;
+ private static final boolean WRITE_ACTUAL_RESULTS_TO_FILE = false;
+ private static final boolean PRINT_RESULTSETS_TO_CONSOLE = false;
+
+ private static final int MAX_COL_WIDTH = 65;
+
+ private FileOutputStream actualOut = null;
+ private BufferedReader expectedIn = null;
+ private PrintStream stream = null;
+ private void initResultSetStreams(String testName) throws FileNotFoundException {
+ if (REPLACE_EXPECTED) {
+ File actual = new File(UnitTestUtil.getTestDataPath() + "/TestMMDatabaseMetaData/"+testName+".expected"); //$NON-NLS-1$ //$NON-NLS-2$
+ actualOut = new FileOutputStream(actual);
+ } else {
+ if (WRITE_ACTUAL_RESULTS_TO_FILE) {
+ File actual = new File(UnitTestUtil.getTestDataPath() + "/TestMMDatabaseMetaData/"+testName+".actual"); //$NON-NLS-1$ //$NON-NLS-2$
+ actualOut = new FileOutputStream(actual);
+ }
+ File expected = new File(UnitTestUtil.getTestDataPath() + "/TestMMDatabaseMetaData/"+testName+".expected"); //$NON-NLS-1$ //$NON-NLS-2$
+ expectedIn = new BufferedReader(new FileReader(expected));
+ }
+ PrintStream defaultStream = null;
+ if (PRINT_RESULTSETS_TO_CONSOLE) {
+ defaultStream = new PrintStream(System.out) {
+ // System.out should be protected from being closed.
+ public void close() {}
+ };
+ }
+ stream = ResultSetUtil.getPrintStream(actualOut, expectedIn, defaultStream);
+
+ }
+
+ private void closeResultSetTestStreams() throws IOException {
+ stream.close();
+ if (actualOut != null) {
+ actualOut.close();
+ }
+ if (expectedIn != null) {
+ expectedIn.close();
+ }
+ }
+
+ public void checkColumn(String expectedName, short nullable, Class type, String metadataName, Object value) {
+ if(nullable == ALWAYS_NULL) {
+ assertNull("Column " + expectedName + " should always be null but was: " + value, value); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if(nullable == NEVER_NULL) {
+ assertNotNull("Column " + expectedName + " should never be null but was", value); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ if(value != null) {
+ assertTrue("Column " + expectedName + " is of wrong type", value.getClass().isAssignableFrom(type)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ assertEquals("Got incorrect column name", expectedName, metadataName); //$NON-NLS-1$
+ }
+
+ public void checkNullConstant(Object value) {
+ assertNotNull("Got null nullability constant", value); //$NON-NLS-1$
+ assertTrue("Nullability constant is wrong type: " + value.getClass(), value.getClass().equals(Integer.class)); //$NON-NLS-1$
+ Integer intValue = (Integer) value;
+ assertTrue("Got invalid nullability constant: " + value, //$NON-NLS-1$
+ intValue.intValue() == DatabaseMetaData.columnNoNulls ||
+ intValue.intValue() == DatabaseMetaData.columnNullable ||
+ intValue.intValue() == DatabaseMetaData.columnNullableUnknown
+ );
+ }
+
+ @Test
+ public void testUcaseMatchReturnsRows() throws Exception {
+ ResultSet rs = null;
+ try {
+ java.sql.Statement stmt = conn.createStatement();
+
+ // Returns 0 rows (but should be identical and return 24 rows):
+ rs = stmt.executeQuery("SELECT Name FROM System.Tables WHERE UCASE(SchemaName) = 'SYSTEM'"); //$NON-NLS-1$
+
+ int count = 0;
+ while(rs.next()) {
+ count++;
+ }
+ assertEquals(11, count);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+ }
+
+ @Test
+ public void testGetColumnsSingleMatch() throws Exception {
+ initResultSetStreams("testGetColumnsSingleMatch"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+ //List expected = getExpectedColumns();
+
+ rs = dbmd.getColumns(null, "System", "VirtualDatabases", "Name"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ closeResultSetTestStreams();
+ }
+ }
+
+ @Test
+ public void testGetCatalogs() throws Exception {
+ initResultSetStreams("testGetCatalogs"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+
+ rs = dbmd.getCatalogs();
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ } finally {
+ if (rs != null) {
+ rs.close();
+ }
+ closeResultSetTestStreams();
+ }
+ }
+
+ @Test
+ public void testGetCrossReference() throws Exception {
+ initResultSetStreams("testGetCrossReference"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+
+ stream.println("getCrossReference1"); //$NON-NLS-1$
+ rs = dbmd.getCrossReference(null, "BQT1", "SmallA", null, "BQT1", "SmallB");//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ // Check for empty
+ stream.println("getCrossReference2"); //$NON-NLS-1$
+ rs = dbmd.getCrossReference(null, "Foo%", "%", null, null, "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ // Check for empty
+ stream.println("getCrossReference3"); //$NON-NLS-1$
+ rs = dbmd.getCrossReference("foo", "Foo%", "%", null, null, "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetImportedKeys() throws Exception {
+ initResultSetStreams("testGetImportedKeys"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+ stream.println("getImportedKeys1"); //$NON-NLS-1$
+ rs = dbmd.getImportedKeys(null, "BQT1", "SmallA"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ stream.println("getImportedKeys2"); //$NON-NLS-1$
+ rs = dbmd.getImportedKeys(null, "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ stream.println("getImportedKeys3"); //$NON-NLS-1$
+ rs = dbmd.getImportedKeys("foo", "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetExportedKeys() throws Exception {
+ initResultSetStreams("testGetExportedKeys"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+ rs = dbmd.getExportedKeys(null, "BQT1", "SmallA"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ rs = dbmd.getExportedKeys(null, "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getExportedKeys("foo", "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetIndexInfo() throws Exception {
+ initResultSetStreams("testGetIndexInfo"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+ rs = dbmd.getIndexInfo(null, "System", "KeyColumns", true, true); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ rs = dbmd.getIndexInfo(null, "Foo%", "%", true, false); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getIndexInfo("foo", "Foo%", "%", true, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetPrimaryKeys() throws Exception {
+ initResultSetStreams("testGetPrimaryKeys"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+ rs = dbmd.getPrimaryKeys(null, "BQT1", "SmallA"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ // Check for empty
+ rs = dbmd.getPrimaryKeys(null, "Foo%", "BQT1.SmallA"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getPrimaryKeys("foo", "Foo%", "BQT1.SmallA"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetProcedureColumns() throws Exception {
+ initResultSetStreams("testGetProcedureColumns"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+ rs = dbmd.getProcedureColumns(null, null, null, null);
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ rs = dbmd.getProcedureColumns(null, "Foo%", null, null); //$NON-NLS-1$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getProcedureColumns("foo", "Foo%", null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetProcedures() throws Exception {
+ initResultSetStreams("testGetProcedures"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+ rs = dbmd.getProcedures(null, null, null);
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ rs = dbmd.getProcedures(null, "Foo%", null); //$NON-NLS-1$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getProcedures("foo", "Foo%", null); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetSchemas() throws Exception {
+ initResultSetStreams("testGetSchemas"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+ rs = dbmd.getSchemas();
+
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ closeResultSetTestStreams();
+ }
+ }
+ @Test
+ public void testGetColumns() throws Exception {
+ initResultSetStreams("testGetColumns"); //$NON-NLS-1$
+ stream.println("getColumns1"); //$NON-NLS-1$
+ ResultSet rs = dbmd.getColumns(null, null, null, null);
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetColumns2() throws Exception {
+ initResultSetStreams("testGetColumns2"); //$NON-NLS-1$
+
+ stream.println("getColumns2"); //$NON-NLS-1$
+ ResultSet rs = dbmd.getColumns(null, "QT_Ora%", "%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetColumns3() throws Exception {
+ initResultSetStreams("testGetColumns3"); //$NON-NLS-1$
+
+ stream.println("getColumns3"); //$NON-NLS-1$
+ ResultSet rs = dbmd.getColumns(null, "Foo%", "%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetColumns4() throws Exception {
+ initResultSetStreams("testGetColumns4"); //$NON-NLS-1$
+
+ stream.println("getColumns4"); //$NON-NLS-1$
+ ResultSet rs = dbmd.getColumns("foo", "Foo%", "%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+
+ @Test
+ public void testGetColumnPrivileges() throws Exception {
+ initResultSetStreams("testGetColumnPrivileges"); //$NON-NLS-1$
+
+ ResultSet rs = dbmd.getColumnPrivileges(null, "Parts", "%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+
+ rs = dbmd.getColumnPrivileges(null, "%foo", null, null); //$NON-NLS-1$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getColumnPrivileges("foo", "%foo", null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetColumnPrivilegesResultSetMetaData() throws Exception {
+ initResultSetStreams("testGetColumnPrivilegesResultSetMetaData"); //$NON-NLS-1$
+
+ ResultSet rs = dbmd.getColumnPrivileges(null, "Parts", "%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetTablePrivileges() throws Exception {
+ initResultSetStreams("testGetTablePrivileges"); //$NON-NLS-1$
+
+ ResultSet rs = dbmd.getTablePrivileges(null, "Parts", "%"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+
+
+ @Test
+ public void testGetTablePrivilegesResultSetMetaData() throws Exception {
+ initResultSetStreams("testGetTablePrivilegesResultSetMetaData"); //$NON-NLS-1$
+
+ ResultSet rs = dbmd.getTablePrivileges(null, "Parts", "%"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetTables_specificTable() throws Exception {
+ initResultSetStreams("testGetTables_specificTable"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+ //List expected = getExpectedColumns();
+
+ rs = dbmd.getTables(null, "SYSTEM", "VIRTUALDATABASES", null); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ } finally {
+ if (rs != null) {
+ rs.close();
+ }
+ closeResultSetTestStreams();
+ }
+ }
+
+ @Test
+ public void testGetTables_specificTableTypes() throws Exception {
+ initResultSetStreams("testGetTables_specificTableTypes"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+
+
+ String[] tables = new String[] { "Table" }; //$NON-NLS-1$
+
+ rs = dbmd.getTables(null, null, null, tables);
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ } finally {
+ if (rs != null) {
+ rs.close();
+ }
+ closeResultSetTestStreams();
+ }
+ }
+
+ @Test
+ public void testGetTables_specificTableMultipleTypes() throws Exception {
+ initResultSetStreams("testGetTables_specificTableMultipleTypes"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+
+
+ String[] tables = new String[] { "Table", "View" }; //$NON-NLS-1$ //$NON-NLS-2$
+
+ rs = dbmd.getTables(null, null, null, tables);
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ } finally {
+ if (rs != null) {
+ rs.close();
+ }
+ closeResultSetTestStreams();
+ }
+ }
+
+ @Test
+ public void testGetTables() throws Exception{
+ initResultSetStreams("testGetTables"); //$NON-NLS-1$
+
+ ResultSet rs = dbmd.getTables(null, null, null, null);
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getTables(null, "%foo", null, null); //$NON-NLS-1$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getTables("foo", "%foo", null, null); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetTables_allTables() throws Exception {
+ initResultSetStreams("testGetTables_allTables"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+
+ rs = dbmd.getTables(null, null, null, null);
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ } finally {
+ if (rs != null) {
+ rs.close();
+ }
+ closeResultSetTestStreams();
+ }
+ }
+
+ @Test
+ public void testGetTableTypes() throws Exception {
+ initResultSetStreams("testGetTableTypes"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+
+ rs = dbmd.getTableTypes();
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ } finally {
+ if (rs != null) {
+ rs.close();
+ }
+ closeResultSetTestStreams();
+ }
+ }
+
+ @Test
+ public void testGetTypeInfo_TotalNumber() throws Exception {
+ initResultSetStreams("testGetTypeInfo_TotalNumber"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+
+ rs = dbmd.getTypeInfo();
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ closeResultSetTestStreams();
+ }
+ }
+
+ @Test
+ public void testGetUDTs() throws Exception{
+ initResultSetStreams("testGetUDTs"); //$NON-NLS-1$
+
+ ResultSet rs = dbmd.getUDTs(null, null, "%blob%", null); //$NON-NLS-1$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getUDTs(null, "%foo", "%blob%", null); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getUDTs("foo", "%foo", "%blob%", null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetUDTs_specificTypeName() throws Exception {
+ initResultSetStreams("testGetUDTs_specificTypeName"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+
+ rs = dbmd.getUDTs(null, null, "%blob%", null); //$NON-NLS-1$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ closeResultSetTestStreams();
+ }
+ }
+
+ @Test
+ public void testGetVersionColumns() throws Exception {
+ initResultSetStreams("testGetVersionColumns"); //$NON-NLS-1$
+
+ ResultSet rs = dbmd.getVersionColumns(null, null, null);
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs = dbmd.getVersionColumns(null, "Foo%", null); //$NON-NLS-1$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getVersionColumns("foo", "Foo%", null); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetBestRowIdentifier() throws Exception {
+ initResultSetStreams("testGetBestRowIdentifier"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+
+ rs = dbmd.getBestRowIdentifier(null, null, "SYSTEM.VIRTUALDATABASES", //$NON-NLS-1$
+ DatabaseMetaData.bestRowTemporary, true);
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ rs = dbmd.getBestRowIdentifier(null, "%foo", null, 1,true); //$NON-NLS-1$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getBestRowIdentifier("foo", "%foo", null, 1,true); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetSuperTables() throws Exception {
+ initResultSetStreams("testSuperTables"); //$NON-NLS-1$
+
+ ResultSet rs = dbmd.getSuperTables(null, "Parts", "%"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetSuperTypes() throws Exception {
+ initResultSetStreams("testGetSuperTypes"); //$NON-NLS-1$
+
+ ResultSet rs = dbmd.getSuperTypes(null, "Parts", "%"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetColumnsWithEscape() throws Exception {
+ ResultSet columns = dbmd.getColumns("QT\\_Ora9DS", "BQT1", "SmallA", "IntKey"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ columns.next();
+ assertEquals("BQT1", columns.getString(2));//$NON-NLS-1$
+ assertFalse(columns.next());
+ }
+
+ @Test
+ public void testGetCrossReferenceWithEscape() throws Exception {
+ initResultSetStreams("testGetCrossReference"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+
+ stream.println("getCrossReference1"); //$NON-NLS-1$
+ rs = dbmd.getCrossReference(null, "QT\\_Ora9DS", "BQT1.SmallA", null, null, "BQT1.SmallB");//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ // Check for empty
+ stream.println("getCrossReference2"); //$NON-NLS-1$
+ rs = dbmd.getCrossReference(null, "Foo%", "%", null, null, "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ // Check for empty
+ stream.println("getCrossReference3"); //$NON-NLS-1$
+ rs = dbmd.getCrossReference("foo", "Foo%", "%", null, null, "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetExportedKeysWithEscape() throws Exception {
+ initResultSetStreams("testGetExportedKeys"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+
+ rs = dbmd.getExportedKeys(null, "QT\\_Ora9DS", "BQT1.SmallA"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ rs = dbmd.getExportedKeys(null, "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getExportedKeys("foo", "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetImportedKeysWithEscape() throws Exception {
+ initResultSetStreams("testGetImportedKeys"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+
+ stream.println("getImportedKeys1"); //$NON-NLS-1$
+ rs = dbmd.getImportedKeys(null, "QT\\_Ora9DS", "BQT1.SmallA"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ stream.println("getImportedKeys2"); //$NON-NLS-1$
+ rs = dbmd.getImportedKeys(null, "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ stream.println("getImportedKeys3"); //$NON-NLS-1$
+ rs = dbmd.getImportedKeys("foo", "Foo%", "%"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetIndexInfoWithEscape() throws Exception {
+ initResultSetStreams("testGetIndexInfo"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+
+ //ResultSet rs = dbmd.getIndexInfo(null, null, "BQT1.SmallA", true, true); //$NON-NLS-1$
+ rs = dbmd.getIndexInfo(null, "QT\\_Ora9DS", "System.KeyElements", true, true); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ rs = dbmd.getIndexInfo(null, "Foo%", "%", true, false); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getIndexInfo("foo", "Foo%", "%", true, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetPrimaryKeysWithEscape() throws Exception {
+ initResultSetStreams("testGetPrimaryKeys"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+
+ //ResultSet rs = dbmd.getPrimaryKeys(null, null, "SYSTEM.VIRTUALDATABASES"); //$NON-NLS-1$
+
+ // This is only a way to do unit test. Actually, the primary key of BQT.smallA
+ // should be tested here, the only tables should be queried are just system
+ // tables.
+ rs = dbmd.getPrimaryKeys("QT\\_Ora9DS", "BQT1", "SmallA"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ // Check for empty
+ rs = dbmd.getPrimaryKeys(null, "Foo%", "BQT1.SmallA"); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getPrimaryKeys("foo", "Foo%", "BQT1.SmallA"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+
+ @Test
+ public void testGetProceduresWithEscape() throws Exception {
+ initResultSetStreams("testGetProcedures"); //$NON-NLS-1$
+ ResultSet rs = null;
+ try {
+
+ rs = dbmd.getProcedures("QT\\_Ora9DS", null, null); //$NON-NLS-1$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ } finally {
+ if(rs != null) {
+ rs.close();
+ }
+ }
+
+ rs = dbmd.getProcedures(null, "Foo%", null); //$NON-NLS-1$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ rs.close();
+
+ rs = dbmd.getProcedures("foo", "Foo%", null); //$NON-NLS-1$ //$NON-NLS-2$
+ ResultSetUtil.printResultSet(rs, MAX_COL_WIDTH, true, stream);
+ assertEquals("Actual data did not match expected", //$NON-NLS-1$
+ Collections.EMPTY_LIST,
+ ResultSetUtil.getUnequalLines(stream));
+ rs.close();
+ closeResultSetTestStreams();
+ }
+ ///////////////////////////Helper Method//////////////////////////////
+
+ private void helpTestSupportsConverts(int from, int to, boolean result) throws Exception {
+ assertEquals("Expected doesn't match with actual for method - supportsConvert()", //$NON-NLS-1$
+ result, dbmd.supportsConvert(from, to));
+ }
+
+ private void helpTestMethodsWithParams(String methodName, boolean returned, Object[] params) throws Exception {
+ Class dbmdClass = dbmd.getClass();
+ Method[] methods = dbmdClass.getDeclaredMethods();
+
+ for (int i = 0; i < methods.length; i++) {
+ if (methods[i].getName().equalsIgnoreCase(methodName)) {
+ Object actual = methods[i].invoke(dbmd, params);
+ assertEquals("Expected doesn't match with actual for method - " + methodName, //$NON-NLS-1$
+ new Boolean(returned), actual);
+ }
+ }
+ }
+
+ //////////////////////Expected Result//////////////////
+
+ private Map getExpected() {
+ Map<String, Object> expected = new HashMap<String, Object>();
+ // return type -- boolean
+ expected.put("allProceduresAreCallable", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("allTablesAreSelectable", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("doesMaxRowSizeIncludeBlobs", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("isCatalogAtStart", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("isReadOnly", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("locatorsUpdateCopy", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("nullPlusNonNullIsNull", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("nullsAreSortedAtEnd", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("nullsAreSortedAtStart", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("nullsAreSortedHigh", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("nullsAreSortedLow", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("storesLowerCaseIdentifiers", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("storesLowerCaseQuotedIdentifiers", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("storesMixedCaseIdentifiers", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("storesMixedCaseQuotedIdentifiers", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("storesUpperCaseIdentifiers", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("storesUpperCaseQuotedIdentifiers", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsAlterTableWithAddColumn", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsAlterTableWithDropColumn", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsANSI92EntryLevelSQL", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsANSI92FullSQL", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsANSI92IntermediateSQL", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsBatchUpdates", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsCatalogsInDataManipulation", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsCatalogsInIndexDefinitions", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsCatalogsInPrivilegeDefinitions", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsCatalogsInProcedureCalls", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsCatalogsInTableDefinitions", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsColumnAliasing", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsCorrelatedSubqueries", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsCoreSQLGrammar", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsDataDefinitionAndDataManipulationTransactions", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsDataManipulationTransactionsOnly", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsDifferentTableCorrelationNames", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsExpressionsInOrderBy", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsExtendedSQLGrammar", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsFullOuterJoins", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsGetGeneratedKeys", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsGroupBy", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsGroupByBeyondSelect", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsGroupByUnrelated", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsIntegrityEnhancementFacility", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsLikeEscapeClause", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsLimitedOuterJoins", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsMinimumSQLGrammar", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsMixedCaseIdentifiers", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsMixedCaseQuotedIdentifiers", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsOpenCursorsAcrossCommit", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsMultipleResultSets", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsMultipleOpenResults", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsMultipleTransactions", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsNamedParameters", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsNonNullableColumns", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsOpenCursorsAcrossRollback", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsOpenStatementsAcrossCommit", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsOpenStatementsAcrossRollback", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsOrderByUnrelated", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsOuterJoins", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsPositionedDelete", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsPositionedUpdate", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsSavepoints", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsSchemasInDataManipulation", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsSchemasInIndexDefinitions", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsSchemasInPrivilegeDefinitions", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsSchemasInProcedureCalls", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsSchemasInTableDefinitions", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsSelectForUpdate", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsStatementPooling", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("supportsStoredProcedures", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsSubqueriesInComparisons", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsSubqueriesInExists", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsSubqueriesInIns", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsSubqueriesInQuantifieds", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsTableCorrelationNames", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsTransactions", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsUnion", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("supportsUnionAll", Boolean.TRUE); //$NON-NLS-1$
+ expected.put("usesLocalFilePerTable", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("usesLocalFiles", Boolean.FALSE); //$NON-NLS-1$
+ expected.put("usesLocalFilePerTable", Boolean.FALSE); //$NON-NLS-1$
+
+ // return type -- int
+ expected.put("getDatabaseMinorVersion", new Integer(ApplicationInfo.getInstance().getMinorReleaseVersion())); //$NON-NLS-1$
+ expected.put("getDatabaseMajorVersion", new Integer(ApplicationInfo.getInstance().getMajorReleaseVersion())); //$NON-NLS-1$
+ expected.put("getJDBCMajorVersion", new Integer(3)); //$NON-NLS-1$
+ expected.put("getJDBCMinorVersion", new Integer(0)); //$NON-NLS-1$
+ expected.put("getDefaultTransactionIsolation", new Integer(Connection.TRANSACTION_NONE)); //$NON-NLS-1$
+ expected.put("getDriverMajorVersion", new Integer(ApplicationInfo.getInstance().getMajorReleaseVersion())); //$NON-NLS-1$
+ expected.put("getDriverMinorVersion", new Integer(ApplicationInfo.getInstance().getMinorReleaseVersion())); //$NON-NLS-1$
+ expected.put("getMaxBinaryLiteralLength", new Integer(NO_LIMIT)); //$NON-NLS-1$
+ expected.put("getMaxCatalogNameLength", new Integer(NO_LIMIT)); //$NON-NLS-1$
+ expected.put("getMaxCharLiteralLength", new Integer(NO_LIMIT)); //$NON-NLS-1$
+ expected.put("getMaxColumnNameLength", new Integer(255)); //$NON-NLS-1$
+ expected.put("getMaxColumnsInGroupBy", new Integer(NO_LIMIT)); //$NON-NLS-1$
+ expected.put("getMaxColumnsInIndex", new Integer(NO_LIMIT)); //$NON-NLS-1$
+ expected.put("getMaxColumnsInOrderBy", new Integer(NO_LIMIT)); //$NON-NLS-1$
+ expected.put("getMaxColumnsInSelect", new Integer(NO_LIMIT)); //$NON-NLS-1$
+ expected.put("getMaxColumnsInTable", new Integer(NO_LIMIT)); //$NON-NLS-1$
+ expected.put("getMaxConnections", new Integer(NO_LIMIT)); //$NON-NLS-1$
+ expected.put("getMaxCursorNameLength", new Integer(NO_LIMIT)); //$NON-NLS-1$
+ expected.put("getMaxIndexLength", new Integer(NO_LIMIT)); //$NON-NLS-1$
+ expected.put("getMaxProcedureNameLength", new Integer(255)); //$NON-NLS-1$
+ expected.put("getMaxRowSize", new Integer(NO_LIMIT)); //$NON-NLS-1$
+ expected.put("getMaxSchemaNameLength", new Integer(NO_LIMIT)); //$NON-NLS-1$
+ expected.put("getMaxStatementLength", new Integer(NO_LIMIT)); //$NON-NLS-1$
+ expected.put("getMaxStatements", new Integer(NO_LIMIT)); //$NON-NLS-1$
+ expected.put("getMaxTableNameLength", new Integer(255)); //$NON-NLS-1$
+ expected.put("getMaxTablesInSelect", new Integer(NO_LIMIT)); //$NON-NLS-1$
+ expected.put("getMaxUserNameLength", new Integer(255)); //$NON-NLS-1$
+ //TODO: change expected value;
+ expected.put("getSQLStateType", new Integer(2)); //$NON-NLS-1$
+
+ // return type -- String
+ expected.put("getCatalogSeparator", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ expected.put("getCatalogTerm", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ expected.put("getDatabaseProductName", "MetaMatrix Query"); //$NON-NLS-1$ //$NON-NLS-2$
+ expected.put("getDatabaseProductVersion", "5.5"); //$NON-NLS-1$ //$NON-NLS-2$
+ expected.put("getDriverName", "MetaMatrix Query JDBC Driver"); //$NON-NLS-1$ //$NON-NLS-2$
+ expected.put("getDriverVersion", ApplicationInfo.getInstance().getMajorReleaseVersion()+"."+ApplicationInfo.getInstance().getMinorReleaseVersion()); //$NON-NLS-1$ //$NON-NLS-2$
+ expected.put("getExtraNameCharacters", ".@"); //$NON-NLS-1$ //$NON-NLS-2$
+ expected.put("getIdentifierQuoteString", "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ expected.put("getNumericFunctions", MMDatabaseMetaData.NUMERIC_FUNCTIONS); //$NON-NLS-1$
+ expected.put("getProcedureTerm", "StoredProcedure"); //$NON-NLS-1$ //$NON-NLS-2$
+ expected.put("getSchemaTerm", "VirtualDatabase"); //$NON-NLS-1$ //$NON-NLS-2$
+ expected.put("getSearchStringEscape", "\\"); //$NON-NLS-1$ //$NON-NLS-2$
+ expected.put("getSQLKeywords", KEY_WORDS); //$NON-NLS-1$
+ expected.put("getStringFunctions", MMDatabaseMetaData.STRING_FUNCTIONS); //$NON-NLS-1$
+ expected.put("getSystemFunctions", MMDatabaseMetaData.SYSTEM_FUNCTIONS); //$NON-NLS-1$
+ expected.put("getTimeDateFunctions", MMDatabaseMetaData.DATE_FUNCTIONS); //$NON-NLS-1$
+ //expected.put("getUrl", primaryUrl + serverUrl); //$NON-NLS-1$
+ expected.put("getUserName", null); //$NON-NLS-1$
+
+ // return type - Object
+ expected.put("getConnection", conn); //$NON-NLS-1$
+
+ return expected;
+ }
+
+}
Copied: trunk/test-integration/db/src/test/java/org/teiid/connector/metadata/TestMetadataInConnector.java (from rev 1930, trunk/test-integration/common/src/test/java/org/teiid/connector/metadata/runtime/TestMetadataInConnector.java)
===================================================================
--- trunk/test-integration/db/src/test/java/org/teiid/connector/metadata/TestMetadataInConnector.java (rev 0)
+++ trunk/test-integration/db/src/test/java/org/teiid/connector/metadata/TestMetadataInConnector.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,30 @@
+package org.teiid.connector.metadata;
+
+import org.junit.Test;
+
+import com.metamatrix.core.util.UnitTestUtil;
+import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
+
+public class TestMetadataInConnector extends AbstractMMQueryTestCase {
+
+ private static final String DQP_PROP_FILE = UnitTestUtil.getTestDataPath() + "/metadata/dqp.properties;user=test"; //$NON-NLS-1$
+ private static final String VDB = "TestExtensions"; //$NON-NLS-1$
+
+
+ @Test public void testMetadataTable() throws Exception {
+ getConnection(VDB, DQP_PROP_FILE, ""); //$NON-NLS-1$
+ execute("Select * from TableA"); //$NON-NLS-1$
+ String expected[] = {"column1[string] column2[integer]"}; //$NON-NLS-1$
+ assertResults(expected);
+ closeConnection();
+ }
+
+ @Test public void testMetadataProcedure() throws Exception {
+ getConnection(VDB, DQP_PROP_FILE, ""); //$NON-NLS-1$
+ execute("exec AnyModel.ProcedureB(?)", new Object[] {"foo"}); //$NON-NLS-1$ //$NON-NLS-2$
+ String expected[] = {"column1[string] column2[integer]"}; //$NON-NLS-1$
+ assertResults(expected);
+ closeConnection();
+ }
+
+}
Property changes on: trunk/test-integration/db/src/test/java/org/teiid/connector/metadata/TestMetadataInConnector.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/test-integration/db/src/test/java/org/teiid/dynamicvdb/TestVDBLessExecution.java (from rev 1930, trunk/test-integration/common/src/test/java/com/metamatrix/server/integration/TestVDBLessExecution.java)
===================================================================
--- trunk/test-integration/db/src/test/java/org/teiid/dynamicvdb/TestVDBLessExecution.java (rev 0)
+++ trunk/test-integration/db/src/test/java/org/teiid/dynamicvdb/TestVDBLessExecution.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,275 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.dynamicvdb;
+
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+
+import org.junit.Test;
+
+import com.metamatrix.core.util.UnitTestUtil;
+import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
+
+/**
+ * Test the DatabaseMetadata results using the Parts VDB.
+ */
+public class TestVDBLessExecution extends AbstractMMQueryTestCase {
+
+ private static final String DQP_PROP_FILE = UnitTestUtil.getTestDataPath() + "/vdbless/dqp.properties;user=test"; //$NON-NLS-1$
+ private static final String VDB = "VDBLess"; //$NON-NLS-1$
+
+ @Test public void testExecution() {
+ getConnection(VDB, DQP_PROP_FILE);
+ executeAndAssertResults("select * from Example", new String[] { //$NON-NLS-1$
+ "TRADEID[string] NOTIONAL[integer]", //$NON-NLS-1$
+ "x 1", //$NON-NLS-1$
+ "y 2" //$NON-NLS-1$
+
+ });
+ closeConnection();
+ }
+
+ @Test public void testIntegrationExecution() {
+ getConnection(VDB, DQP_PROP_FILE);
+ executeAndAssertResults("select * from Example, Smalla where notional = intkey", new String[] { //$NON-NLS-1$
+ "TRADEID[string] NOTIONAL[integer] INTKEY[integer] STRINGKEY[string] INTNUM[integer] STRINGNUM[string] FLOATNUM[float] LONGNUM[long] DOUBLENUM[double] BYTENUM[short] DATEVALUE[date] TIMEVALUE[time] TIMESTAMPVALUE[timestamp] BOOLEANVALUE[short] CHARVALUE[string] SHORTVALUE[short] BIGINTEGERVALUE[long] BIGDECIMALVALUE[bigdecimal] OBJECTVALUE[string]", //$NON-NLS-1$
+ "x 1 1 1 -23 null -23.0 -23 -23.0 -127 2000-01-02 01:00:00 2000-01-01 00:00:01.0 1 0 -32767 -23 -23 -23", //$NON-NLS-1$
+ "y 2 2 2 -22 -22 null -22 -22.0 -126 2000-01-03 02:00:00 2000-01-01 00:00:02.0 0 1 -32766 -22 -22 -22", //$NON-NLS-1$
+ });
+ closeConnection();
+ }
+
+ /**
+ * We have no results to assert here since derby does not provide procedure resultset columns in their metadata.
+ */
+ @Test public void testProcedureExecution() {
+ getConnection(VDB, DQP_PROP_FILE);
+ execute("exec Derby.SQLUDTS(null, null, null, null, null)"); //$NON-NLS-1$
+ closeConnection();
+ }
+
+ @Test public void testDatabaseMetaDataTables() throws Exception {
+ Connection conn = getConnection(VDB, DQP_PROP_FILE);
+ DatabaseMetaData metadata = conn.getMetaData();
+ this.internalResultSet = metadata.getTables(null, "SummitData", null, new String[] {"TABLE"}); //$NON-NLS-1$ //$NON-NLS-2$
+ assertResults(new String[] {
+ "TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] TABLE_TYPE[string] REMARKS[string] TYPE_CAT[string] TYPE_SCHEM[string] TYPE_NAME[string] SELF_REFERENCING_COL_NAME[string] REF_GENERATION[string] ISPHYSICAL[boolean]", //$NON-NLS-1$
+ "VDBLess SummitData EXAMPLE TABLE null null null null null null true" //$NON-NLS-1$
+ });
+ closeConnection();
+ }
+
+ /**
+ * Ensures that system tables are still visible
+ */
+ @Test public void testDatabaseMetaDataTables1() throws Exception {
+ Connection conn = getConnection(VDB, DQP_PROP_FILE);
+ DatabaseMetaData metadata = conn.getMetaData();
+ this.internalResultSet = metadata.getTables(null, null, "%Properties", null); //$NON-NLS-1$
+ assertResults(new String[] {
+ "TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] TABLE_TYPE[string] REMARKS[string] TYPE_CAT[string] TYPE_SCHEM[string] TYPE_NAME[string] SELF_REFERENCING_COL_NAME[string] REF_GENERATION[string] ISPHYSICAL[boolean]", //$NON-NLS-1$
+ "VDBLess System Properties SYSTEM TABLE null null null null null null true" //$NON-NLS-1$
+
+ });
+ closeConnection();
+ }
+
+ @Test public void testDatabaseMetaDataColumns() throws Exception {
+ Connection conn = getConnection(VDB, DQP_PROP_FILE);
+ DatabaseMetaData metadata = conn.getMetaData();
+ this.internalResultSet = metadata.getColumns(null, "SummitData", null, "%"); //$NON-NLS-1$ //$NON-NLS-2$
+ assertResults(new String[] {
+ "TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] COLUMN_NAME[string] DATA_TYPE[short] TYPE_NAME[string] COLUMN_SIZE[integer] BUFFER_LENGTH[string] DECIMAL_DIGITS[integer] NUM_PREC_RADIX[integer] NULLABLE[integer] REMARKS[string] COLUMN_DEF[string] SQL_DATA_TYPE[string] SQL_DATETIME_SUB[string] CHAR_OCTET_LENGTH[integer] ORDINAL_POSITION[integer] IS_NULLABLE[string] SCOPE_CATALOG[string] SCOPE_SCHEMA[string] SCOPE_TABLE[string] SOURCE_DATA_TYPE[string] IS_AUTOINCREMENT[string]", //$NON-NLS-1$
+ "VDBLess SummitData EXAMPLE TRADEID 12 string 4000 null 0 0 2 null null null null 0 1 null null null null NO", //$NON-NLS-1$
+ "VDBLess SummitData EXAMPLE NOTIONAL 4 integer 10 null 0 0 2 null null null null 0 2 null null null null NO", //$NON-NLS-1$
+ });
+ closeConnection();
+ }
+
+ @Test public void testDatabaseMetaDataColumns1() throws Exception {
+ Connection conn = getConnection(VDB, DQP_PROP_FILE);
+ DatabaseMetaData metadata = conn.getMetaData();
+ this.internalResultSet = metadata.getColumns(null, null, "%smalla", "%"); //$NON-NLS-1$ //$NON-NLS-2$
+ assertResults(new String[] {
+ "TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] COLUMN_NAME[string] DATA_TYPE[short] TYPE_NAME[string] COLUMN_SIZE[integer] BUFFER_LENGTH[string] DECIMAL_DIGITS[integer] NUM_PREC_RADIX[integer] NULLABLE[integer] REMARKS[string] COLUMN_DEF[string] SQL_DATA_TYPE[string] SQL_DATETIME_SUB[string] CHAR_OCTET_LENGTH[integer] ORDINAL_POSITION[integer] IS_NULLABLE[string] SCOPE_CATALOG[string] SCOPE_SCHEMA[string] SCOPE_TABLE[string] SOURCE_DATA_TYPE[string] IS_AUTOINCREMENT[string]", //$NON-NLS-1$
+ "VDBLess Derby SMALLA INTKEY 4 integer 10 null 0 10 0 null null null 0 1 YES null null null null NO", //$NON-NLS-1$
+ "VDBLess Derby SMALLA STRINGKEY 12 string 4000 null 0 0 0 null null null 20 2 YES null null null null NO", //$NON-NLS-1$
+ "VDBLess Derby SMALLA INTNUM 4 integer 10 null 0 10 1 null null null 0 3 NO null null null null NO", //$NON-NLS-1$
+ "VDBLess Derby SMALLA STRINGNUM 12 string 4000 null 0 0 1 null null null 20 4 NO null null null null NO", //$NON-NLS-1$
+ "VDBLess Derby SMALLA FLOATNUM 7 float 20 null 0 2 1 null null null 0 5 NO null null null null NO", //$NON-NLS-1$
+ "VDBLess Derby SMALLA LONGNUM -5 long 19 null 0 10 1 null null null 0 6 NO null null null null NO", //$NON-NLS-1$
+ "VDBLess Derby SMALLA DOUBLENUM 8 double 20 null 0 2 1 null null null 0 7 NO null null null null NO", //$NON-NLS-1$
+ "VDBLess Derby SMALLA BYTENUM 5 short 5 null 0 10 1 null null null 0 8 NO null null null null NO", //$NON-NLS-1$
+ "VDBLess Derby SMALLA DATEVALUE 91 date 10 null 0 10 1 null null null 0 9 NO null null null null NO", //$NON-NLS-1$
+ "VDBLess Derby SMALLA TIMEVALUE 92 time 8 null 0 10 1 null null null 0 10 NO null null null null NO", //$NON-NLS-1$
+ "VDBLess Derby SMALLA TIMESTAMPVALUE 93 timestamp 29 null 0 10 1 null null null 0 11 NO null null null null NO", //$NON-NLS-1$
+ "VDBLess Derby SMALLA BOOLEANVALUE 5 short 5 null 0 10 1 null null null 0 12 NO null null null null NO", //$NON-NLS-1$
+ "VDBLess Derby SMALLA CHARVALUE 12 string 4000 null 0 0 1 null null null 2 13 NO null null null null NO", //$NON-NLS-1$
+ "VDBLess Derby SMALLA SHORTVALUE 5 short 5 null 0 10 1 null null null 0 14 NO null null null null NO", //$NON-NLS-1$
+ "VDBLess Derby SMALLA BIGINTEGERVALUE -5 long 19 null 0 10 1 null null null 0 15 NO null null null null NO", //$NON-NLS-1$
+ "VDBLess Derby SMALLA BIGDECIMALVALUE 2 bigdecimal 20 null 0 10 1 null null null 0 16 NO null null null null NO", //$NON-NLS-1$
+ "VDBLess Derby SMALLA OBJECTVALUE 12 string 4000 null 0 0 1 null null null 4096 17 NO null null null null NO", //$NON-NLS-1$
+ });
+ closeConnection();
+ }
+
+ @Test public void testDatabaseMetaDataPrimaryKeys() throws Exception {
+ Connection conn = getConnection(VDB, DQP_PROP_FILE);
+ DatabaseMetaData metadata = conn.getMetaData();
+ //note - the use of null for the table name is a little against spec
+ this.internalResultSet = metadata.getPrimaryKeys(null, null, null);
+ assertResults(new String[] {
+ "TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] COLUMN_NAME[string] KEY_SEQ[short] PK_NAME[string]", //$NON-NLS-1$
+ "VDBLess Derby FLIGHTS FLIGHT_ID 1 SQL090709161814150", //$NON-NLS-1$
+ "VDBLess Derby FLTAVAIL FLIGHT_ID 1 FLTAVAIL_PK", //$NON-NLS-1$
+ "VDBLess Derby SMALLA INTKEY 1 SQL060110103634070", //$NON-NLS-1$
+ "VDBLess Derby SMALLB INTKEY 1 SQL060110103635170", //$NON-NLS-1$
+ "VDBLess Derby FLIGHTS SEGMENT_NUMBER 2 SQL090709161814150", //$NON-NLS-1$
+ "VDBLess Derby FLTAVAIL SEGMENT_NUMBER 2 FLTAVAIL_PK", //$NON-NLS-1$
+ });
+ closeConnection();
+ }
+
+ @Test public void testDatabaseMetaDataExportedKeys() throws Exception {
+ Connection conn = getConnection(VDB, DQP_PROP_FILE);
+ DatabaseMetaData metadata = conn.getMetaData();
+ this.internalResultSet = metadata.getExportedKeys("VDBLess", "Derby", "FLIGHTS"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ assertResults(new String[] {
+ "PKTABLE_CAT[string] PKTABLE_SCHEM[string] PKTABLE_NAME[string] PKCOLUMN_NAME[string] FKTABLE_CAT[string] FKTABLE_SCHEM[string] FKTABLE_NAME[string] FKCOLUMN_NAME[string] KEY_SEQ[short] UPDATE_RULE[integer] DELETE_RULE[integer] FK_NAME[string] PK_NAME[string] DEFERRABILITY[integer]", //$NON-NLS-1$
+ "VDBLess Derby FLIGHTS FLIGHT_ID VDBLess Derby FLTAVAIL FLIGHT_ID 1 3 3 FLTS_FK SQL090709161814150 5", //$NON-NLS-1$
+ "VDBLess Derby FLIGHTS SEGMENT_NUMBER VDBLess Derby FLTAVAIL SEGMENT_NUMBER 2 3 3 FLTS_FK SQL090709161814150 5" //$NON-NLS-1$
+ });
+ closeConnection();
+ }
+
+ @Test public void testDatabaseMetaDataImportedKeys() throws Exception {
+ Connection conn = getConnection(VDB, DQP_PROP_FILE);
+ DatabaseMetaData metadata = conn.getMetaData();
+ this.internalResultSet = metadata.getImportedKeys("VDBLess", "Derby", "FLTAVAIL"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ assertResults(new String[] {
+ "PKTABLE_CAT[string] PKTABLE_SCHEM[string] PKTABLE_NAME[string] PKCOLUMN_NAME[string] FKTABLE_CAT[string] FKTABLE_SCHEM[string] FKTABLE_NAME[string] FKCOLUMN_NAME[string] KEY_SEQ[short] UPDATE_RULE[integer] DELETE_RULE[integer] FK_NAME[string] PK_NAME[string] DEFERRABILITY[integer]", //$NON-NLS-1$
+ "VDBLess Derby FLIGHTS FLIGHT_ID VDBLess Derby FLTAVAIL FLIGHT_ID 1 3 3 FLTS_FK SQL090709161814150 5", //$NON-NLS-1$
+ "VDBLess Derby FLIGHTS SEGMENT_NUMBER VDBLess Derby FLTAVAIL SEGMENT_NUMBER 2 3 3 FLTS_FK SQL090709161814150 5" //$NON-NLS-1$
+ });
+ this.internalResultSet = metadata.getImportedKeys(null, "Derby", "SMALLBRIDGE"); //$NON-NLS-1$ //$NON-NLS-2$
+ assertResults(new String[] {
+ "PKTABLE_CAT[string] PKTABLE_SCHEM[string] PKTABLE_NAME[string] PKCOLUMN_NAME[string] FKTABLE_CAT[string] FKTABLE_SCHEM[string] FKTABLE_NAME[string] FKCOLUMN_NAME[string] KEY_SEQ[short] UPDATE_RULE[integer] DELETE_RULE[integer] FK_NAME[string] PK_NAME[string] DEFERRABILITY[integer]", //$NON-NLS-1$
+ "VDBLess Derby SMALLA INTKEY VDBLess Derby SMALLBRIDGE AKEY 1 3 3 SMLA_FK SQL060110103634070 5", //$NON-NLS-1$
+ "VDBLess Derby SMALLB INTKEY VDBLess Derby SMALLBRIDGE BKEY 1 3 3 SMLB_FK SQL060110103635170 5", //$NON-NLS-1$
+ });
+ closeConnection();
+ }
+
+ @Test public void testDatabaseMetaDataIndexInfo() throws Exception {
+ Connection conn = getConnection(VDB, DQP_PROP_FILE);
+ DatabaseMetaData metadata = conn.getMetaData();
+ //note - the use of null for the table name is a little against spec
+ this.internalResultSet = metadata.getIndexInfo(null, null, null, false, true);
+ assertResults(new String[] {
+ "TABLE_CAT[string] TABLE_SCHEM[string] TABLE_NAME[string] NON_UNIQUE[boolean] INDEX_QUALIFIER[string] INDEX_NAME[string] TYPE[integer] ORDINAL_POSITION[short] COLUMN_NAME[string] ASC_OR_DESC[string] CARDINALITY[integer] PAGES[integer] FILTER_CONDITION[string]", //$NON-NLS-1$
+ "VDBLess Derby FLIGHTS false null ORIGINDEX 0 1 ORIG_AIRPORT null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby FLTAVAIL false null SQL090709161840271 0 1 FLIGHT_ID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby FLTAVAIL false null SQL090709161840271 0 2 SEGMENT_NUMBER null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SMALLBRIDGE false null SQL090710102514590 0 1 AKEY null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SMALLBRIDGE false null SQL090710102514591 0 1 BKEY null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSCOLUMNS false null SYSCOLUMNS_INDEX2 0 1 COLUMNDEFAULTID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSCONGLOMERATES false null SYSCONGLOMERATES_INDEX1 0 1 CONGLOMERATEID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSCONGLOMERATES false null SYSCONGLOMERATES_INDEX3 0 1 TABLEID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSCONSTRAINTS false null SYSCONSTRAINTS_INDEX3 0 1 TABLEID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSDEPENDS false null SYSDEPENDS_INDEX1 0 1 DEPENDENTID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSDEPENDS false null SYSDEPENDS_INDEX2 0 1 PROVIDERID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSFOREIGNKEYS false null SYSFOREIGNKEYS_INDEX2 0 1 KEYCONSTRAINTID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSSTATISTICS false null SYSSTATISTICS_INDEX1 0 1 TABLEID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSSTATISTICS false null SYSSTATISTICS_INDEX1 0 2 REFERENCEID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSTRIGGERS false null SYSTRIGGERS_INDEX3 0 1 TABLEID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSTRIGGERS false null SYSTRIGGERS_INDEX3 0 2 CREATIONTIMESTAMP null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SMALLA true null SQL060110103634070 0 1 INTKEY null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SMALLB true null SQL060110103635170 0 1 INTKEY null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby FLIGHTS true null SQL090709161814150 0 1 FLIGHT_ID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby FLIGHTS true null SQL090709161814150 0 2 SEGMENT_NUMBER null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby FLTAVAIL true null SQL090709161840270 0 1 FLIGHT_ID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby FLTAVAIL true null SQL090709161840270 0 2 SEGMENT_NUMBER null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSALIASES true null SYSALIASES_INDEX1 0 1 SCHEMAID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSALIASES true null SYSALIASES_INDEX1 0 2 ALIAS null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSALIASES true null SYSALIASES_INDEX1 0 3 NAMESPACE null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSALIASES true null SYSALIASES_INDEX2 0 1 ALIASID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSALIASES true null SYSALIASES_INDEX3 0 1 SCHEMAID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSALIASES true null SYSALIASES_INDEX3 0 2 SPECIFICNAME null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSCHECKS true null SYSCHECKS_INDEX1 0 1 CONSTRAINTID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSCOLUMNS true null SYSCOLUMNS_INDEX1 0 1 REFERENCEID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSCOLUMNS true null SYSCOLUMNS_INDEX1 0 2 COLUMNNAME null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSCONGLOMERATES true null SYSCONGLOMERATES_INDEX2 0 1 CONGLOMERATENAME null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSCONGLOMERATES true null SYSCONGLOMERATES_INDEX2 0 2 SCHEMAID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSCONSTRAINTS true null SYSCONSTRAINTS_INDEX1 0 1 CONSTRAINTID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSCONSTRAINTS true null SYSCONSTRAINTS_INDEX2 0 1 CONSTRAINTNAME null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSCONSTRAINTS true null SYSCONSTRAINTS_INDEX2 0 2 SCHEMAID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSFILES true null SYSFILES_INDEX1 0 1 FILENAME null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSFILES true null SYSFILES_INDEX1 0 2 SCHEMAID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSFILES true null SYSFILES_INDEX2 0 1 FILEID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSFOREIGNKEYS true null SYSFOREIGNKEYS_INDEX1 0 1 CONSTRAINTID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSKEYS true null SYSKEYS_INDEX1 0 1 CONSTRAINTID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSSCHEMAS true null SYSSCHEMAS_INDEX1 0 1 SCHEMANAME null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSSCHEMAS true null SYSSCHEMAS_INDEX2 0 1 SCHEMAID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSSTATEMENTS true null SYSSTATEMENTS_INDEX1 0 1 STMTID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSSTATEMENTS true null SYSSTATEMENTS_INDEX2 0 1 STMTNAME null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSSTATEMENTS true null SYSSTATEMENTS_INDEX2 0 2 SCHEMAID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSTABLES true null SYSTABLES_INDEX1 0 1 TABLENAME null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSTABLES true null SYSTABLES_INDEX1 0 2 SCHEMAID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSTABLES true null SYSTABLES_INDEX2 0 1 TABLEID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSTRIGGERS true null SYSTRIGGERS_INDEX1 0 1 TRIGGERID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSTRIGGERS true null SYSTRIGGERS_INDEX2 0 1 TRIGGERNAME null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSTRIGGERS true null SYSTRIGGERS_INDEX2 0 2 SCHEMAID null 0 1 null", //$NON-NLS-1$
+ "VDBLess Derby SYSVIEWS true null SYSVIEWS_INDEX1 0 1 TABLEID null 0 1 null", //$NON-NLS-1$
+ });
+ closeConnection();
+ }
+
+ @Test public void testDatabaseMetaDataProcedures() throws Exception {
+ Connection conn = getConnection(VDB, DQP_PROP_FILE);
+ DatabaseMetaData metadata = conn.getMetaData();
+ this.internalResultSet = metadata.getProcedures(null, "Derby", "%JAR"); //$NON-NLS-1$ //$NON-NLS-2$
+ assertResults(new String[] {
+ "PROCEDURE_CAT[string] PROCEDURE_SCHEM[string] PROCEDURE_NAME[string] RESERVED_1[string] RESERVED_2[string] RESERVED_3[string] REMARKS[string] PROCEDURE_TYPE[short] SPECIFIC_NAME[string]", //$NON-NLS-1$
+ "VDBLess Derby INSTALL_JAR null null null null 1 INSTALL_JAR", //$NON-NLS-1$
+ "VDBLess Derby REMOVE_JAR null null null null 1 REMOVE_JAR", //$NON-NLS-1$
+ "VDBLess Derby REPLACE_JAR null null null null 1 REPLACE_JAR", //$NON-NLS-1$
+ });
+ closeConnection();
+ }
+
+ @Test public void testDatabaseMetaDataProcedureColumns() throws Exception {
+ Connection conn = getConnection(VDB, DQP_PROP_FILE);
+ DatabaseMetaData metadata = conn.getMetaData();
+ this.internalResultSet = metadata.getProcedureColumns(null, "Derby", "SQLUDTS", null); //$NON-NLS-1$ //$NON-NLS-2$
+ assertResults(new String[] {
+ "PROCEDURE_CAT[string] PROCEDURE_SCHEM[string] PROCEDURE_NAME[string] COLUMN_NAME[string] COLUMN_TYPE[short] DATA_TYPE[integer] TYPE_NAME[string] PRECISION[integer] LENGTH[integer] SCALE[short] RADIX[integer] NULLABLE[integer] REMARKS[string] COLUMN_DEF[string] SQL_DATA_TYPE[string] SQL_DATETIME_SUB[string] CHAR_OCTET_LENGTH[string] ORDINAL_POSITION[integer] IS_NULLABLE[string] SPECIFIC_NAME[string]", //$NON-NLS-1$
+ "VDBLess Derby SQLUDTS CATALOGNAME 1 12 string 128 256 0 0 1 null null null null null 1 YES SQLUDTS", //$NON-NLS-1$
+ "VDBLess Derby SQLUDTS SCHEMAPATTERN 1 12 string 128 256 0 0 1 null null null null null 2 YES SQLUDTS", //$NON-NLS-1$
+ "VDBLess Derby SQLUDTS TYPENAMEPATTERN 1 12 string 128 256 0 0 1 null null null null null 3 YES SQLUDTS", //$NON-NLS-1$
+ "VDBLess Derby SQLUDTS UDTTYPES 1 12 string 128 256 0 0 1 null null null null null 4 YES SQLUDTS", //$NON-NLS-1$
+ "VDBLess Derby SQLUDTS OPTIONS 1 12 string 4000 8000 0 0 1 null null null null null 5 YES SQLUDTS", //$NON-NLS-1$
+ });
+ closeConnection();
+ }
+
+}
Property changes on: trunk/test-integration/db/src/test/java/org/teiid/dynamicvdb/TestVDBLessExecution.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/test-integration/db/src/test/java/org/teiid/systemmodel/TestPartsDatabaseMetadata.java (from rev 1930, trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestPartsDatabaseMetadata.java)
===================================================================
--- trunk/test-integration/db/src/test/java/org/teiid/systemmodel/TestPartsDatabaseMetadata.java (rev 0)
+++ trunk/test-integration/db/src/test/java/org/teiid/systemmodel/TestPartsDatabaseMetadata.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,120 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.systemmodel;
+
+import java.io.File;
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.metamatrix.core.util.UnitTestUtil;
+import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
+
+/**
+ * Test the DatabaseMetadata results using the Parts VDB.
+ */
+public class TestPartsDatabaseMetadata extends AbstractMMQueryTestCase {
+
+ private static final String DQP_PROP_FILE = UnitTestUtil.getTestDataPath() + "/partssupplier/dqp.properties;user=test"; //$NON-NLS-1$
+ private static final String VDB = "PartsSupplier"; //$NON-NLS-1$
+
+ static DatabaseMetaData dbMetadata;
+ static Connection connection;
+
+ public TestPartsDatabaseMetadata() {
+ // this is needed because the result files are generated
+ // with another tool which uses tab as delimiter
+ super.DELIMITER = "\t"; //$NON-NLS-1$
+ }
+
+ @Before public void setUp() throws SQLException {
+ getConnection(VDB, DQP_PROP_FILE);
+ dbMetadata = this.internalConnection.getMetaData();
+ }
+
+ @After public void tearDown() {
+ closeConnection();
+ }
+
+ @Test public void testExportedKeys() throws Exception {
+ checkResult("testExportedKeys", dbMetadata.getExportedKeys(VDB, null, "%")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ private void checkResult(String string, ResultSet exportedKeys) throws Exception {
+ checkResult(string, exportedKeys, "partssupplier"); //$NON-NLS-1$
+ }
+
+ @Test public void testImportedKeys() throws Exception {
+ checkResult("testImportedKeys", dbMetadata.getImportedKeys(VDB, null, "%")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test public void testPrimaryKeys() throws Exception {
+ checkResult("testPrimaryKeys", dbMetadata.getPrimaryKeys(VDB, null, "%")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test public void testProcedures() throws Exception {
+ checkResult("testProcedures", dbMetadata.getProcedures(VDB, null, "%")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test public void testProcedureColumns() throws Exception {
+ checkResult("testProcedureColumns", dbMetadata.getProcedureColumns(VDB, null, "%", "%")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ @Test public void testUDTs() throws Exception {
+ checkResult("testUDTs", dbMetadata.getUDTs(VDB, null, "%", null)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test public void testIndexInfo() throws Exception {
+ checkResult("testIndexInfo", dbMetadata.getIndexInfo(VDB, null, "%", true, true)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test public void testCrossReference() throws Exception {
+ checkResult("testCrossReference", dbMetadata.getCrossReference(VDB, null, "%", VDB, null, "%")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ @Test public void testTypeInfo() throws Exception {
+ checkResult("testTypeInfo",dbMetadata.getTypeInfo()); //$NON-NLS-1$
+ }
+
+ @Test public void testCatalogs() throws Exception {
+ checkResult("testCatalogs", dbMetadata.getCatalogs()); //$NON-NLS-1$
+ }
+
+ @Test public void testSchemas() throws Exception {
+ checkResult("testSchemas", dbMetadata.getSchemas()); //$NON-NLS-1$
+ }
+
+ @Test public void testTables() throws Exception {
+ checkResult("testTables", dbMetadata.getTables(VDB, null, "%", null)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test public void testColumns() throws Exception {
+ checkResult("testColumns", dbMetadata.getColumns(VDB, null, "%", "%")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+}
Copied: trunk/test-integration/db/src/test/java/org/teiid/systemmodel/TestResultSetMetadata.java (from rev 1930, trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestResultSetMetadata.java)
===================================================================
--- trunk/test-integration/db/src/test/java/org/teiid/systemmodel/TestResultSetMetadata.java (rev 0)
+++ trunk/test-integration/db/src/test/java/org/teiid/systemmodel/TestResultSetMetadata.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,129 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.systemmodel;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.metamatrix.core.util.UnitTestUtil;
+import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
+
+public class TestResultSetMetadata extends AbstractMMQueryTestCase {
+
+ private static final String DQP_PROP_FILE = UnitTestUtil.getTestDataPath() + "/partssupplier/dqp.properties;user=test"; //$NON-NLS-1$
+ private static final String VDB = "PartsSupplier"; //$NON-NLS-1$
+
+ public TestResultSetMetadata() {
+ // this is needed because the result files are generated
+ // with another tool which uses tab as delimiter
+ super.DELIMITER = "\t"; //$NON-NLS-1$
+ }
+
+ @Before public void setUp() {
+ getConnection(VDB, DQP_PROP_FILE);
+ }
+
+ @After public void tearDown() {
+ closeConnection();
+ }
+
+ private void executeTest(String sql, String[] expected) throws Exception {
+ execute(sql);
+ java.sql.ResultSet rs = this.internalResultSet;
+ assertResultsSetMetadataEquals(rs.getMetaData(), expected);
+ }
+
+ private void executePreparedTest(String sql, String[] expected) throws Exception {
+ execute(sql, new Object[] {});
+ java.sql.ResultSet rs = this.internalResultSet;
+ assertResultsSetMetadataEquals(rs.getMetaData(), expected);
+ }
+
+ @Test public void testCount() throws Exception {
+ String[] expected = {
+ "ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName", //$NON-NLS-1$
+ "count 4 integer java.lang.Integer 1 null null PartsSupplier" //$NON-NLS-1$
+ };
+ executeTest("select count(*) from parts", expected); //$NON-NLS-1$
+ }
+
+ @Test public void testStar() throws Exception {
+ String[] expected = {
+ "ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName", //$NON-NLS-1$
+ "PART_ID 12 string java.lang.String 0 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier", //$NON-NLS-1$
+ "PART_NAME 12 string java.lang.String 1 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier", //$NON-NLS-1$
+ "PART_COLOR 12 string java.lang.String 1 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier", //$NON-NLS-1$
+ "PART_WEIGHT 12 string java.lang.String 1 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier" //$NON-NLS-1$
+ };
+ executeTest("select * from parts", expected); //$NON-NLS-1$
+ }
+
+ @Test public void testTempGroupStar() throws Exception {
+ String[] expected = {
+ "ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName", //$NON-NLS-1$
+ "PART_ID 12 string java.lang.String 0 FOO null PartsSupplier", //$NON-NLS-1$
+ "PART_NAME 12 string java.lang.String 1 FOO null PartsSupplier", //$NON-NLS-1$
+ "PART_COLOR 12 string java.lang.String 1 FOO null PartsSupplier", //$NON-NLS-1$
+ "PART_WEIGHT 12 string java.lang.String 1 FOO null PartsSupplier" //$NON-NLS-1$
+ };
+ executeTest("select * from (select * from parts) foo", expected); //$NON-NLS-1$
+ }
+
+ @Test public void testCountAndElement() throws Exception {
+ String[] expected = {
+ "ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName", //$NON-NLS-1$
+ "count 4 integer java.lang.Integer 1 null null PartsSupplier", //$NON-NLS-1$
+ "part_name 12 string java.lang.String 1 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier" //$NON-NLS-1$
+ };
+ executeTest("select count(*), part_name from parts group by part_name", expected); //$NON-NLS-1$
+ }
+
+ @Test public void testStar_PreparedStatement() throws Exception {
+ String[] expected = {
+ "ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName", //$NON-NLS-1$
+ "PART_ID 12 string java.lang.String 0 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier", //$NON-NLS-1$
+ "PART_NAME 12 string java.lang.String 1 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier", //$NON-NLS-1$
+ "PART_COLOR 12 string java.lang.String 1 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier", //$NON-NLS-1$
+ "PART_WEIGHT 12 string java.lang.String 1 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier" //$NON-NLS-1$
+ };
+ executePreparedTest("select * from parts", expected); //$NON-NLS-1$
+ }
+
+ @Test public void testCount_PreparedStatement() throws Exception {
+ String[] expected = {
+ "ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName", //$NON-NLS-1$
+ "count 4 integer java.lang.Integer 1 null null PartsSupplier" //$NON-NLS-1$
+ };
+ executePreparedTest("select count(*) from parts", expected); //$NON-NLS-1$
+ }
+
+ @Test public void testCountAndElement_PreparedStatement() throws Exception {
+ String[] expected = {
+ "ColumnName ColumnType ColumnTypeName ColumnClassName isNullable TableName SchemaName CatalogName", //$NON-NLS-1$
+ "count 4 integer java.lang.Integer 1 null null PartsSupplier", //$NON-NLS-1$
+ "part_name 12 string java.lang.String 1 PARTSSUPPLIER.PARTS PartsSupplier PartsSupplier" //$NON-NLS-1$
+ };
+ executePreparedTest("select count(*), part_name from parts group by part_name", expected); //$NON-NLS-1$
+ }
+}
Copied: trunk/test-integration/db/src/test/java/org/teiid/systemmodel/TestSystemVirtualModel.java (from rev 1930, trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestSystemVirtualModel.java)
===================================================================
--- trunk/test-integration/db/src/test/java/org/teiid/systemmodel/TestSystemVirtualModel.java (rev 0)
+++ trunk/test-integration/db/src/test/java/org/teiid/systemmodel/TestSystemVirtualModel.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,565 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.systemmodel;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import com.metamatrix.core.util.UnitTestUtil;
+import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
+
+/**
+ * Exercises each virtual table in the system model.
+ */
+public class TestSystemVirtualModel extends AbstractMMQueryTestCase {
+ private static final String DQP_PROP_FILE = UnitTestUtil.getTestDataPath()+ "/partssupplier/dqp.properties;user=test"; //$NON-NLS-1$
+ private static final String VDB = "PartsSupplier"; //$NON-NLS-1$
+
+ public TestSystemVirtualModel() {
+ // this is needed because the result files are generated
+ // with another tool which uses tab as delimiter
+ super.DELIMITER = "\t"; //$NON-NLS-1$
+ }
+
+ @Before public void setUp() {
+ getConnection(VDB, DQP_PROP_FILE);
+ }
+
+ @Ignore("ODBC support to be readded")
+ @Test public void testDefect23534() {
+ String[] expected = { "SCOPE[short] COLUMN_NAME[string] DATA_TYPE[short] TYPE_NAME[string] PRECISION[integer] LENGTH[integer] SCALE[integer] PSEUDO_COLUMN[short]" }; //$NON-NLS-1$
+ executeAndAssertResults(
+ "SELECT OA_SCOPE as \"SCOPE\" , COLUMN_NAME, DATA_TYPE, TYPE_NAME, OA_PRECISION as \"PRECISION\", " + //$NON-NLS-1$
+ "OA_LENGTH as \"LENGTH\", OA_SCALE as \"SCALE\", PSEUDO_COLUMN " + //$NON-NLS-1$
+ "FROM System.ODBC.OA_COLUMNS " + //$NON-NLS-1$
+ "WHERE TABLE_NAME = N'AUTHORS' AND TABLE_OWNER = N's1' AND " + //$NON-NLS-1$
+ "(OA_COLUMNTYPE = 2 OR OA_COLUMNTYPE = 3) " + //$NON-NLS-1$
+ "AND (OA_SCOPE is null OR OA_SCOPE >= 1) " + //$NON-NLS-1$
+ "AND (OA_NULLABLE = 0 OR OA_NULLABLE = 1) " + //$NON-NLS-1$
+ "ORDER BY \"SCOPE\"", //$NON-NLS-1$
+ expected);
+ }
+
+ protected void checkResult(String testName, String query) throws Exception {
+ execute(query);
+ super.checkResult(testName, this.internalResultSet, "system"); //$NON-NLS-1$
+ }
+
+ @Test public void testModels() throws Exception {
+ checkResult("testSchemas", "select* from System.Schemas"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test public void testKeys() throws Exception {
+ checkResult("testKeys", "select* from System.Keys order by Name"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test public void testGroups() throws Exception {
+ checkResult("testTables", "select* from System.Tables order by Name"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test public void testDataTypes() throws Exception {
+ checkResult("testDataTypes", "select * from System.DataTypes order by name"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test public void testProcedureParams() throws Exception {
+ checkResult("testProcedureParams", "select * from System.ProcedureParams order by Name"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test public void testProcedures() throws Exception {
+ checkResult("testProcedures", "select* from System.Procedures order by Name"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test public void testProperties() {
+ String[] expected = { "Name[string] Value[string] UID[string]", }; //$NON-NLS-1$
+ executeAndAssertResults("select* from System.Properties", expected); //$NON-NLS-1$
+ }
+
+ @Test public void testVirtualDatabase() {
+
+ String[] expected = { "Name[string] Version[string] ", "PartsSupplier 1", //$NON-NLS-1$ //$NON-NLS-2$
+
+ };
+ executeAndAssertResults("select* from System.VirtualDatabases", //$NON-NLS-1$
+ expected);
+ }
+
+ @Test public void testKeyColumns() throws Exception {
+ checkResult("testKeyColumns", "select* from System.KeyColumns order by Name, KeyName"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test public void testVDBResourcePathsProcedure() {
+
+ String[] expected = { "ResourcePath[string] isBinary[boolean] ", //$NON-NLS-1$
+ "/parts/partsmd/PartsSupplier.xmi false", //$NON-NLS-1$
+ };
+ execute("exec getVDBResourcePaths()",new Object[] {}); //$NON-NLS-1$
+ assertResults(expected);
+ }
+
+ @Test public void testColumns() throws Exception {
+ checkResult("testColumns", "select* from System.Columns order by Name"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test public void testTableType() {
+
+ String[] expected = { "Type[string] ", "Table", }; //$NON-NLS-1$ //$NON-NLS-2$
+ executeAndAssertResults(
+ "select distinct Type from System.Tables order by Type", //$NON-NLS-1$
+ expected);
+ }
+
+ @Test public void testTableIsSystem() throws Exception {
+ checkResult("testTableIsSystem", "select Name from System.Tables where IsSystem = 'false' order by Name"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Ignore("ODBC support to be readded")
+ @Test public void test_OA_PROC() {
+
+ String[] expected = {
+ "OA_QUALIFIER[string] OA_OWNER[string] OA_NAME[string] NUM_INPUT_PARAMS[integer] NUM_OUTPUT_PARAMS[integer] NUM_RESULT_SETS[integer] REMARKS[string] PROCEDURE_TYPE[short]", //$NON-NLS-1$
+ "PartsSupplier System describe 0 0 0 null 1", //$NON-NLS-1$
+ "PartsSupplier System getBinaryVDBResource 0 0 0 null 1", //$NON-NLS-1$
+ "PartsSupplier System getCharacterVDBResource 0 0 0 null 1", //$NON-NLS-1$
+ "PartsSupplier System getUpdatedCharacterVDBResource 0 0 0 null 1", //$NON-NLS-1$
+ "PartsSupplier System getVDBResourcePaths 0 0 0 null 1", //$NON-NLS-1$
+
+ };
+ executeAndAssertResults("select* FROM System.ODBC.OA_PROC", expected); //$NON-NLS-1$
+ }
+
+ @Ignore("ODBC support to be readded")
+ @Test public void test_OA_PROCCOLUMNS() {
+
+ String[] expected = {
+ "OA_QUALIFIER[string] OA_OWNER[string] OA_NAME[string] COLUMN_NAME[string] OA_COLUMNTYPE[short] DATA_TYPE[short] TYPE_NAME[string] OA_PRECISION[integer] OA_LENGTH[integer] OA_RADIX[integer] OA_SCALE[integer] OA_NULLABLE[short] OA_SCOPE[short] REMARKS[string]", //$NON-NLS-1$
+ "PartsSupplier System describe Description 0 12 VARCHAR 128 128 10 0 0 0 ", //$NON-NLS-1$
+ "PartsSupplier System describe entity 0 12 VARCHAR 0 0 10 0 0 0 ", //$NON-NLS-1$
+ "PartsSupplier System getBinaryVDBResource VdbResource 0 12 VARCHAR 0 0 10 0 1 0 ", //$NON-NLS-1$
+ "PartsSupplier System getBinaryVDBResource resourcePath 0 12 VARCHAR 50 50 10 0 0 0 ", //$NON-NLS-1$
+ "PartsSupplier System getCharacterVDBResource VdbResource 0 12 VARCHAR 0 0 10 0 1 0 ", //$NON-NLS-1$
+ "PartsSupplier System getCharacterVDBResource resourcePath 0 12 VARCHAR 50 50 10 0 0 0 ", //$NON-NLS-1$
+ "PartsSupplier System getUpdatedCharacterVDBResource VdbResource 0 12 VARCHAR 0 0 10 0 1 0 ", //$NON-NLS-1$
+ "PartsSupplier System getUpdatedCharacterVDBResource resourcePath 0 12 VARCHAR 50 50 10 0 0 0 ", //$NON-NLS-1$
+ "PartsSupplier System getUpdatedCharacterVDBResource tokenReplacements 0 12 VARCHAR 0 0 10 0 0 0 ", //$NON-NLS-1$
+ "PartsSupplier System getUpdatedCharacterVDBResource tokens 0 12 VARCHAR 0 0 10 0 0 0 ", //$NON-NLS-1$
+ "PartsSupplier System getVDBResourcePaths ResourcePath 0 12 VARCHAR 50 50 10 0 1 0 ", //$NON-NLS-1$
+ "PartsSupplier System getVDBResourcePaths isBinary 0 5 SMALLINT 1 1 10 0 1 0", //$NON-NLS-1$
+
+ };
+ executeAndAssertResults(
+ "select* FROM System.ODBC.OA_PROCCOLUMNS ORDER BY OA_NAME, COLUMN_NAME ", //$NON-NLS-1$
+ expected);
+ }
+
+ @Ignore("ODBC support to be readded")
+ @Test public void testOATYPES() {
+ String[] expected = { "TYPE_NAME[string] DATA_TYPE[short] PRECISION[integer] LITERAL_PREFIX[string] LITERAL_SUFFIX[string] CREATE_PARAMS[string] NULLABLE[short] CASE_SENSITIVE[short] SEARCHABLE[short] UNSIGNED_ATTRIBUTE[short] MONEY[short] AUTO_INCREMENT[short] LOCAL_TYPE_NAME[string] MINIMUM_SCALE[short] MAXIMUM_SCALE[short]", }; //$NON-NLS-1$
+
+ executeAndAssertResults(
+ "select TYPE_NAME, DATA_TYPE, OA_PRECISION as PRECISION, LITERAL_PREFIX, LITERAL_SUFFIX, " //$NON-NLS-1$
+ + " CREATE_PARAMS, OA_NULLABLE as NULLABLE, CASE_SENSITIVE, OA_SEARCHABLE as SEARCHABLE, " //$NON-NLS-1$
+ + " UNSIGNED_ATTRIB as UNSIGNED_ATTRIBUTE, OA_MONEY as MONEY, AUTO_INCREMENT, LOCAL_TYPE_NAME, " //$NON-NLS-1$
+ + " MINIMUM_SCALE, MAXIMUM_SCALE FROM System.ODBC.OA_TYPES WHERE DATA_TYPE = -6", //$NON-NLS-1$
+ expected);
+ }
+
+ @Ignore("ODBC support to be readded")
+ @Test public void testOACOLUMNSAll() {
+
+ String[] expected = {
+ "TABLE_QUALIFIER[string] TABLE_OWNER[string] TABLE_NAME[string] COLUMN_NAME[string] DATA_TYPE[short] TYPE_NAME[string] OA_LENGTH[integer] OA_PRECISION[integer] OA_SCALE[integer] OA_RADIX[integer] OA_NULLABLE[short] OA_SCOPE[short] PSEUDO_COLUMN[short] OA_COLUMNTYPE[short] REMARKS[string]", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER PARTS PART_COLOR 12 VARCHAR 30 0 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER PARTS PART_ID 12 VARCHAR 4 0 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER PARTS PART_NAME 12 VARCHAR 255 0 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER PARTS PART_WEIGHT 12 VARCHAR 255 0 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SHIP_VIA SHIPPER_ID 5 SMALLINT 0 2 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SHIP_VIA SHIPPER_NAME 12 VARCHAR 30 0 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER STATUS STATUS_ID 5 SMALLINT 0 2 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER STATUS STATUS_NAME 12 VARCHAR 30 0 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER SUPPLIER_CITY 12 VARCHAR 30 0 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER SUPPLIER_ID 12 VARCHAR 10 0 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER SUPPLIER_NAME 12 VARCHAR 30 0 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER SUPPLIER_STATE 12 VARCHAR 2 0 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER SUPPLIER_STATUS 5 SMALLINT 0 2 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS PART_ID 12 VARCHAR 4 0 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS QUANTITY 5 SMALLINT 0 3 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS SHIPPER_ID 5 SMALLINT 0 2 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS SUPPLIER_ID 12 VARCHAR 10 0 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypeElementProperties DataTypeElementName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypeElementProperties DataTypeName 12 VARCHAR 100 100 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypeElementProperties Name 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypeElementProperties UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypeElementProperties Value 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypeElements DataTypeName 12 VARCHAR 100 100 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypeElements ElementLength 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypeElements Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypeElements Position 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypeElements Scale 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypeElements UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypeProperties DataType 12 VARCHAR 100 100 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypeProperties Name 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypeProperties UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypeProperties Value 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes BaseType 12 VARCHAR 64 64 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes Description 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes IsAutoIncremented 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes IsCaseSensitive 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes IsPhysical 5 SMALLINT 1 1 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes IsSigned 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes IsStandard 5 SMALLINT 1 1 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes JavaClass 12 VARCHAR 500 500 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes Name 12 VARCHAR 100 100 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes NullType 12 VARCHAR 20 20 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes Precision 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes Radix 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes RuntimeType 12 VARCHAR 64 64 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes Scale 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes SearchType 12 VARCHAR 20 20 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes TypeLength 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes TypeName 12 VARCHAR 100 100 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System DataTypes UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ElementProperties ElementName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ElementProperties ElementUpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ElementProperties GroupFullName 12 VARCHAR 2048 2048 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ElementProperties GroupName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ElementProperties GroupUpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ElementProperties ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ElementProperties Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ElementProperties UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ElementProperties Value 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements CharOctetLength 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements DataType 12 VARCHAR 100 100 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements DefaultValue 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements Description 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements ElementLength 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements Format 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements GroupFullName 12 VARCHAR 2048 2048 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements GroupName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements GroupUpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements IsAutoIncremented 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements IsCaseSensitive 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements IsCurrency 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements IsLengthFixed 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements IsSigned 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements JavaClass 12 VARCHAR 500 500 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements MaxRange 12 VARCHAR 50 50 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements MinRange 12 VARCHAR 50 50 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements NameInSource 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements NullType 12 VARCHAR 20 20 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements Position 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements Precision 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements Radix 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements Scale 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements SearchType 12 VARCHAR 20 20 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements SupportsSelect 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements SupportsUpdates 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Elements UpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System GroupProperties GroupFullName 12 VARCHAR 2048 2048 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System GroupProperties GroupName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System GroupProperties GroupUpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System GroupProperties ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System GroupProperties Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System GroupProperties UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System GroupProperties Value 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Groups Cardinality 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Groups Description 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Groups FullName 12 VARCHAR 2048 2048 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Groups IsMaterialized 5 SMALLINT 0 0 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Groups IsPhysical 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Groups IsSystem 5 SMALLINT 1 1 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Groups ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Groups Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Groups NameInSource 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Groups SupportsUpdates 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Groups Type 12 VARCHAR 20 20 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Groups UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Groups UpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyElements GroupFullName 12 VARCHAR 2048 2048 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyElements GroupName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyElements GroupUpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyElements KeyName 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyElements KeyType 12 VARCHAR 20 20 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyElements ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyElements Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyElements Position 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyElements RefKeyUID 12 VARCHAR 50 50 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyElements UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyProperties GroupFullName 12 VARCHAR 2048 2048 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyProperties GroupName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyProperties GroupUpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyProperties KeyName 12 VARCHAR 255 0 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyProperties ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyProperties Name 12 VARCHAR 255 0 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyProperties UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System KeyProperties Value 12 VARCHAR 255 0 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Keys Description 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Keys GroupFullName 12 VARCHAR 2048 2048 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Keys GroupName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Keys GroupUpperName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Keys IsIndexed 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Keys ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Keys Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Keys NameInSource 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Keys RefKeyUID 12 VARCHAR 50 50 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Keys Type 12 VARCHAR 20 20 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Keys UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ModelProperties ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ModelProperties Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ModelProperties UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ModelProperties Value 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Models Description 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Models IsPhysical 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Models MaxSetSize 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Models Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Models PrimaryMetamodelURI 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Models SupportsDistinct 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Models SupportsJoin 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Models SupportsOrderBy 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Models SupportsOuterJoin 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Models SupportsWhereAll 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Models UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureParams DataType 12 VARCHAR 25 25 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureParams ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureParams Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureParams NullType 12 VARCHAR 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureParams Optional 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureParams Position 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureParams Precision 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureParams ProcedureName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureParams Radix 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureParams Scale 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureParams Type 12 VARCHAR 100 100 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureParams TypeLength 4 INTEGER 10 10 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureProperties ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureProperties Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureProperties ProcedureName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureProperties UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System ProcedureProperties Value 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Procedures Description 12 VARCHAR 255 225 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Procedures FullName 12 VARCHAR 2048 2048 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Procedures ModelName 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Procedures ModelUID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Procedures Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Procedures NameInSource 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Procedures ReturnsResults 5 SMALLINT 1 1 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System Procedures UID 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System VirtualDatabases Name 12 VARCHAR 255 255 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System VirtualDatabases Version 12 VARCHAR 50 50 0 10 0 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/JDBC ReferenceKeyColumns DEFERRABILITY 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/JDBC ReferenceKeyColumns DELETE_RULE 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/JDBC ReferenceKeyColumns FKCOLUMN_NAME 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/JDBC ReferenceKeyColumns FKTABLE_CAT 12 VARCHAR 1 1 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/JDBC ReferenceKeyColumns FKTABLE_NAME 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/JDBC ReferenceKeyColumns FKTABLE_SCHEM 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/JDBC ReferenceKeyColumns FK_NAME 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/JDBC ReferenceKeyColumns KEY_SEQ 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/JDBC ReferenceKeyColumns PKCOLUMN_NAME 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/JDBC ReferenceKeyColumns PKTABLE_CAT 12 VARCHAR 1 1 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/JDBC ReferenceKeyColumns PKTABLE_NAME 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/JDBC ReferenceKeyColumns PKTABLE_SCHEM 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/JDBC ReferenceKeyColumns PK_NAME 12 VARCHAR 255 255 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/JDBC ReferenceKeyColumns UPDATE_RULE 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_COLUMNS COLUMN_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_COLUMNS DATA_TYPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_COLUMNS OA_COLUMNTYPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_COLUMNS OA_LENGTH 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_COLUMNS OA_NULLABLE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_COLUMNS OA_PRECISION 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_COLUMNS OA_RADIX 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_COLUMNS OA_SCALE 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_COLUMNS OA_SCOPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_COLUMNS PSEUDO_COLUMN 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_COLUMNS REMARKS 12 VARCHAR 254 254 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_COLUMNS TABLE_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_COLUMNS TABLE_OWNER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_COLUMNS TABLE_QUALIFIER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_COLUMNS TYPE_NAME 12 VARCHAR 100 100 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_FKEYS DELETE_RULE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_FKEYS FKCOLUMN_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_FKEYS FKTABLE_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_FKEYS FKTABLE_OWNER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_FKEYS FKTABLE_QUALIFIER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_FKEYS FK_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_FKEYS KEY_SEQ 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_FKEYS PKCOLUMN_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_FKEYS PKTABLE_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_FKEYS PKTABLE_OWNER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_FKEYS PKTABLE_QUALIFIER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_FKEYS PK_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_FKEYS UPDATE_RULE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROC NUM_INPUT_PARAMS 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROC NUM_OUTPUT_PARAMS 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROC NUM_RESULT_SETS 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROC OA_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROC OA_OWNER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROC OA_QUALIFIER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROC PROCEDURE_TYPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROC REMARKS 12 VARCHAR 254 254 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROCCOLUMNS COLUMN_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROCCOLUMNS DATA_TYPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_COLUMNTYPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_LENGTH 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_NULLABLE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_OWNER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_PRECISION 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_QUALIFIER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_RADIX 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_SCALE 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROCCOLUMNS OA_SCOPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROCCOLUMNS REMARKS 12 VARCHAR 254 254 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_PROCCOLUMNS TYPE_NAME 12 VARCHAR 100 100 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_STATISTICS COLUMN_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_STATISTICS FILTER_CONDITIONS 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_STATISTICS INDEX_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_STATISTICS INDEX_QUALIFIER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_STATISTICS NON_UNIQUE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_STATISTICS OA_CARDINALITY 12 VARCHAR 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_STATISTICS OA_COLLATION 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_STATISTICS OA_PAGES 12 VARCHAR 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_STATISTICS OA_TYPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_STATISTICS SEQ_IN_INDEX 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_STATISTICS TABLE_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_STATISTICS TABLE_OWNER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_STATISTICS TABLE_QUALIFIER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TABLES REMARKS 12 VARCHAR 254 254 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TABLES TABLE_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TABLES TABLE_OWNER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TABLES TABLE_QUALIFIER 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TABLES TABLE_TYPE 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TYPES AUTO_INCREMENT 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TYPES CASE_SENSITIVE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TYPES CREATE_PARAMS 12 VARCHAR 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TYPES DATA_TYPE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TYPES LITERAL_PREFIX 12 VARCHAR 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TYPES LITERAL_SUFFIX 12 VARCHAR 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TYPES LOCAL_TYPE_NAME 12 VARCHAR 128 128 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TYPES MAXIMUM_SCALE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TYPES MINIMUM_SCALE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TYPES OA_MONEY 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TYPES OA_NULLABLE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TYPES OA_PRECISION 4 INTEGER 10 10 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TYPES OA_SEARCHABLE 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TYPES TYPE_NAME 12 VARCHAR 100 100 0 10 1 0 0 0 null", //$NON-NLS-1$
+ "PartsSupplier System/ODBC OA_TYPES UNSIGNED_ATTRIB 5 SMALLINT 5 5 0 10 1 0 0 0 null", //$NON-NLS-1$
+
+ };
+
+ executeAndAssertResults(
+ "select* FROM System.ODBC.OA_COLUMNS ORDER BY TABLE_QUALIFIER, TABLE_OWNER, TABLE_NAME, COLUMN_NAME", //$NON-NLS-1$
+ expected);
+ }
+
+ @Ignore("ODBC support to be readded")
+ @Test public void testOATYPESAll() {
+ String[] expected = {
+ "TYPE_NAME[string] DATA_TYPE[short] OA_PRECISION[integer] LITERAL_PREFIX[string] LITERAL_SUFFIX[string] CREATE_PARAMS[string] OA_NULLABLE[short] CASE_SENSITIVE[short] OA_SEARCHABLE[short] UNSIGNED_ATTRIB[short] OA_MONEY[short] AUTO_INCREMENT[short] MINIMUM_SCALE[short] MAXIMUM_SCALE[short] LOCAL_TYPE_NAME[string]", //$NON-NLS-1$
+ "CHAR 1 2147483647 ' ' null 1 1 3 0 0 0 null null CHAR", //$NON-NLS-1$
+ "DATE 9 10 {d ' '} null 1 0 2 0 0 0 null null DATE", //$NON-NLS-1$
+ "DOUBLE 8 15 null null null 1 0 2 0 0 0 null null DOUBLE", //$NON-NLS-1$
+ "FLOAT 6 15 null null null 1 0 2 0 0 0 null null FLOAT", //$NON-NLS-1$
+ "INTEGER 4 10 null null null 1 0 2 0 0 0 null null INTEGER", //$NON-NLS-1$
+ "LONGVARBINARY -4 2147483647 0x null null 1 0 0 0 0 0 null null null", //$NON-NLS-1$
+ "NUMERIC 2 32 null null null 1 0 2 0 0 0 0 32 NUMERIC", //$NON-NLS-1$
+ "REAL 7 7 null null null 1 0 2 0 0 0 null null REAL", //$NON-NLS-1$
+ "SMALLINT 5 5 null null null 1 0 2 0 0 0 null null SMALLINT", //$NON-NLS-1$
+ "TIME 10 8 {t ' '} null 1 0 2 0 0 0 null null TIME", //$NON-NLS-1$
+ "TIMESTAMP 11 19 {ts ' '} null 1 0 2 0 0 0 null null TIMESTAMP", //$NON-NLS-1$
+ "VARCHAR 12 2147483647 ' ' null 1 1 3 0 0 0 null null VARCHAR", }; //$NON-NLS-1$
+ executeAndAssertResults(
+ "select* FROM System.ODBC.OA_TYPES ORDER BY TYPE_NAME", //$NON-NLS-1$
+ expected);
+
+ }
+
+ @Ignore("ODBC support to be readded")
+ @Test public void testOAFKEYS() {
+ String[] expected = {
+ "PKTABLE_QUALIFIER[string] PKTABLE_OWNER[string] PKTABLE_NAME[string] PKCOLUMN_NAME[string] FKTABLE_QUALIFIER[string] FKTABLE_OWNER[string] FKTABLE_NAME[string] FKCOLUMN_NAME[string] KEY_SEQ[short] UPDATE_RULE[short] DELETE_RULE[short] FK_NAME[string] PK_NAME[string]", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER PARTS PART_ID PartsSupplier PartsSupplier/PARTSSUPPLIER null null 1 null null null PK_PARTS", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER PARTS PART_ID PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS PART_ID 1 null null FK_SPLIER_PRTS_PRTS PK_PARTS", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SHIP_VIA SHIPPER_ID PartsSupplier PartsSupplier/PARTSSUPPLIER null null 1 null null null PK_SHIP_VIA", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER STATUS STATUS_ID PartsSupplier PartsSupplier/PARTSSUPPLIER null null 1 null null null PK_STATUS", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER STATUS STATUS_ID PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER SUPPLIER_STATUS 1 null null FK_SPLIER_STATS PK_STATUS", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER SUPPLIER_ID PartsSupplier PartsSupplier/PARTSSUPPLIER null null 1 null null null PK_SUPPLIER", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER SUPPLIER_ID PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS SUPPLIER_ID 1 null null FK_SPLY_PRTS_SPLY PK_SUPPLIER", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS SUPPLIER_ID PartsSupplier PartsSupplier/PARTSSUPPLIER null null 1 null null null PK_SUPPLIER_PARTS", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS PART_ID PartsSupplier PartsSupplier/PARTSSUPPLIER null null 2 null null null PK_SUPPLIER_PARTS", //$NON-NLS-1$
+
+ };
+ executeAndAssertResults(
+ "select* FROM System.ODBC.OA_FKEYS ORDER BY PK_NAME, KEY_SEQ", //$NON-NLS-1$
+ expected);
+
+ }
+
+ @Ignore("ODBC support to be readded")
+ @Test public void testOASTATISTICS() {
+ String[] expected = {
+ "TABLE_QUALIFIER[string] TABLE_OWNER[string] TABLE_NAME[string] NON_UNIQUE[short] INDEX_QUALIFIER[string] INDEX_NAME[string] OA_TYPE[short] SEQ_IN_INDEX[short] COLUMN_NAME[string] OA_COLLATION[string] OA_CARDINALITY[string] OA_PAGES[string] FILTER_CONDITIONS[string]", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER PARTS 0 PK_PARTS 3 1 PART_ID null null null", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SHIP_VIA 0 PK_SHIP_VIA 3 1 SHIPPER_ID null null null ", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER STATUS 0 PK_STATUS 3 1 STATUS_ID null null null ", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER 1 FK_SPLIER_STATS 3 1 SUPPLIER_STATUS null null null ", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER 0 PK_SUPPLIER 3 1 SUPPLIER_ID null null null ", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS 1 FK_SPLIER_PRTS_PRTS 3 1 PART_ID null null null ", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS 1 FK_SPLY_PRTS_SPLY 3 1 SUPPLIER_ID null null null ", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS 0 PK_SUPPLIER_PARTS 3 2 PART_ID null null null ", //$NON-NLS-1$
+ "PartsSupplier PartsSupplier/PARTSSUPPLIER SUPPLIER_PARTS 0 PK_SUPPLIER_PARTS 3 1 SUPPLIER_ID null null null ", //$NON-NLS-1$
+
+ };
+ executeAndAssertResults("select* FROM System.ODBC.OA_STATISTICS order by TABLE_NAME, INDEX_NAME, COLUMN_NAME", //$NON-NLS-1$
+ expected);
+
+ }
+
+ @Test public void testDefect12064() {
+ String[] expected = {
+ "KeyName[string] RefKeyUID[string] ", //$NON-NLS-1$
+ "PK_PARTS null", //$NON-NLS-1$
+ "PK_SHIP_VIA null", //$NON-NLS-1$
+ "PK_STATUS null", //$NON-NLS-1$
+ "PK_SUPPLIER null", //$NON-NLS-1$
+ "PK_SUPPLIER_PARTS null", //$NON-NLS-1$
+ "PK_SUPPLIER_PARTS null", //$NON-NLS-1$
+
+
+ };
+ executeAndAssertResults("select KeyName, RefKeyUID FROM System.KeyColumns WHERE RefKeyUID IS NULL order by KeyName",expected); //$NON-NLS-1$
+ }
+
+ @Test public void testReferenceKeyColumns() throws Exception {
+ checkResult("testReferenceKeyColumns", "select* FROM System.ReferenceKeyColumns order by PKTABLE_NAME"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Test public void testVirtualLookup() {
+ String[] expected = { "expr[string]", "null"}; //$NON-NLS-1$ //$NON-NLS-2$
+ executeAndAssertResults(
+ "select lookup('System.KeyColumns', 'RefKeyUID', 'KeyName', 'PK_PARTS')", expected); //$NON-NLS-1$
+
+ }
+}
Copied: trunk/test-integration/db/src/test/java/org/teiid/systemmodel/TestVirtualDocWithVirtualProc.java (from rev 1930, trunk/test-integration/common/src/test/java/com/metamatrix/systemmodel/TestVirtualDocWithVirtualProc.java)
===================================================================
--- trunk/test-integration/db/src/test/java/org/teiid/systemmodel/TestVirtualDocWithVirtualProc.java (rev 0)
+++ trunk/test-integration/db/src/test/java/org/teiid/systemmodel/TestVirtualDocWithVirtualProc.java 2010-03-06 17:12:02 UTC (rev 1932)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.systemmodel;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.metamatrix.core.util.UnitTestUtil;
+import com.metamatrix.jdbc.api.AbstractMMQueryTestCase;
+
+/**
+ * Tests xml virtual documents which are built on top of virtual
+ * procedures (see defect 12309 and all related).
+ */
+public class TestVirtualDocWithVirtualProc extends AbstractMMQueryTestCase {
+
+ private static final String DQP_PROP_FILE = UnitTestUtil.getTestDataPath() + "/xml-vp/xmlvp.properties;user=test"; //$NON-NLS-1$
+ private static final String VDB = "xmlvp"; //$NON-NLS-1$
+
+ public TestVirtualDocWithVirtualProc() {
+ // this is needed because the result files are generated
+ // with another tool which uses tab as delimiter
+ super.DELIMITER = "\t"; //$NON-NLS-1$
+ }
+
+ @Before public void setUp() {
+ getConnection(VDB, DQP_PROP_FILE);
+ }
+
+ @After public void tearDown() {
+ closeConnection();
+ }
+
+ @Test public void testDefect15241() {
+
+ String sql = "SELECT SchemaName, Name, Description FROM System.Tables WHERE Name = 'yyyTestDocument'"; //$NON-NLS-1$
+
+ String[] expected ={
+ "SchemaName[string] Name[string] Description[string]", //$NON-NLS-1$
+ "test13326Doc yyyTestDocument null", //$NON-NLS-1$
+ "testDoc yyyTestDocument This is a test description of virtual doc yyyTestDocument" //$NON-NLS-1$
+ };
+ executeAndAssertResults(sql, expected);
+ }
+
+ @Test public void testDefect15241a() {
+ String sql = "SELECT TableName, Name, Description FROM System.Columns WHERE Name = 'IntKey'"; //$NON-NLS-1$
+ String[] expected ={
+ "TableName[string] Name[string] Description[string]", //$NON-NLS-1$
+ "HugeA IntKey null", //$NON-NLS-1$
+ "HugeB IntKey null", //$NON-NLS-1$
+ "LargeA IntKey null", //$NON-NLS-1$
+ "LargeB IntKey null", //$NON-NLS-1$
+ "MediumA IntKey null", //$NON-NLS-1$
+ "MediumB IntKey null", //$NON-NLS-1$
+ "SmallA IntKey This is a test description of SmallA.IntKey element", //$NON-NLS-1$
+ "SmallB IntKey null" //$NON-NLS-1$
+ };
+ executeAndAssertResults(sql, expected);
+ }
+
+ @Test public void testDefect15241b() {
+
+ String sql = "SELECT Name, Value, UID FROM System.Properties"; //$NON-NLS-1$
+ String[] expected ={
+ "Name[string] Value[string] UID[string]", //$NON-NLS-1$
+ "NugentXAttribute Nuuuuuge22222 mmuuid:4789b280-841c-1f15-9526-ebd0cace03e1", //$NON-NLS-1$
+ "NugentYAttribute Nuuuuuge44444 mmuuid:4789b280-841c-1f15-9526-ebd0cace03e1" //$NON-NLS-1$
+ };
+ executeAndAssertResults(sql, expected);
+ }
+
+}
Modified: trunk/test-integration/pom.xml
===================================================================
--- trunk/test-integration/pom.xml 2010-03-05 22:48:25 UTC (rev 1931)
+++ trunk/test-integration/pom.xml 2010-03-06 17:12:02 UTC (rev 1932)
@@ -65,47 +65,7 @@
<type>test-jar</type>
</dependency>
- <!-- internal dependencies that are only used by integration testing -->
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-runtime</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-runtime</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid.connectors</groupId>
- <artifactId>connector-loopback</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid.connectors</groupId>
- <artifactId>connector-text</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid.connectors</groupId>
- <artifactId>connector-text</artifactId>
- <type>test-jar</type>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid.connectors</groupId>
- <artifactId>connector-jdbc</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid.connectors</groupId>
- <artifactId>connector-jdbc</artifactId>
- <type>test-jar</type>
- <version>${project.version}</version>
- </dependency>
-
<!-- external dependencies -->
<dependency>
<groupId>org.apache.derby</groupId>
@@ -119,7 +79,19 @@
<artifactId>connector-api</artifactId>
<scope>provided</scope>
</dependency>
-
+
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs-spi</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
</dependencies>
<modules>
14 years, 10 months
teiid SVN: r1931 - in trunk: client/src/main/java/org/teiid/adminapi/impl and 6 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-03-05 17:48:25 -0500 (Fri, 05 Mar 2010)
New Revision: 1931
Removed:
trunk/jboss-integration/src/main/java/com/metamatrix/
Modified:
trunk/client/src/main/java/org/teiid/adminapi/VDB.java
trunk/client/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java
trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/Admin.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
trunk/test-integration/db/pom.xml
trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionStrategy.java
trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionStrategyFactory.java
trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/DataSourceConnection.java
trunk/test-integration/db/src/main/resources/default-config.properties
Log:
TEIID-833: fixing the compilation issues in the test-integration-db
Modified: trunk/client/src/main/java/org/teiid/adminapi/VDB.java
===================================================================
--- trunk/client/src/main/java/org/teiid/adminapi/VDB.java 2010-03-05 21:43:09 UTC (rev 1930)
+++ trunk/client/src/main/java/org/teiid/adminapi/VDB.java 2010-03-05 22:48:25 UTC (rev 1931)
@@ -22,7 +22,6 @@
package org.teiid.adminapi;
-import java.util.Collection;
import java.util.List;
/**
@@ -30,7 +29,7 @@
* <br>A VDB has a name and a version.</br>
*
* <p>The identifier pattern for a VDB is <CODE>"name<{@link #DELIMITER_CHAR}>version"</CODE>,
- * where the name of the VDB and its version represent its unique identifier in the MetaMatrix system.
+ * where the name of the VDB and its version represent its unique identifier in the Teiid system.
* There are no spaces allowed in a given VDB name, and VDB name must start with a letter.
* A version number is automatically assigned to a VDB when it is deployed into
* a system. A VDB is uniquely identified by <CODE>"name<{@link #DELIMITER_CHAR}>version"</CODE>.
@@ -52,9 +51,9 @@
/**
- * @return Collection of MMModels
+ * @return Collection of Teiid Models
*/
- public Collection<? extends Model> getModels();
+ public List<Model> getModels();
/**
* @return the status
Modified: trunk/client/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java
===================================================================
--- trunk/client/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java 2010-03-05 21:43:09 UTC (rev 1930)
+++ trunk/client/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java 2010-03-05 22:48:25 UTC (rev 1931)
@@ -147,9 +147,10 @@
this.fileUrl = url;
}
+ @Override
@ManagementProperty(description="Models in a VDB", managed=true)
- public List<ModelMetaData> getModels(){
- return new ArrayList<ModelMetaData>(this.models.getMap().values());
+ public List<Model> getModels(){
+ return new ArrayList<Model>(this.models.getMap().values());
}
public void addModel(ModelMetaData m) {
Modified: trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/Admin.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/Admin.java 2010-03-05 21:43:09 UTC (rev 1930)
+++ trunk/jboss-integration/src/main/java/org/teiid/adminapi/jboss/Admin.java 2010-03-05 22:48:25 UTC (rev 1931)
@@ -63,6 +63,7 @@
import org.teiid.adminapi.AdminProcessingException;
import org.teiid.adminapi.ConnectionPoolStatistics;
import org.teiid.adminapi.ConnectorBinding;
+import org.teiid.adminapi.Model;
import org.teiid.adminapi.PropertyDefinition;
import org.teiid.adminapi.Request;
import org.teiid.adminapi.Session;
@@ -89,7 +90,6 @@
private static final String XA_DATA_SOURCE_TEMPLATE = "XADataSourceTemplate";
private static final long serialVersionUID = 7081309086056911304L;
private static ComponentType VDBTYPE = new ComponentType("teiid", "vdb");
- private static ComponentType MODELTYPE = new ComponentType("teiid", "model");
private static ComponentType NOTXTYPE = new ComponentType("ConnectionFactory", "NoTx");
private static ComponentType TXTYPE = new ComponentType("ConnectionFactory", "Tx");
private static ComponentType DQPTYPE = new ComponentType("teiid", "dqp");
@@ -340,10 +340,10 @@
HashMap<String, ConnectorBinding> bindingMap = new HashMap<String, ConnectorBinding>();
VDBMetaData vdb = (VDBMetaData) getVDB(vdbName, vdbVersion);
if (vdb != null) {
- for (ModelMetaData model:vdb.getModels()) {
+ for (Model model:vdb.getModels()) {
if (model.isSource()) {
for (String sourceName : model.getSourceNames()) {
- ConnectorBinding binding = getConnectorBinding(model.getSourceJndiName(sourceName));
+ ConnectorBinding binding = getConnectorBinding(((ModelMetaData)model).getSourceJndiName(sourceName));
if (binding != null) {
bindingMap.put(sourceName, binding);
}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java 2010-03-05 21:43:09 UTC (rev 1930)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java 2010-03-05 22:48:25 UTC (rev 1931)
@@ -41,6 +41,7 @@
import org.jboss.managed.api.ManagedObject;
import org.jboss.managed.api.factory.ManagedObjectFactory;
import org.jboss.virtual.VirtualFile;
+import org.teiid.adminapi.Model;
import org.teiid.adminapi.VDB;
import org.teiid.adminapi.impl.ModelMetaData;
import org.teiid.adminapi.impl.VDBMetaData;
@@ -94,11 +95,11 @@
// if store is null and vdb dynamic vdb then try to get the metadata
if (store == null && deployment.isDynamic()) {
ArrayList<MetadataStore> stores = new ArrayList<MetadataStore>();
- for (ModelMetaData model:deployment.getModels()) {
+ for (Model model:deployment.getModels()) {
if (model.getName().equals(CoreConstants.SYSTEM_MODEL)){
continue;
}
- stores.add(buildDynamicMetadataStore((VFSDeploymentUnit)unit, deployment, model));
+ stores.add(buildDynamicMetadataStore((VFSDeploymentUnit)unit, deployment, (ModelMetaData)model));
}
store = new CompositeMetadataStore(stores);
unit.addAttachment(CompositeMetadataStore.class, store);
@@ -143,7 +144,8 @@
private boolean validateSources(VDBMetaData deployment) {
boolean valid = true;
- for(ModelMetaData model:deployment.getModels()) {
+ for(Model m:deployment.getModels()) {
+ ModelMetaData model = (ModelMetaData)m;
for (String sourceName:model.getSourceNames()) {
String jndiName = model.getSourceJndiName(sourceName);
try {
@@ -191,7 +193,7 @@
ManagedObject vdbMO = managedObjects.get(VDBMetaData.class.getName());
if (vdbMO != null) {
VDBMetaData vdb = (VDBMetaData) vdbMO.getAttachment();
- for (ModelMetaData m : vdb.getModels()) {
+ for (Model m : vdb.getModels()) {
if (m.getName().equals(CoreConstants.SYSTEM_MODEL)) {
continue;
}
Modified: trunk/test-integration/db/pom.xml
===================================================================
--- trunk/test-integration/db/pom.xml 2010-03-05 21:43:09 UTC (rev 1930)
+++ trunk/test-integration/db/pom.xml 2010-03-05 22:48:25 UTC (rev 1931)
@@ -30,6 +30,11 @@
<version>4.4</version>
</dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.1</version>
+ </dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
Modified: trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionStrategy.java
===================================================================
--- trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionStrategy.java 2010-03-05 21:43:09 UTC (rev 1930)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionStrategy.java 2010-03-05 22:48:25 UTC (rev 1931)
@@ -9,14 +9,15 @@
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.sql.Connection;
-import java.util.Collection;
import java.util.Iterator;
+import java.util.List;
import java.util.Properties;
+import java.util.Set;
import javax.sql.XAConnection;
import org.teiid.adminapi.Admin;
-import org.teiid.adminapi.AdminOptions;
+import org.teiid.adminapi.AdminFactory;
import org.teiid.adminapi.Model;
import org.teiid.adminapi.VDB;
import org.teiid.test.framework.ConfigPropertyLoader;
@@ -109,58 +110,56 @@
- void configure() throws QueryTestFailedException {
-
- if (this.isDataStoreDisabled()) {
- return;
- }
+ void configure() throws QueryTestFailedException {
- try {
-
- // the the driver strategy is going to be used to connection directly to the connector binding
- // source, then no administration can be done
- Admin admin = null;
-
- java.sql.Connection conn = getConnection();
-
- if ( conn instanceof com.metamatrix.jdbc.MMConnection) {
- com.metamatrix.jdbc.MMConnection c = (com.metamatrix.jdbc.MMConnection) conn;
- admin = (Admin)c.getAdminAPI();
- } else if (conn instanceof com.metamatrix.jdbc.api.Connection) {
- com.metamatrix.jdbc.api.Connection c = (com.metamatrix.jdbc.api.Connection) conn;
- admin = (Admin)c.getAdminAPI();
- } else {
- TestLogger.log("ConnectionStrategy configuration: connection is not of type MMConnection and therefore no vdb setup will be performed");
- return;
- }
+ if (this.isDataStoreDisabled()) {
+ return;
+ }
- setupVDBConnectorBindings(admin);
-
- // admin.restart();
-
- int sleep = 5;
-
- TestLogger.log("Bouncing the system..(wait " + sleep + " seconds)"); //$NON-NLS-1$
- Thread.sleep(1000*sleep);
- TestLogger.log("done."); //$NON-NLS-1$
+ try {
+ // the the driver strategy is going to be used to connection
+ // directly to the connector binding
+ // source, then no administration can be done
+ Admin admin = AdminFactory.getInstance().createAdmin(this.env.getProperty("admin.user"), this.env.getProperty("admin.password").toCharArray(), this.env.getProperty("admin.url"));
- } catch (Throwable e) {
- e.printStackTrace();
+ java.sql.Connection conn = getConnection();
- throw new TransactionRuntimeException(e.getMessage());
- } finally {
- // need to close and flush the connection after restarting
- // this.shutdown();
-
- }
- }
+ if (conn instanceof com.metamatrix.jdbc.MMConnection) {
+ com.metamatrix.jdbc.MMConnection c = (com.metamatrix.jdbc.MMConnection) conn;
+ } else if (conn instanceof com.metamatrix.jdbc.api.Connection) {
+ com.metamatrix.jdbc.api.Connection c = (com.metamatrix.jdbc.api.Connection) conn;
+ } else {
+ TestLogger.log("ConnectionStrategy configuration: connection is not of type MMConnection and therefore no vdb setup will be performed");
+ return;
+ }
+
+ setupVDBConnectorBindings(admin);
+
+ // admin.restart();
+
+ int sleep = 5;
+
+ TestLogger.log("Bouncing the system..(wait " + sleep + " seconds)"); //$NON-NLS-1$
+ Thread.sleep(1000 * sleep);
+ TestLogger.log("done."); //$NON-NLS-1$
+
+ } catch (Throwable e) {
+ e.printStackTrace();
+
+ throw new TransactionRuntimeException(e.getMessage());
+ } finally {
+ // need to close and flush the connection after restarting
+ // this.shutdown();
+
+ }
+ }
protected void setupVDBConnectorBindings(Admin api) throws QueryTestFailedException {
try {
- VDB vdb = null;
- Collection<VDB> vdbs = api.getVDBs("*");
+ VDB vdb = null;
+ Set<VDB> vdbs = api.getVDBs();
if (vdbs == null || vdbs.isEmpty()) {
throw new QueryTestFailedException(
"AdminApi.GetVDBS returned no vdbs available");
@@ -183,11 +182,12 @@
+ url.getVDBName());
}
- Iterator<Model> modelIt = vdb.getModels().iterator();
+ List<Model> models = vdb.getModels();
+ Iterator<Model> modelIt = models.iterator();
while (modelIt.hasNext()) {
Model m = modelIt.next();
- if (!m.isPhysical())
+ if (!m.isSource())
continue;
// get the mapping, if defined
@@ -198,24 +198,17 @@
useName = mappedName;
}
- org.teiid.test.framework.datasource.DataSource ds = this.dsFactory
- .getDatasource(useName, m.getName());
+ org.teiid.test.framework.datasource.DataSource ds = this.dsFactory.getDatasource(useName, m.getName());
if (ds != null) {
TestLogger.logInfo("Set up Connector Binding (model:mapping:type): " + m.getName() + ":" + useName + ":" + ds.getConnectorType()); //$NON-NLS-1$
- AdminOptions ao = new AdminOptions(
- AdminOptions.OnConflict.OVERWRITE);
- ao.addOption(AdminOptions.BINDINGS_IGNORE_DECRYPT_ERROR);
+ api.addConnectorBinding(ds.getName(),ds.getConnectorType(), ds.getProperties());
- api.addConnectorBinding(ds.getName(),
- ds.getConnectorType(), ds.getProperties(), ao);
+ api.assignBindingToModel(vdb.getName(), vdb.getVersion(), m.getName(), ds.getName());
- api.assignBindingToModel(ds.getName(), vdb.getName(), vdb
- .getVDBVersion(), m.getName());
-
- api.startConnectorBinding(ds.getName());
+ api.startConnectorBinding(api.getConnectorBinding(ds.getName()));
} else {
throw new QueryTestFailedException(
"Error: Unable to create binding to map to model : "
Modified: trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionStrategyFactory.java
===================================================================
--- trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionStrategyFactory.java 2010-03-05 21:43:09 UTC (rev 1930)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/ConnectionStrategyFactory.java 2010-03-05 22:48:25 UTC (rev 1931)
@@ -23,9 +23,9 @@
public static ConnectionStrategy createConnectionStrategy() {
- ConfigPropertyLoader configLoader = ConfigPropertyLoader.getInstance();
+ ConfigPropertyLoader configLoader = ConfigPropertyLoader.getInstance();
- ConnectionStrategy strategy = null;
+ ConnectionStrategy strategy = null;
Properties props = configLoader.getProperties();
String type = props.getProperty(ConfigPropertyNames.CONNECTION_TYPE, ConfigPropertyNames.CONNECTION_TYPES.DRIVER_CONNECTION);
Modified: trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/DataSourceConnection.java
===================================================================
--- trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/DataSourceConnection.java 2010-03-05 21:43:09 UTC (rev 1930)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/framework/connection/DataSourceConnection.java 2010-03-05 22:48:25 UTC (rev 1931)
@@ -21,7 +21,6 @@
import com.metamatrix.common.util.PropertiesUtils;
import com.metamatrix.jdbc.BaseDataSource;
-import com.metamatrix.jdbc.EmbeddedDataSource;
public class DataSourceConnection extends ConnectionStrategy {
@@ -129,68 +128,57 @@
return xaConnection;
}
- private XAConnection createConnection() throws SQLException,
- InstantiationException, IllegalAccessException,
- ClassNotFoundException {
- TestLogger.log("Creating Datasource Connection: \"" + this.serverName + " - " + this.databaseName + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ private XAConnection createConnection() throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException {
+
+ TestLogger.log("Creating Datasource Connection: \"" + this.serverName + " - " + this.databaseName + "\""); //$NON-NLS-1$ //$NON-NLS-2$
- DataSource ds = (DataSource)Class.forName(this.driver).newInstance();
-
- if (ds instanceof BaseDataSource) {
-
- BaseDataSource dataSource = (BaseDataSource) ds;
-
- dataSource.setDatabaseName(this.databaseName);
- if (this.applName != null) {
- dataSource.setApplicationName(this.applName);
- }
-
- if (dataSource instanceof EmbeddedDataSource) {
- ((EmbeddedDataSource) dataSource).setBootstrapFile(this.serverName);
- } else {
- ((TeiidDataSource) dataSource).setServerName(this.serverName);
- ((TeiidDataSource) dataSource).setPortNumber(Integer
- .parseInt(this.portNumber));
- }
-
- if (this.username != null) {
- dataSource.setUser(this.username);
- dataSource.setPassword(this.pwd);
- }
-
-
- return ((XADataSource) dataSource).getXAConnection(this.username,
- this.pwd);
- } else {
- Properties props = new Properties();
- props.setProperty(DS_DATABASENAME, this.databaseName);
- props.setProperty(DS_SERVERPORT, this.portNumber);
- props.setProperty(DS_URL, this.url);
- props.setProperty(DS_SERVERNAME, this.serverName);
- if (this.username != null) {
- props.setProperty(DS_USERNAME, this.username);
- props.setProperty(DS_USER, this.username);
- props.setProperty(DS_PASSWORD, this.pwd);
- }
-
- PropertiesUtils.setBeanProperties(ds, props, null);
- return ((XADataSource)ds).getXAConnection();
- }
+ DataSource ds = (DataSource) Class.forName(this.driver).newInstance();
+ if (ds instanceof BaseDataSource) {
- }
+ BaseDataSource dataSource = (BaseDataSource) ds;
- public void shutdown() {
- super.shutdown();
- try {
+ dataSource.setDatabaseName(this.databaseName);
+ if (this.applName != null) {
+ dataSource.setApplicationName(this.applName);
+ }
- if (this.xaConnection != null) {
- this.xaConnection.close();
- }
- } catch (SQLException e) {
- // ignore..
+ ((TeiidDataSource) dataSource).setServerName(this.serverName);
+ ((TeiidDataSource) dataSource).setPortNumber(Integer.parseInt(this.portNumber));
+
+ if (this.username != null) {
+ dataSource.setUser(this.username);
+ dataSource.setPassword(this.pwd);
+ }
+
+ return ((XADataSource) dataSource).getXAConnection(this.username,
+ this.pwd);
+ }
+ Properties props = new Properties();
+ props.setProperty(DS_DATABASENAME, this.databaseName);
+ props.setProperty(DS_SERVERPORT, this.portNumber);
+ props.setProperty(DS_URL, this.url);
+ props.setProperty(DS_SERVERNAME, this.serverName);
+ if (this.username != null) {
+ props.setProperty(DS_USERNAME, this.username);
+ props.setProperty(DS_USER, this.username);
+ props.setProperty(DS_PASSWORD, this.pwd);
+ }
+
+ PropertiesUtils.setBeanProperties(ds, props, null);
+ return ((XADataSource) ds).getXAConnection();
}
- this.xaConnection = null;
- }
+ public void shutdown() {
+ super.shutdown();
+ try {
+
+ if (this.xaConnection != null) {
+ this.xaConnection.close();
+ }
+ } catch (SQLException e) {
+ // ignore..
+ }
+ this.xaConnection = null;
+ }
}
Modified: trunk/test-integration/db/src/main/resources/default-config.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/default-config.properties 2010-03-05 21:43:09 UTC (rev 1930)
+++ trunk/test-integration/db/src/main/resources/default-config.properties 2010-03-05 22:48:25 UTC (rev 1931)
@@ -35,6 +35,9 @@
mm.ds-jndiname=mmXA
usertxn-jndiname=java:comp/UserTransaction
+admin.url=mm://localhost:31443
+admin.user=admin
+admin.password=admin
# These mappings control what datasource is mapped to which model when the -Dusedatasources=<comma seperated datasource names> option is used
# or the system environment is set.
14 years, 10 months
teiid SVN: r1930 - trunk/test-integration.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-03-05 16:43:09 -0500 (Fri, 05 Mar 2010)
New Revision: 1930
Modified:
trunk/test-integration/pom.xml
Log:
TEIID-833: jboss-txnts no longer exists
Modified: trunk/test-integration/pom.xml
===================================================================
--- trunk/test-integration/pom.xml 2010-03-05 19:56:03 UTC (rev 1929)
+++ trunk/test-integration/pom.xml 2010-03-05 21:43:09 UTC (rev 1930)
@@ -64,10 +64,6 @@
<artifactId>teiid-engine</artifactId>
<type>test-jar</type>
</dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-txn-jbossts</artifactId>
- </dependency>
<!-- internal dependencies that are only used by integration testing -->
<dependency>
14 years, 10 months
teiid SVN: r1929 - in trunk: build/kit-jboss-container/deployers/teiid.deployer and 10 other directories.
by teiid-commits@lists.jboss.org
Author: rareddy
Date: 2010-03-05 14:56:03 -0500 (Fri, 05 Mar 2010)
New Revision: 1929
Modified:
trunk/build/kit-jboss-container/deploy/teiid/teiid-jboss-beans.xml
trunk/build/kit-jboss-container/deployers/teiid.deployer/teiid-deployer-jboss-beans.xml
trunk/client/src/main/java/org/teiid/adminapi/impl/AdminObjectImpl.java
trunk/client/src/main/java/org/teiid/adminapi/impl/ModelMetaData.java
trunk/client/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java
trunk/client/src/test/java/org/teiid/adminapi/impl/TestVDBMetaData.java
trunk/common-core/src/main/java/com/metamatrix/core/CoreConstants.java
trunk/common-core/src/main/java/com/metamatrix/core/vdb/VdbConstants.java
trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java
trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
trunk/runtime/src/main/java/org/teiid/deployers/DynamicVDBDeployer.java
trunk/runtime/src/main/java/org/teiid/deployers/ObjectSerializer.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBStructure.java
trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java
trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java
trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
trunk/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java
trunk/runtime/src/test/java/com/metamatrix/dqp/service/buffer/TestLocalBufferService.java
Log:
TEIID-998: Renaming the configurationInfo.def into vdb.xml and moving it find it in the META-INF folder. Fixed the clean up of the matadata cache files. Added the DQP Configuration as managable objects.
Modified: trunk/build/kit-jboss-container/deploy/teiid/teiid-jboss-beans.xml
===================================================================
--- trunk/build/kit-jboss-container/deploy/teiid/teiid-jboss-beans.xml 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/build/kit-jboss-container/deploy/teiid/teiid-jboss-beans.xml 2010-03-05 19:56:03 UTC (rev 1929)
@@ -20,23 +20,29 @@
<!-- Teiid Services -->
<bean name="AuthorizationService" class="org.teiid.services.AuthorizationServiceImpl">
<property name="VDBRepository"><inject bean="VDBRepository"/></property>
+ <!-- Turn on checking the entitlements on resources based on the roles defined in VDB -->
<property name="useEntitlements" class="java.lang.Boolean">false</property>
</bean>
<bean name="SessionService" class="org.teiid.services.SessionServiceImpl">
<property name="VDBRepository"><inject bean="VDBRepository"/></property>
<property name="securityHelper"><inject bean="SecurityHelper"/></property>
- <!-- Comma separated list of domains to be used -->
+ <!-- Comma separated list of domains to be used to login into Teiid using JDBC connection-->
<property name="securityDomains">teiid-security</property>
+ <!-- security domain to be used with Admin API (please do not change this, as this should be same as profile service) -->
<property name="adminSecurityDomain">jmx-console</property>
+ <!-- Maximum number of sessions allowed by the system (default 5000) -->
<property name="sessionMaxLimit">5000</property>
+ <!-- Max allowed time before the session is terminated by the system, 0 indicates unlimited (default 0) -->
<property name="sessionExpirationTimeLimit">0</property>
</bean>
<bean name="BufferService" class="org.teiid.services.BufferServiceImpl">
<property name="contextCache"><inject bean="ContextCache"/></property>
<property name="cacheFactory"><inject bean="TeiidCache"/></property>
+ <!-- Use disk for buffer management -->
<property name="useDisk">true</property>
+ <!-- Directory location for the buffer files -->
<property name="diskDirectory">${jboss.server.temp.dir}/teiid</property>
<!-- The max row count of a batch sent internally within the query processor. Should be <= the connectorBatchSize. (default 512) -->
<property name="processorBatchSize">512</property>
@@ -54,8 +60,9 @@
grouping, etc. (default 124)
-->
<property name="maxProcessingBatchesColumns">128</property>
- <!-- Max File size in MB -->
+ <!-- Max File size in MB (default 2GB)-->
<property name="maxFileSize">2024</property>
+ <!-- Max open buffer files (default 128) -->
<property name="maxOpenFiles">256</property>
</bean>
@@ -95,12 +102,12 @@
<property name="resultSetCacheEnabled">true</property>
</bean>
-
+ <!-- JDBC Socket connection properties (SSL see below) -->
<bean name="JdbcSocketConfiguration" class="org.teiid.transport.SocketConfiguration">
<property name="enabled">true</property>
<property name="bindAddress">localhost</property>
<property name="portNumber">31000</property>
- <!-- Max number of threads dedicated to Admin and initial request processing (default 15) -->
+ <!-- Max number of threads dedicated to initial request processing (default 15) -->
<property name="maxSocketThreads">15</property>
<!-- SO_RCVBUF size, 0 indicates that system default should be used (default 0) -->
<property name="inputBufferSize">0</property>
@@ -123,11 +130,12 @@
<property name="clientEncryptionEnabled">true</property>
</bean>
+ <!-- Admin Socket connection settings (SSL see below) -->
<bean name="AdminSocketConfiguration" class="org.teiid.transport.SocketConfiguration">
<property name="enabled">true</property>
<property name="bindAddress">localhost</property>
<property name="portNumber">31443</property>
- <!-- Max number of threads dedicated to Admin and initial request processing (default 15) -->
+ <!-- Max number of threads dedicated to Admin and initial request processing (default 4) -->
<property name="maxSocketThreads">4</property>
<!-- SO_RCVBUF size, 0 indicates that system default should be used (default 0) -->
<property name="inputBufferSize">0</property>
Modified: trunk/build/kit-jboss-container/deployers/teiid.deployer/teiid-deployer-jboss-beans.xml
===================================================================
--- trunk/build/kit-jboss-container/deployers/teiid.deployer/teiid-deployer-jboss-beans.xml 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/build/kit-jboss-container/deployers/teiid.deployer/teiid-deployer-jboss-beans.xml 2010-03-05 19:56:03 UTC (rev 1929)
@@ -14,9 +14,6 @@
<bean name="DynamicVDBDeployer" class="org.teiid.deployers.DynamicVDBDeployer">
- <property name="objectSerializer"><inject bean="ObjectSerializer"/></property>
- <property name="VDBRepository"><inject bean="VDBRepository"/></property>
- <property name="connectorManagerRepository"><inject bean="ConnectorManagerRepository"/></property>
</bean>
@@ -42,6 +39,7 @@
<property name="VDBRepository"><inject bean="VDBRepository"/></property>
<property name="contextCache"><inject bean="ContextCache"/></property>
<property name="objectSerializer"><inject bean="ObjectSerializer"/></property>
+ <property name="connectorManagerRepository"><inject bean="ConnectorManagerRepository"/></property>
<depends>SystemVDBDeployer</depends>
</bean>
Modified: trunk/client/src/main/java/org/teiid/adminapi/impl/AdminObjectImpl.java
===================================================================
--- trunk/client/src/main/java/org/teiid/adminapi/impl/AdminObjectImpl.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/client/src/main/java/org/teiid/adminapi/impl/AdminObjectImpl.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -80,7 +80,11 @@
@Override
public String getPropertyValue(String name) {
- return this.properties.getMap().get(name).getValue();
+ PropertyMetadata prop = this.properties.getMap().get(name);
+ if (prop == null) {
+ return null;
+ }
+ return prop.getValue();
}
public void addProperty(String key, String value) {
Modified: trunk/client/src/main/java/org/teiid/adminapi/impl/ModelMetaData.java
===================================================================
--- trunk/client/src/main/java/org/teiid/adminapi/impl/ModelMetaData.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/client/src/main/java/org/teiid/adminapi/impl/ModelMetaData.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -46,7 +46,7 @@
@XmlAccessorType(XmlAccessType.NONE)
@XmlType(name = "", propOrder = {
"JAXBProperties",
- "JAXBSources",
+ "sources",
"errors"
})
@ManagementObject(properties=ManagementProperties.EXPLICIT)
@@ -55,7 +55,8 @@
private static final String SUPPORTS_MULTI_SOURCE_BINDINGS_KEY = "supports-multi-source-bindings"; //$NON-NLS-1$
private static final long serialVersionUID = 3714234763056162230L;
- private ListOverMap<SourceMapping> sources = new ListOverMap(new KeyBuilder<SourceMapping>() {
+ @XmlElement(name = "source")
+ protected ListOverMap<SourceMapping> sources = new ListOverMap(new KeyBuilder<SourceMapping>() {
@Override
public String getKey(SourceMapping entry) {
return entry.getName();
@@ -66,7 +67,7 @@
protected String modelType = Type.PHYSICAL.name(); //$NON-NLS-1$
@XmlAttribute(name = "visible")
- private Boolean visible = true;
+ protected Boolean visible = true;
@XmlElement(name = "validation-error")
protected List<ValidationError> errors;
@@ -144,12 +145,6 @@
return new ArrayList<SourceMapping>(this.sources.getMap().values());
}
- @XmlElement(name = "source")
- protected List<SourceMapping> getJAXBSources(){
- // do not wrap this in another List object; we need direct access for jaxb
- return this.sources;
- }
-
@Override
public List<String> getSourceNames() {
return new ArrayList<String>(this.sources.getMap().keySet());
@@ -157,6 +152,9 @@
public String getSourceJndiName(String sourceName) {
SourceMapping s = this.sources.getMap().get(sourceName);
+ if (s == null) {
+ return null;
+ }
return s.getJndiName();
}
Modified: trunk/client/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java
===================================================================
--- trunk/client/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/client/src/main/java/org/teiid/adminapi/impl/VDBMetaData.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -45,12 +45,13 @@
import com.metamatrix.core.CoreConstants;
+
@ManagementObject(componentType=@ManagementComponent(type="teiid",subtype="vdb"))
@XmlAccessorType(XmlAccessType.NONE)
@XmlType(name = "", propOrder = {
"description",
"JAXBProperties",
- "JAXBModels",
+ "models",
"securityRoleMappings"
})
@XmlRootElement(name = "vdb")
@@ -59,7 +60,12 @@
private static final long serialVersionUID = -4723595252013356436L;
- private ListOverMap<ModelMetaData> models = new ListOverMap<ModelMetaData>(new KeyBuilder<ModelMetaData>() {
+ /**
+ * This simulating a list over a map. JAXB requires a list and performance recommends
+ * map and we would like to keep one variable to represent both.
+ */
+ @XmlElement(name = "model", required = true, type = ModelMetaData.class)
+ protected ListOverMap<ModelMetaData> models = new ListOverMap<ModelMetaData>(new KeyBuilder<ModelMetaData>() {
@Override
public String getKey(ModelMetaData entry) {
return entry.getName();
@@ -70,7 +76,7 @@
private int version = 1;
@XmlElement(name = "description")
- private String description;
+ protected String description;
@XmlElement(name = "role-mapping")
protected ListOverMap<ReferenceMappingMetadata> securityRoleMappings = new ListOverMap<ReferenceMappingMetadata>(new KeyBuilder<ReferenceMappingMetadata>() {
@@ -81,6 +87,7 @@
});
private String fileUrl = null;
+ private boolean dynamic = false;
public VDBMetaData() {
// auto add sytem model.
@@ -145,16 +152,6 @@
return new ArrayList<ModelMetaData>(this.models.getMap().values());
}
- /**
- * This simulating a list over a map. JAXB requires a list and performance recommends
- * map and we would like to keep one variable to represent both.
- * @return
- */
- @XmlElement(name = "model", required = true, type = ModelMetaData.class)
- protected List<ModelMetaData> getJAXBModels(){
- return models;
- }
-
public void addModel(ModelMetaData m) {
this.models.getMap().put(m.getName(), m);
}
@@ -202,6 +199,11 @@
if (resourceNames.isEmpty()) {
return false;
}
+ for (String sourceName:resourceNames) {
+ if (m.getSourceJndiName(sourceName) == null) {
+ return false;
+ }
+ }
}
}
return true;
@@ -248,4 +250,13 @@
protected List<PropertyMetadata> getJAXBProperties(){
return super.getJAXBProperties();
}
+
+ @ManagementProperty(description="Is this a Dynamic VDB")
+ public boolean isDynamic() {
+ return dynamic;
+ }
+
+ public void setDynamic(boolean dynamic) {
+ this.dynamic = dynamic;
+ }
}
Modified: trunk/client/src/test/java/org/teiid/adminapi/impl/TestVDBMetaData.java
===================================================================
--- trunk/client/src/test/java/org/teiid/adminapi/impl/TestVDBMetaData.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/client/src/test/java/org/teiid/adminapi/impl/TestVDBMetaData.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -83,6 +83,7 @@
// UnMarshell
Unmarshaller un = jc.createUnmarshaller();
+ un.setSchema(schema);
vdb = (VDBMetaData)un.unmarshal(new StringReader(sw.toString()));
assertEquals("myVDB", vdb.getName());
Modified: trunk/common-core/src/main/java/com/metamatrix/core/CoreConstants.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/core/CoreConstants.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/common-core/src/main/java/com/metamatrix/core/CoreConstants.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -22,7 +22,6 @@
package com.metamatrix.core;
-import com.metamatrix.core.vdb.VdbConstants;
/**
* @since 4.0
@@ -55,10 +54,6 @@
public static final String SYSTEM_VDB = "System.vdb"; //$NON-NLS-1$
- public static final String EXPORTED_VDB_FILE_EXTENSION = VdbConstants.VDB_DEF_FILE_EXTENSION;
-
- public static final String VDB_ARCHIVE_EXTENSION = VdbConstants.VDB_ARCHIVE_EXTENSION;
-
public static final String PRODUCT_OWNER_NAME_PROPERTY = "ownerName"; //$NON-NLS-1$
/**
Modified: trunk/common-core/src/main/java/com/metamatrix/core/vdb/VdbConstants.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/core/vdb/VdbConstants.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/common-core/src/main/java/com/metamatrix/core/vdb/VdbConstants.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -29,20 +29,10 @@
*/
public interface VdbConstants {
- public static final String DEF_FILE_NAME = "ConfigurationInfo.def"; // !!! DO NOT CHANGE VALUE as this would cause problems with existing VDBs having DEF files !!! //$NON-NLS-1$
- public static final String DATA_ROLES_FILE = "dataroles.xml"; //$NON-NLS-1$
- public static final String VDB_DEF_FILE_EXTENSION = ".def"; //$NON-NLS-1$
+ public static final String DEPLOYMENT_FILE = "vdb.xml"; // !!! DO NOT CHANGE VALUE as this would cause problems with existing VDBs having DEF files !!! //$NON-NLS-1$
public static final String VDB_ARCHIVE_EXTENSION = ".vdb"; //$NON-NLS-1$
- public static final String MATERIALIZATION_MODEL_NAME = "MaterializationModel"; //$NON-NLS-1$
- public static final String MATERIALIZATION_MODEL_FILE_SUFFIX = ".xmi"; //$NON-NLS-1$
- public static final String MANIFEST_MODEL_NAME = "MetaMatrix-VdbManifestModel.xmi"; //$NON-NLS-1$
- public static final String WSDL_FILENAME = "MetaMatrixDataServices.wsdl"; //$NON-NLS-1$
public final static String INDEX_EXT = ".INDEX"; //$NON-NLS-1$
public final static String SEARCH_INDEX_EXT = ".SEARCH_INDEX"; //$NON-NLS-1$
public final static String MODEL_EXT = ".xmi"; //$NON-NLS-1$
public final static String UDF_FILE_NAME = "FunctionDefinitions.xmi"; //$NON-NLS-1$
-
- public static final String VDB = ".vdb"; //$NON-NLS-1$
- public static final String DEF = ".def"; //$NON-NLS-1$
-
}
Modified: trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/engine/src/main/java/org/teiid/dqp/internal/process/DQPConfiguration.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -21,6 +21,8 @@
*/
package org.teiid.dqp.internal.process;
+import org.jboss.managed.api.annotation.ManagementProperty;
+
import com.metamatrix.dqp.message.RequestMessage;
public class DQPConfiguration{
@@ -46,11 +48,10 @@
private int codeTablesMaxCount = DEFAULT_MAX_CODE_TABLES;
private int codeTablesMaxRowsPerTable = DEFAULT_MAX_CODE_TABLE_RECORDS;
private int codeTablesMaxRows = DEFAULT_MAX_CODE_RECORDS;
- private String bindAddress = "localhost";
- private int portNumber = 31000;
- private boolean resultSetCacheEnabled = false;
+ private boolean resultSetCacheEnabled = true;
private int maxResultSetCacheEntries = DQPConfiguration.DEFAULT_MAX_RESULTSET_CACHE_ENTRIES;
+ @ManagementProperty (description="Name of the process that uniquely identifies this process")
public String getProcessName() {
return processName;
}
@@ -59,6 +60,7 @@
this.processName = processName;
}
+ @ManagementProperty(description="Process pool maximum thread count. (default 16) Increase this value if your load includes a large number of XQueries or if the system's available processors is larger than 8")
public int getMaxThreads() {
return maxThreads;
}
@@ -67,6 +69,7 @@
this.maxThreads = maxThreads;
}
+ @ManagementProperty(description="Query processor time slice, in milliseconds. (default 2000)")
public int getTimeSliceInMilli() {
return timeSliceInMilli;
}
@@ -75,6 +78,7 @@
this.timeSliceInMilli = timeSliceInMilli;
}
+ @ManagementProperty(description="Process debug allowed")
public boolean isProcessDebugAllowed() {
return processDebugAllowed;
}
@@ -83,6 +87,7 @@
this.processDebugAllowed = processDebugAllowed;
}
+ @ManagementProperty(description="Maximum allowed fetch size, set via JDBC. User requested value ignored above this value. (default 20480)")
public int getMaxRowsFetchSize() {
return maxRowsFetchSize;
}
@@ -91,30 +96,34 @@
this.maxRowsFetchSize = maxRowsFetchSize;
}
+ @ManagementProperty(description="The max lob chunk size in KB transferred each time when processing blobs, clobs(100KB default)")
public int getLobChunkSizeInKB() {
- return lobChunkSizeInKB;
+ return this.lobChunkSizeInKB;
}
public void setLobChunkSizeInKB(int lobChunkSizeInKB) {
this.lobChunkSizeInKB = lobChunkSizeInKB;
}
+ @ManagementProperty(description="The maximum number of query plans that are cached. Note: this is a memory based cache. (default 250)")
public int getPreparedPlanCacheMaxCount() {
- return preparedPlanCacheMaxCount;
+ return this.preparedPlanCacheMaxCount;
}
public void setPreparedPlanCacheMaxCount(int preparedPlanCacheMaxCount) {
this.preparedPlanCacheMaxCount = preparedPlanCacheMaxCount;
}
+ @ManagementProperty(description="Maximum number of cached lookup tables. Note: this is a memory based cache. (default 200)")
public int getCodeTablesMaxCount() {
- return codeTablesMaxCount;
+ return this.codeTablesMaxCount;
}
public void setCodeTablesMaxCount(int codeTablesMaxCount) {
this.codeTablesMaxCount = codeTablesMaxCount;
}
+ @ManagementProperty(description="Maximum number of records in a single lookup table (default 10000)")
public int getCodeTablesMaxRowsPerTable() {
return codeTablesMaxRowsPerTable;
}
@@ -123,30 +132,16 @@
this.codeTablesMaxRowsPerTable = codeTablesMaxRowsPerTable;
}
+ @ManagementProperty(description="Maximum number of records in all lookup tables (default 200000)")
public int getCodeTablesMaxRows() {
- return codeTablesMaxRows;
+ return this.codeTablesMaxRows;
}
public void setCodeTablesMaxRows(int codeTablesMaxRows) {
this.codeTablesMaxRows = codeTablesMaxRows;
}
- public String getBindAddress() {
- return bindAddress;
- }
-
- public void setBindAddress(String bindAddress) {
- this.bindAddress = bindAddress;
- }
-
- public int getPortNumber() {
- return portNumber;
- }
-
- public void setPortNumber(int portNumber) {
- this.portNumber = portNumber;
- }
-
+ @ManagementProperty(description="The maximum number of result set cache entries. 0 indicates no limit. (default 1024)")
public int getResultSetCacheMaxEntries() {
return this.maxResultSetCacheEntries;
}
@@ -155,6 +150,7 @@
this.maxResultSetCacheEntries = value;
}
+ @ManagementProperty(description="Denotes whether or not result set caching is enabled. (default true)")
public boolean isResultSetCacheEnabled() {
return this.resultSetCacheEnabled;
}
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/deployers/RuntimeEngineDeployer.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -86,6 +86,7 @@
@ManagementObject(isRuntime=true, componentType=@ManagementComponent(type="teiid",subtype="dqp"), properties=ManagementProperties.EXPLICIT)
public class RuntimeEngineDeployer extends DQPConfiguration implements DQPManagement, Serializable , ClientServiceRegistry {
+ private static final long serialVersionUID = -4676205340262775388L;
protected Logger log = Logger.getLogger(getClass());
Modified: trunk/runtime/src/main/java/org/teiid/deployers/DynamicVDBDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/DynamicVDBDeployer.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/runtime/src/main/java/org/teiid/deployers/DynamicVDBDeployer.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -21,31 +21,14 @@
*/
package org.teiid.deployers;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-
-import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller;
-import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.virtual.VirtualFile;
-import org.teiid.adminapi.impl.ModelMetaData;
import org.teiid.adminapi.impl.VDBMetaData;
-import org.teiid.connector.api.ConnectorException;
-import org.teiid.connector.metadata.runtime.MetadataStore;
-import org.teiid.dqp.internal.datamgr.impl.ConnectorManager;
-import org.teiid.dqp.internal.datamgr.impl.ConnectorManagerRepository;
-import org.teiid.metadata.CompositeMetadataStore;
-import com.metamatrix.core.CoreConstants;
-
public class DynamicVDBDeployer extends AbstractVFSParsingDeployer<VDBMetaData> {
- private VDBRepository vdbRepository;
- private ConnectorManagerRepository connectorManagerRepository;
- private ObjectSerializer serializer;
public DynamicVDBDeployer() {
super(VDBMetaData.class);
@@ -54,87 +37,16 @@
@Override
protected VDBMetaData parse(VFSDeploymentUnit unit, VirtualFile file, VDBMetaData root) throws Exception {
- JAXBContext jc = JAXBContext.newInstance(new Class<?>[] {VDBMetaData.class});
- Unmarshaller un = jc.createUnmarshaller();
- VDBMetaData def = (VDBMetaData)un.unmarshal(file.openStream());
+ Unmarshaller un = VDBParserDeployer.getUnMarsheller();
+ VDBMetaData vdb = (VDBMetaData)un.unmarshal(file.openStream());
- def.setUrl(unit.getRoot().toURL().toExternalForm());
+ vdb.setUrl(unit.getRoot().toURL().toExternalForm());
+ vdb.setDynamic(true);
log.debug("VDB "+unit.getRoot().getName()+" has been parsed.");
+ // The loading of metadata from data sources will be done during the real deploy
+ // as the resources are guaranteed to be available by that time.
- ArrayList<MetadataStore> stores = new ArrayList<MetadataStore>();
- for (ModelMetaData model:def.getModels()) {
- if (model.getName().equals(CoreConstants.SYSTEM_MODEL)){
- continue;
- }
- stores.add(buildDynamicMetadataStore(unit, def, model));
- }
-
- CompositeMetadataStore store = new CompositeMetadataStore(stores);
- unit.addAttachment(CompositeMetadataStore.class, store);
-
- return def;
+ return vdb;
}
-
- private MetadataStore buildDynamicMetadataStore(VFSDeploymentUnit unit, VDBMetaData vdb, ModelMetaData model) throws DeploymentException{
- if (model.getSourceNames().isEmpty()) {
- throw new DeploymentException(vdb.getName()+"-"+vdb.getVersion()+" Can not be deployed because model {"+model.getName()+"} is not fully configured.");
- }
-
- boolean cache = "cached".equalsIgnoreCase(vdb.getPropertyValue("UseConnectorMetadata"));
- File cacheFile = null;
- if (cache) {
- try {
- cacheFile = buildCachedFileName(unit, vdb,model.getName());
- if (cacheFile.exists()) {
- return this.serializer.loadAttachment(cacheFile, MetadataStore.class);
- }
- } catch (IOException e) {
- log.warn("invalid metadata in file = "+cacheFile.getAbsolutePath());
- } catch (ClassNotFoundException e) {
- log.warn("invalid metadata in file = "+cacheFile.getAbsolutePath());
- }
- }
-
-
- Exception exception = null;
- for (String connectorName: model.getSourceNames()) {
- ConnectorManager cm = this.connectorManagerRepository.getConnectorManager(connectorName);
- if (cm == null) {
- continue;
- }
- try {
- MetadataStore store = cm.getMetadata(model.getName(), this.vdbRepository.getBuiltinDatatypes(), model.getProperties());
- if (cache) {
- this.serializer.saveAttachment(cacheFile, store);
- }
- return store;
- } catch (ConnectorException e) {
- if (exception != null) {
- exception = e;
- }
- } catch (IOException e) {
- if (exception != null) {
- exception = e;
- }
- }
- }
- throw new DeploymentException(vdb.getName()+"-"+vdb.getVersion()+" Can not be deployed because model {"+model.getName()+"} can not retrive metadata", exception);
- }
-
- public void setVDBRepository(VDBRepository repo) {
- this.vdbRepository = repo;
- }
-
- public void setConnectorManagerRepository(ConnectorManagerRepository repo) {
- this.connectorManagerRepository = repo;
- }
-
- public void setObjectSerializer(ObjectSerializer serializer) {
- this.serializer = serializer;
- }
-
- private File buildCachedFileName(VFSDeploymentUnit unit, VDBMetaData vdb, String modelName) throws IOException {
- return this.serializer.getAttachmentPath(unit, vdb.getName()+"_"+vdb.getVersion()+"_"+modelName);
- }
}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/ObjectSerializer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/ObjectSerializer.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/runtime/src/main/java/org/teiid/deployers/ObjectSerializer.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -27,7 +27,6 @@
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import java.net.URISyntaxException;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.logging.Logger;
@@ -79,12 +78,12 @@
}
}
- public void removeAttachments(VFSDeploymentUnit vf) throws IOException {
+ public void removeAttachments(VFSDeploymentUnit vf) {
String dirName = baseDirectory(vf);
FileUtils.removeDirectoryAndChildren(new File(dirName));
}
- public File getAttachmentPath(VFSDeploymentUnit vf, String baseName) throws IOException {
+ public File getAttachmentPath(VFSDeploymentUnit vf, String baseName) {
String dirName = baseDirectory(vf);
@@ -96,9 +95,9 @@
return f;
}
- private String baseDirectory(VFSDeploymentUnit vf) throws IOException {
+ private String baseDirectory(VFSDeploymentUnit vf) {
String fileName = vf.getRoot().getName();
- String dirName = this.storagePath + File.separator + fileName + "-"+ vf.getRoot().getLastModified()+ File.separator;
+ String dirName = this.storagePath + File.separator + fileName + File.separator;
return dirName;
}
}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -23,6 +23,7 @@
import java.io.File;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
@@ -43,13 +44,17 @@
import org.teiid.adminapi.VDB;
import org.teiid.adminapi.impl.ModelMetaData;
import org.teiid.adminapi.impl.VDBMetaData;
+import org.teiid.connector.api.ConnectorException;
import org.teiid.connector.metadata.runtime.MetadataStore;
import org.teiid.dqp.internal.cache.DQPContextCache;
+import org.teiid.dqp.internal.datamgr.impl.ConnectorManager;
+import org.teiid.dqp.internal.datamgr.impl.ConnectorManagerRepository;
import org.teiid.metadata.CompositeMetadataStore;
import org.teiid.metadata.TransformationMetadata;
import org.teiid.metadata.index.IndexMetadataFactory;
import com.metamatrix.core.CoreConstants;
+import com.metamatrix.core.util.FileUtils;
import com.metamatrix.query.function.metadata.FunctionMethod;
import com.metamatrix.query.metadata.QueryMetadataInterface;
@@ -57,6 +62,7 @@
protected Logger log = Logger.getLogger(getClass());
private ManagedObjectFactory mof;
private VDBRepository vdbRepository;
+ private ConnectorManagerRepository connectorManagerRepository;
private DQPContextCache contextCache;
private ObjectSerializer serializer;
@@ -84,8 +90,20 @@
// get the metadata store of the VDB (this is build in parse stage)
CompositeMetadataStore store = unit.getAttachment(CompositeMetadataStore.class);
- this.vdbRepository.addMetadataStore(deployment, store);
+ // if store is null and vdb dynamic vdb then try to get the metadata
+ if (store == null && deployment.isDynamic()) {
+ ArrayList<MetadataStore> stores = new ArrayList<MetadataStore>();
+ for (ModelMetaData model:deployment.getModels()) {
+ if (model.getName().equals(CoreConstants.SYSTEM_MODEL)){
+ continue;
+ }
+ stores.add(buildDynamicMetadataStore((VFSDeploymentUnit)unit, deployment, model));
+ }
+ store = new CompositeMetadataStore(stores);
+ unit.addAttachment(CompositeMetadataStore.class, store);
+ }
+
// check if this is a VDB with index files, if there are then build the TransformationMetadata
IndexMetadataFactory indexFactory = unit.getAttachment(IndexMetadataFactory.class);
UDFMetaData udf = unit.getAttachment(UDFMetaData.class);
@@ -106,7 +124,24 @@
// add transformation metadata to the repository.
this.vdbRepository.addMetadata(deployment, metadata);
+ this.vdbRepository.addMetadataStore(deployment, store);
+
+ try {
+ saveMetadataStore((VFSDeploymentUnit)unit, deployment, metadata.getMetadataStore());
+ } catch (IOException e1) {
+ log.warn("failed to save metadata for VDB "+deployment.getName()+"."+deployment.getVersion(), e1);
+ }
+ boolean valid = validateSources(deployment);
+
+ // Check if the VDB is fully configured.
+ if (valid) {
+ deployment.setStatus(VDB.Status.ACTIVE);
+ }
+ log.info("VDB = "+deployment + " deployed");
+ }
+
+ private boolean validateSources(VDBMetaData deployment) {
boolean valid = true;
for(ModelMetaData model:deployment.getModels()) {
for (String sourceName:model.getSourceNames()) {
@@ -122,12 +157,7 @@
}
}
}
-
- // Check if the VDB is fully configured.
- if (valid) {
- deployment.setStatus(VDB.Status.ACTIVE);
- }
- log.info("VDB = "+deployment + " deployed");
+ return valid;
}
@@ -196,12 +226,7 @@
}
try {
- if (((VFSDeploymentUnit)unit).getRoot().exists()) {
- File cacheFileName = this.serializer.getAttachmentPath((VFSDeploymentUnit)unit, deployment.getName()+"_"+deployment.getVersion());
- if (cacheFileName.exists()) {
- cacheFileName.delete();
- }
- }
+ deleteMetadataStore((VFSDeploymentUnit)unit, deployment);
} catch (IOException e) {
log.warn("failed to delete the cached metadata files due to:" + e.getMessage());
}
@@ -217,4 +242,73 @@
this.serializer = serializer;
}
+ public void setConnectorManagerRepository(ConnectorManagerRepository repo) {
+ this.connectorManagerRepository = repo;
+ }
+
+ private void saveMetadataStore(VFSDeploymentUnit unit, VDBMetaData vdb, CompositeMetadataStore store) throws IOException {
+ File cacheFileName = this.serializer.getAttachmentPath(unit, vdb.getName()+"_"+vdb.getVersion());
+ if (!cacheFileName.exists()) {
+ this.serializer.saveAttachment(cacheFileName,store);
+ }
+ }
+
+ private void deleteMetadataStore(VFSDeploymentUnit unit, VDBMetaData vdb) throws IOException {
+ if (!unit.getRoot().exists()) {
+ File cacheFileName = this.serializer.getAttachmentPath(unit, vdb.getName()+"_"+vdb.getVersion());
+ if (cacheFileName.exists()) {
+ FileUtils.removeDirectoryAndChildren(cacheFileName.getParentFile());
+ }
+ }
+ }
+
+ private MetadataStore buildDynamicMetadataStore(VFSDeploymentUnit unit, VDBMetaData vdb, ModelMetaData model) throws DeploymentException{
+ if (model.getSourceNames().isEmpty()) {
+ throw new DeploymentException(vdb.getName()+"-"+vdb.getVersion()+" Can not be deployed because model {"+model.getName()+"} is not fully configured.");
+ }
+
+ boolean cache = "cached".equalsIgnoreCase(vdb.getPropertyValue("UseConnectorMetadata"));
+ File cacheFile = null;
+ if (cache) {
+ try {
+ cacheFile = buildCachedFileName(unit, vdb,model.getName());
+ if (cacheFile.exists()) {
+ return this.serializer.loadAttachment(cacheFile, MetadataStore.class);
+ }
+ } catch (IOException e) {
+ log.warn("invalid metadata in file = "+cacheFile.getAbsolutePath());
+ } catch (ClassNotFoundException e) {
+ log.warn("invalid metadata in file = "+cacheFile.getAbsolutePath());
+ }
+ }
+
+
+ Exception exception = null;
+ for (String sourceName: model.getSourceNames()) {
+ ConnectorManager cm = this.connectorManagerRepository.getConnectorManager(model.getSourceJndiName(sourceName));
+ if (cm == null) {
+ continue;
+ }
+ try {
+ MetadataStore store = cm.getMetadata(model.getName(), this.vdbRepository.getBuiltinDatatypes(), model.getProperties());
+ if (cache) {
+ this.serializer.saveAttachment(cacheFile, store);
+ }
+ return store;
+ } catch (ConnectorException e) {
+ if (exception != null) {
+ exception = e;
+ }
+ } catch (IOException e) {
+ if (exception != null) {
+ exception = e;
+ }
+ }
+ }
+ throw new DeploymentException(vdb.getName()+"-"+vdb.getVersion()+" Can not be deployed because model {"+model.getName()+"} can not retrive metadata", exception);
+ }
+
+ private File buildCachedFileName(VFSDeploymentUnit unit, VDBMetaData vdb, String modelName) {
+ return this.serializer.getAttachmentPath(unit, vdb.getName()+"_"+vdb.getVersion()+"_"+modelName);
+ }
}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -27,8 +27,12 @@
import java.util.List;
import java.util.Map;
+import javax.xml.XMLConstants;
import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.logging.Logger;
@@ -38,6 +42,7 @@
import org.teiid.metadata.CompositeMetadataStore;
import org.teiid.metadata.index.IndexConstants;
import org.teiid.metadata.index.IndexMetadataFactory;
+import org.xml.sax.SAXException;
import com.metamatrix.core.CoreConstants;
import com.metamatrix.core.util.StringUtil;
@@ -45,7 +50,7 @@
import com.metamatrix.query.function.metadata.FunctionMetadataReader;
/**
- * This file loads the ".def" file and "manifest" file inside a VDB file.
+ * This file loads the "vdb.xml" file inside a ".vdb" file, along with all the metadata in the .INDEX files
*/
public class VDBParserDeployer extends BaseMultipleVFSParsingDeployer<VDBMetaData> {
protected Logger log = Logger.getLogger(getClass());
@@ -58,7 +63,7 @@
private static Map<String, Class<?>> getCustomMappings() {
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
- mappings.put(VdbConstants.DEF_FILE_NAME, VDBMetaData.class);
+ mappings.put(VdbConstants.DEPLOYMENT_FILE, VDBMetaData.class);
mappings.put(VdbConstants.UDF_FILE_NAME, UDFMetaData.class);
return mappings;
}
@@ -66,8 +71,7 @@
@Override
protected <U> U parse(VFSDeploymentUnit unit, Class<U> expectedType, VirtualFile file, Object root) throws Exception {
if (expectedType.equals(VDBMetaData.class)) {
- JAXBContext jc = JAXBContext.newInstance(new Class<?>[] {VDBMetaData.class});
- Unmarshaller un = jc.createUnmarshaller();
+ Unmarshaller un = getUnMarsheller();
VDBMetaData def = (VDBMetaData)un.unmarshal(file.openStream());
return expectedType.cast(def);
@@ -92,6 +96,15 @@
throw new IllegalArgumentException("Cannot match arguments: expectedClass=" + expectedType );
}
}
+
+ static Unmarshaller getUnMarsheller() throws JAXBException, SAXException {
+ JAXBContext jc = JAXBContext.newInstance(new Class<?>[] {VDBMetaData.class});
+ SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+ Schema schema = schemaFactory.newSchema(VDBMetaData.class.getResource("/vdb-deployer.xsd"));
+ Unmarshaller un = jc.createUnmarshaller();
+ un.setSchema(schema);
+ return un;
+ }
@Override
protected VDBMetaData mergeMetaData(VFSDeploymentUnit unit, Map<Class<?>, List<Object>> metadata) throws Exception {
@@ -129,7 +142,6 @@
}
else {
store = new CompositeMetadataStore(imf.getMetadataStore());
- this.serializer.saveAttachment(cacheFileName,store);
}
unit.addAttachment(CompositeMetadataStore.class, store);
}
@@ -170,20 +182,11 @@
return false;
}
- // manifest file should not be visible
- if(entry.equalsIgnoreCase(VdbConstants.MANIFEST_MODEL_NAME)) {
+ // deployment file should not be visible
+ if(entry.equalsIgnoreCase(VdbConstants.DEPLOYMENT_FILE)) {
return false;
}
- // materialization models should not be visible
- if(entry.startsWith(VdbConstants.MATERIALIZATION_MODEL_NAME) && entry.endsWith(VdbConstants.MODEL_EXT)) {
- return false;
- }
-
- // wldl file should be visible
- if(entry.equalsIgnoreCase(VdbConstants.WSDL_FILENAME)) {
- return false;
- }
// any other file should be visible
return true;
}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBStructure.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBStructure.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBStructure.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -45,10 +45,16 @@
try {
if (isLeaf(file) == false) {
if (file.getName().endsWith(".vdb")) {
- if (file.getChild(VdbConstants.DEF_FILE_NAME) == null) {
+
+ VirtualFile metainf = file.getChild("META-INF");
+ if (metainf == null) {
return false;
}
- createContext(structureContext, new String[] {"/", "runtime-inf"});
+
+ if (metainf.getChild(VdbConstants.DEPLOYMENT_FILE) == null) {
+ return false;
+ }
+ createContext(structureContext, new String[] {"/", "META-INF", "runtime-inf"});
return true;
}
}
Modified: trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/runtime/src/main/java/org/teiid/services/AuthorizationServiceImpl.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -34,6 +34,10 @@
import java.util.List;
import java.util.Set;
+import org.jboss.managed.api.annotation.ManagementComponent;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementProperties;
+import org.jboss.managed.api.annotation.ManagementProperty;
import org.teiid.adminapi.AdminRoles;
import org.teiid.adminapi.impl.VDBMetaData;
import org.teiid.deployers.VDBRepository;
@@ -75,6 +79,7 @@
* have the proper administrative role.
* </p>
*/
+@ManagementObject(componentType=@ManagementComponent(type="teiid",subtype="dqp"), properties=ManagementProperties.EXPLICIT)
public class AuthorizationServiceImpl implements AuthorizationService, Serializable {
private static final long serialVersionUID = 5399603007837606243L;
@@ -396,10 +401,12 @@
* @return <code>true</code> iff server-side entitlements checking is enabled.
*/
@Override
+ @ManagementProperty(description="Turn on checking the entitlements on resources based on the roles defined in VDB", readOnly=true)
public boolean checkingEntitlements() {
return useEntitlements;
}
+
/**
* Create realm based on token
* @param token Used to find info about this session
Modified: trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/runtime/src/main/java/org/teiid/services/BufferServiceImpl.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -26,6 +26,10 @@
import java.io.IOException;
import java.io.Serializable;
+import org.jboss.managed.api.annotation.ManagementComponent;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementProperties;
+import org.jboss.managed.api.annotation.ManagementProperty;
import org.teiid.dqp.internal.cache.DQPContextCache;
import com.metamatrix.api.exception.MetaMatrixComponentException;
@@ -44,6 +48,7 @@
* a mixed disk/memory model which requires use of a directory on the disk
* for file service access.
*/
+@ManagementObject(componentType=@ManagementComponent(type="teiid",subtype="dqp"), properties=ManagementProperties.EXPLICIT)
public class BufferServiceImpl implements BufferService, Serializable {
private static final long serialVersionUID = -6217808623863643531L;
@@ -53,13 +58,12 @@
private BufferManagerImpl bufferMgr;
private File bufferDir;
private boolean useDisk = true;
- private int memorySize = 64;
private DQPContextCache contextCache;
- private int processorBatchSize = 2000;
- private int connectorBatchSize = 2000;
+ private int processorBatchSize = 256;
+ private int connectorBatchSize = 512;
private CacheFactory cacheFactory;
private int maxOpenFiles = DEFAULT_MAX_OPEN_FILES;
- private long maxFileSize = 2L; // 2GB
+ private long maxFileSize = 2048; // 2GB
private int maxProcessingBatchesColumns = BufferManager.DEFAULT_MAX_PROCESSING_BATCHES;
private int maxReserveBatchColumns = BufferManager.DEFAULT_RESERVE_BUFFERS;
@@ -147,10 +151,6 @@
}
}
- public void setBufferMemorySizeInMB(int size) {
- this.memorySize = size;
- }
-
public void setProcessorBatchSize(int size) {
this.processorBatchSize = size;
}
@@ -163,19 +163,17 @@
}
public boolean isUseDisk() {
- return useDisk;
+ return this.useDisk;
}
- public int getBufferMemorySizeInMB() {
- return memorySize;
- }
-
+ @ManagementProperty(description="The max row count of a batch sent internally within the query processor. Should be <= the connectorBatchSize. (default 256)")
public int getProcessorBatchSize() {
- return processorBatchSize;
+ return this.processorBatchSize;
}
+ @ManagementProperty(description="The max row count of a batch from a connector. Should be even multiple of processorBatchSize. (default 512)")
public int getConnectorBatchSize() {
- return connectorBatchSize;
+ return this.connectorBatchSize;
}
@Override
@@ -202,4 +200,28 @@
public void setMaxProcessingBatchesColumns(int value) {
this.maxProcessingBatchesColumns = value;
}
+
+ @ManagementProperty(description="Max open buffer files (default 128)")
+ public int getMaxOpenFiles() {
+ return maxOpenFiles;
+ }
+
+ @ManagementProperty(description="Max file size for buffer files (default 2GB)")
+ public long getMaxFileSize() {
+ return maxFileSize;
+ }
+
+ @ManagementProperty(description="#The number of batch columns guarenteed to a processing operation. Set this value lower if the workload typically" +
+ "processes larger numbers of concurrent queries with large intermediate results from operations such as sorting, " +
+ "grouping, etc. (default 124)")
+ public int getMaxProcessingBatchesColumns() {
+ return maxProcessingBatchesColumns;
+ }
+
+ @ManagementProperty(description="#The number of batch columns to allow in memory (default 16384). " +
+ "This value should be set lower or higher depending on the available memory to Teiid in the VM. " +
+ "16384 is considered a good default for a dedicated 32-bit VM running Teiid with a 1 gig heap.")
+ public int getMaxReserveBatchColumns() {
+ return maxReserveBatchColumns;
+ }
}
Modified: trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/runtime/src/main/java/org/teiid/services/SessionServiceImpl.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -37,6 +37,10 @@
import javax.security.auth.login.LoginContext;
import javax.security.auth.login.LoginException;
+import org.jboss.managed.api.annotation.ManagementComponent;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementProperties;
+import org.jboss.managed.api.annotation.ManagementProperty;
import org.teiid.SecurityHelper;
import org.teiid.adminapi.impl.SessionMetadata;
import org.teiid.adminapi.impl.VDBMetaData;
@@ -59,6 +63,7 @@
/**
* This class serves as the primary implementation of the Session Service.
*/
+@ManagementObject(componentType=@ManagementComponent(type="teiid",subtype="dqp"), properties=ManagementProperties.EXPLICIT)
public class SessionServiceImpl implements SessionService {
public static final String SECURITY_DOMAINS = "securitydomains"; //$NON-NLS-1$
@@ -67,6 +72,7 @@
*/
private long sessionMaxLimit = DEFAULT_MAX_SESSIONS;
private long sessionExpirationTimeLimit = DEFAULT_SESSION_EXPIRATION;
+
/*
* Injected state
*/
@@ -279,12 +285,22 @@
return info;
}
- public void setSessionMaxLimit(Long limit) {
- this.sessionMaxLimit = limit.longValue();
+ @ManagementProperty (description="Maximum number of sessions allowed by the system (default 5000)")
+ public long getSessionMaxLimit() {
+ return this.sessionMaxLimit;
}
- public void setsessionExpirationTimeLimit(Long limit) {
- this.sessionExpirationTimeLimit = limit.longValue();
+ public void setSessionMaxLimit(long limit) {
+ this.sessionMaxLimit = limit;
+ }
+
+ @ManagementProperty(description="Max allowed time before the session is terminated by the system, 0 indicates unlimited (default 0)")
+ public long getSessionExpirationTimeLimit() {
+ return this.sessionExpirationTimeLimit;
+ }
+
+ public void setSessionExpirationTimeLimit(long limit) {
+ this.sessionExpirationTimeLimit = limit;
}
public void setSecurityDomains(String domainNameOrder) {
Modified: trunk/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/runtime/src/main/java/org/teiid/transport/SocketConfiguration.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -24,9 +24,15 @@
import java.net.InetAddress;
import java.net.UnknownHostException;
+import org.jboss.managed.api.annotation.ManagementComponent;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementProperties;
+import org.jboss.managed.api.annotation.ManagementProperty;
+
import com.metamatrix.common.util.NetUtils;
import com.metamatrix.core.MetaMatrixRuntimeException;
+@ManagementObject(componentType=@ManagementComponent(type="teiid",subtype="dqp"), properties=ManagementProperties.EXPLICIT)
public class SocketConfiguration {
private int outputBufferSize;
private int inputBufferSize;
@@ -35,9 +41,11 @@
private InetAddress hostAddress;
private SSLConfiguration sslConfiguration;
private boolean enabled;
+ private String hostName;
public void setBindAddress(String addr) {
+ this.hostName = addr;
this.hostAddress = resolveHostAddress(addr);
}
@@ -72,6 +80,7 @@
}
}
+ @ManagementProperty(description="SSL enabled", readOnly=true)
public boolean isEnabled() {
return enabled;
}
@@ -80,18 +89,22 @@
this.enabled = enabled;
}
+ @ManagementProperty(description="SO_SNDBUF size, 0 indicates that system default should be used (default 0)",readOnly=true)
public int getOutputBufferSize() {
return outputBufferSize;
}
+ @ManagementProperty(description="SO_RCVBUF size, 0 indicates that system default should be used (default 0)",readOnly=true)
public int getInputBufferSize() {
return inputBufferSize;
}
+ @ManagementProperty(description="Max NIO threads",readOnly=true)
public int getMaxSocketThreads() {
return maxSocketThreads;
}
+ @ManagementProperty(description="Port Number",readOnly=true)
public int getPortNumber() {
return portNumber;
}
@@ -99,6 +112,11 @@
public InetAddress getHostAddress() {
return hostAddress;
}
+
+ @ManagementProperty(description="Host Name",readOnly=true)
+ public String getHostName() {
+ return this.hostName;
+ }
public SSLConfiguration getSSLConfiguration() {
return sslConfiguration;
Modified: trunk/runtime/src/test/java/com/metamatrix/dqp/service/buffer/TestLocalBufferService.java
===================================================================
--- trunk/runtime/src/test/java/com/metamatrix/dqp/service/buffer/TestLocalBufferService.java 2010-03-05 19:50:20 UTC (rev 1928)
+++ trunk/runtime/src/test/java/com/metamatrix/dqp/service/buffer/TestLocalBufferService.java 2010-03-05 19:56:03 UTC (rev 1929)
@@ -41,7 +41,6 @@
svc.setDiskDirectory(UnitTestUtil.getTestScratchPath()+"/teiid");
// These are defaults if none of the properties are set.
- assertTrue(64 == svc.getBufferMemorySizeInMB()); //$NON-NLS-1$
assertTrue(svc.getBufferDirectory().isDirectory() && svc.getBufferDirectory().exists());
assertTrue(svc.isUseDisk());
}
@@ -49,12 +48,10 @@
public void testCheckMemPropertyGotSet() throws Exception {
BufferServiceImpl svc = new BufferServiceImpl();
svc.setDiskDirectory(UnitTestUtil.getTestScratchPath()+"/teiid/1");
- svc.setBufferMemorySizeInMB(96);
svc.setUseDisk(true);
svc.start();
// all the properties are set
- assertEquals(96 , svc.getBufferMemorySizeInMB()); //$NON-NLS-1$
assertTrue("Not Directory", svc.getBufferDirectory().isDirectory()); //$NON-NLS-1$
assertTrue("does not exist", svc.getBufferDirectory().exists()); //$NON-NLS-1$
assertTrue("does not end with one", svc.getBufferDirectory().getParent().endsWith("1")); //$NON-NLS-1$ //$NON-NLS-2$
@@ -67,7 +64,6 @@
public void testCheckMemPropertyGotSet2() throws Exception {
BufferServiceImpl svc = new BufferServiceImpl();
svc.setDiskDirectory(UnitTestUtil.getTestScratchPath()+"/teiid/1");
- svc.setBufferMemorySizeInMB(96);
svc.setUseDisk(false);
svc.start();
14 years, 10 months
teiid SVN: r1928 - in trunk: client/src/main/java/com/metamatrix/common/xa and 10 other directories.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-03-05 14:50:20 -0500 (Fri, 05 Mar 2010)
New Revision: 1928
Added:
trunk/engine/src/test/java/com/metamatrix/cdk/
trunk/engine/src/test/java/com/metamatrix/cdk/CommandBuilder.java
trunk/metadata/src/test/java/com/metamatrix/cdk/
trunk/metadata/src/test/java/com/metamatrix/cdk/api/
trunk/metadata/src/test/java/com/metamatrix/cdk/unittest/
Removed:
trunk/connector-api/src/main/java/org/teiid/connector/xa/
trunk/connector-sdk/
trunk/metadata/src/test/java/com/metamatrix/metadata/runtime/
Modified:
trunk/client/src/main/java/com/metamatrix/common/xa/MMXid.java
trunk/connectors/pom.xml
trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/MemoryStorageManager.java
trunk/engine/src/main/java/org/teiid/metadata/TransformationMetadata.java
trunk/pom.xml
trunk/test-integration/pom.xml
Log:
TEIID-833 removing connector-sdk
Modified: trunk/client/src/main/java/com/metamatrix/common/xa/MMXid.java
===================================================================
--- trunk/client/src/main/java/com/metamatrix/common/xa/MMXid.java 2010-03-05 19:11:41 UTC (rev 1927)
+++ trunk/client/src/main/java/com/metamatrix/common/xa/MMXid.java 2010-03-05 19:50:20 UTC (rev 1928)
@@ -22,7 +22,10 @@
package com.metamatrix.common.xa;
-import java.io.Serializable;
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
import java.math.BigInteger;
import javax.transaction.xa.Xid;
@@ -30,7 +33,7 @@
/**
* Teiid implementation of Xid.
*/
-public class MMXid implements Xid, Serializable {
+public class MMXid implements Xid, Externalizable {
private static final long serialVersionUID = -7078441828703404308L;
private int formatID;
@@ -139,4 +142,19 @@
return toString().hashCode();
}
+ @Override
+ public void readExternal(ObjectInput in) throws IOException,
+ ClassNotFoundException {
+ this.formatID = in.readInt();
+ this.globalTransactionId = (byte[])in.readObject();
+ this.branchQualifier = (byte[])in.readObject();
+ }
+
+ @Override
+ public void writeExternal(ObjectOutput out) throws IOException {
+ out.writeInt(this.formatID);
+ out.writeObject(this.globalTransactionId);
+ out.writeObject(this.branchQualifier);
+ }
+
}
Modified: trunk/connectors/pom.xml
===================================================================
--- trunk/connectors/pom.xml 2010-03-05 19:11:41 UTC (rev 1927)
+++ trunk/connectors/pom.xml 2010-03-05 19:50:20 UTC (rev 1928)
@@ -23,30 +23,24 @@
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-connector-sdk</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-connector-sdk</artifactId>
+ <artifactId>teiid-engine</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-engine</artifactId>
- <type>test-jar</type>
+ <artifactId>teiid-common-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-common-core</artifactId>
+ <type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-common-core</artifactId>
- <type>test-jar</type>
+ <artifactId>teiid-client</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Modified: trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/MemoryStorageManager.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/MemoryStorageManager.java 2010-03-05 19:11:41 UTC (rev 1927)
+++ trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/MemoryStorageManager.java 2010-03-05 19:50:20 UTC (rev 1928)
@@ -36,7 +36,7 @@
@Override
public FileStore createFileStore(String name) {
return new FileStore() {
- private ByteBuffer buffer = ByteBuffer.allocate(2 << 15);
+ private ByteBuffer buffer = ByteBuffer.allocate(1 << 16);
@Override
public void writeDirect(byte[] bytes, int offset, int length) throws MetaMatrixComponentException {
Modified: trunk/engine/src/main/java/org/teiid/metadata/TransformationMetadata.java
===================================================================
--- trunk/engine/src/main/java/org/teiid/metadata/TransformationMetadata.java 2010-03-05 19:11:41 UTC (rev 1927)
+++ trunk/engine/src/main/java/org/teiid/metadata/TransformationMetadata.java 2010-03-05 19:50:20 UTC (rev 1928)
@@ -54,10 +54,8 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.api.exception.query.QueryMetadataException;
-import com.metamatrix.common.log.LogManager;
import com.metamatrix.common.properties.UnmodifiableProperties;
import com.metamatrix.common.types.DataTypeManager;
-import com.metamatrix.common.util.LogConstants;
import com.metamatrix.core.util.ArgCheck;
import com.metamatrix.core.util.LRUCache;
import com.metamatrix.core.util.ObjectConverterUtil;
@@ -973,35 +971,33 @@
* @since 4.3
*/
public byte[] getBinaryVDBResource(String resourcePath) throws MetaMatrixComponentException, QueryMetadataException {
- String content = this.getCharacterVDBResource(resourcePath);
- if(content != null) {
- return content.getBytes();
- }
- return null;
- }
-
- /**
- * @see com.metamatrix.query.metadata.BasicQueryMetadata#getCharacterVDBResource(java.lang.String)
- * @since 4.3
- */
- public String getCharacterVDBResource(String resourcePath) throws MetaMatrixComponentException, QueryMetadataException {
for (VirtualFile f:this.vdbEntries.keySet()) {
if (f.getPathName().equals(resourcePath)) {
Boolean v = this.vdbEntries.get(f);
if (v.booleanValue()) {
try {
- return ObjectConverterUtil.convertToString(f.openStream());
+ return ObjectConverterUtil.convertToByteArray(f.openStream());
} catch (IOException e) {
- LogManager.logError(LogConstants.CTX_CONFIG, e, e.getMessage());
+ throw new MetaMatrixComponentException(e);
}
}
- else {
- break;
- }
+ break;
}
}
return null;
}
+
+ /**
+ * @see com.metamatrix.query.metadata.BasicQueryMetadata#getCharacterVDBResource(java.lang.String)
+ * @since 4.3
+ */
+ public String getCharacterVDBResource(String resourcePath) throws MetaMatrixComponentException, QueryMetadataException {
+ try {
+ return ObjectConverterUtil.convertToString(new ByteArrayInputStream(getBinaryVDBResource(resourcePath)));
+ } catch (IOException e) {
+ throw new MetaMatrixComponentException(e);
+ }
+ }
public CompositeMetadataStore getMetadataStore() {
return this.store;
Copied: trunk/engine/src/test/java/com/metamatrix/cdk/CommandBuilder.java (from rev 1923, trunk/connector-sdk/src/main/java/com/metamatrix/cdk/CommandBuilder.java)
===================================================================
--- trunk/engine/src/test/java/com/metamatrix/cdk/CommandBuilder.java (rev 0)
+++ trunk/engine/src/test/java/com/metamatrix/cdk/CommandBuilder.java 2010-03-05 19:50:20 UTC (rev 1928)
@@ -0,0 +1,113 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.cdk;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.teiid.connector.language.LanguageFactory;
+import org.teiid.dqp.internal.datamgr.language.LanguageBridgeFactory;
+
+import com.metamatrix.api.exception.MetaMatrixComponentException;
+import com.metamatrix.api.exception.query.QueryParserException;
+import com.metamatrix.api.exception.query.QueryResolverException;
+import com.metamatrix.api.exception.query.QueryValidatorException;
+import com.metamatrix.core.MetaMatrixRuntimeException;
+import com.metamatrix.query.metadata.QueryMetadataInterface;
+import com.metamatrix.query.optimizer.relational.AliasGenerator;
+import com.metamatrix.query.parser.QueryParser;
+import com.metamatrix.query.resolver.QueryResolver;
+import com.metamatrix.query.rewriter.QueryRewriter;
+import com.metamatrix.query.sql.lang.Command;
+import com.metamatrix.query.sql.lang.Query;
+import com.metamatrix.query.sql.lang.Select;
+import com.metamatrix.query.sql.symbol.AllSymbol;
+
+/**
+ * Convert a query string into a SQL language parse tree.
+ */
+public class CommandBuilder {
+
+ public static LanguageFactory getLanuageFactory() {
+ return LanguageFactory.INSTANCE;
+ }
+
+ private QueryMetadataInterface metadata;
+
+ /**
+ * @param metadata The metadata describing the datasource which the query is for.
+ */
+ public CommandBuilder(QueryMetadataInterface metadata) {
+ this.metadata = metadata;
+ }
+
+ public org.teiid.connector.language.Command getCommand(String queryString) {
+ return getCommand(queryString, false, false);
+ }
+
+ public org.teiid.connector.language.Command getCommand(String queryString, boolean generateAliases, boolean supportsGroupAlias) {
+ Command command = null;
+ try {
+ command = QueryParser.getQueryParser().parseCommand(queryString);
+ QueryResolver.resolveCommand(command, metadata);
+ command = QueryRewriter.rewrite(command, metadata, null);
+ expandAllSymbol(command);
+ if (generateAliases) {
+ command.acceptVisitor(new AliasGenerator(supportsGroupAlias));
+ }
+ return new LanguageBridgeFactory(metadata).translate(command);
+ } catch (QueryParserException e) {
+ throw new MetaMatrixRuntimeException(e);
+ } catch (QueryResolverException e) {
+ throw new MetaMatrixRuntimeException(e);
+ } catch (MetaMatrixComponentException e) {
+ throw new MetaMatrixRuntimeException(e);
+ } catch (QueryValidatorException e) {
+ throw new MetaMatrixRuntimeException(e);
+ }
+ }
+
+ /**
+ * Convert the "*" in "select * from..." to the list of column names for the data source.
+ */
+ protected void expandAllSymbol(Command command) {
+ if (command instanceof Query) {
+ Query query = (Query) command;
+ Select select = query.getSelect();
+ List originalSymbols = select.getSymbols();
+ List expandedSymbols = new ArrayList();
+ for (Iterator i = originalSymbols.iterator(); i.hasNext(); ) {
+ Object next = i.next();
+ if (next instanceof AllSymbol) {
+ AllSymbol allSymbol = (AllSymbol) next;
+ expandedSymbols.addAll(allSymbol.getElementSymbols());
+ } else {
+ expandedSymbols.add(next);
+ }
+ }
+ select.setSymbols(expandedSymbols);
+ }
+ }
+
+}
Copied: trunk/metadata/src/test/java/com/metamatrix/cdk/api (from rev 1923, trunk/connector-sdk/src/main/java/com/metamatrix/cdk/api)
Copied: trunk/metadata/src/test/java/com/metamatrix/cdk/unittest (from rev 1923, trunk/connector-sdk/src/test/java/com/metamatrix/cdk/unittest)
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-03-05 19:11:41 UTC (rev 1927)
+++ trunk/pom.xml 2010-03-05 19:50:20 UTC (rev 1928)
@@ -343,18 +343,6 @@
<artifactId>teiid-cache-jbosscache</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-connector-sdk</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-connector-sdk</artifactId>
- <type>test-jar</type>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
<artifactId>teiid-jboss-integration</artifactId>
@@ -523,7 +511,6 @@
<module>cache-jbosscache</module>
<module>hibernate-dialect</module>
<module>jboss-integration</module>
- <module>connector-sdk</module>
<module>jboss-embedded</module>
</modules>
Modified: trunk/test-integration/pom.xml
===================================================================
--- trunk/test-integration/pom.xml 2010-03-05 19:11:41 UTC (rev 1927)
+++ trunk/test-integration/pom.xml 2010-03-05 19:50:20 UTC (rev 1928)
@@ -48,15 +48,6 @@
</dependency>
<dependency>
<groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-connector-sdk</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
- <artifactId>teiid-connector-sdk</artifactId>
- <type>test-jar</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.teiid</groupId>
<artifactId>teiid-connector-api</artifactId>
</dependency>
<dependency>
14 years, 10 months
teiid SVN: r1927 - trunk/engine/src/main/java/com/metamatrix/common/buffer/impl.
by teiid-commits@lists.jboss.org
Author: shawkins
Date: 2010-03-05 14:11:41 -0500 (Fri, 05 Mar 2010)
New Revision: 1927
Added:
trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java
Removed:
trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java
Log:
TEIID-833 resolving merge conflict
Deleted: trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java 2010-03-05 19:03:19 UTC (rev 1926)
+++ trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java 2010-03-05 19:11:41 UTC (rev 1927)
@@ -1,250 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.common.buffer.impl;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Properties;
-import java.util.TreeMap;
-
-import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.common.buffer.FileStore;
-import com.metamatrix.common.buffer.StorageManager;
-import com.metamatrix.common.log.LogManager;
-import com.metamatrix.common.util.PropertiesUtils;
-import com.metamatrix.core.log.MessageLevel;
-import com.metamatrix.core.util.Assertion;
-import com.metamatrix.dqp.util.LogConstants;
-import com.metamatrix.query.execution.QueryExecPlugin;
-
-/**
- * Implements file storage that automatically splits large files and limits the number of open files.
- */
-public class FileStorageManager implements StorageManager {
-
- private static final int DEFAULT_MAX_OPEN_FILES = 256;
- private static final String FILE_PREFIX = "b_"; //$NON-NLS-1$
-
- private class FileInfo {
- private File file;
- private RandomAccessFile fileData; // may be null if not open
-
- public FileInfo(File file) {
- this.file = file;
- }
-
- public RandomAccessFile open() throws FileNotFoundException {
- if(this.fileData == null) {
- this.fileData = fileCache.remove(this.file);
- if (this.fileData == null) {
- this.fileData = new RandomAccessFile(file, "rw"); //$NON-NLS-1$
- }
- }
- return this.fileData;
- }
-
- public void close() {
- fileCache.put(this.file, this.fileData);
- this.fileData = null;
- }
-
- public void delete() {
- RandomAccessFile raf = fileCache.remove(this.file);
- if (raf != null) {
- try {
- raf.close();
- } catch (IOException e) {
- }
- }
- file.delete();
- }
-
- public String toString() {
- return "FileInfo<" + file.getName() + ", has fileData = " + (fileData != null) + ">"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- public class DiskStore extends FileStore {
- private String name;
- private TreeMap<Long, FileInfo> storageFiles = new TreeMap<Long, FileInfo>();
-
- public DiskStore(String name) {
- this.name = name;
- }
-
- public synchronized int readDirect(long fileOffset, byte[] b, int offSet, int length) throws MetaMatrixComponentException {
- Map.Entry<Long, FileInfo> entry = storageFiles.floorEntry(fileOffset);
- Assertion.isNotNull(entry);
- FileInfo fileInfo = entry.getValue();
- try {
- RandomAccessFile fileAccess = fileInfo.open();
- fileAccess.seek(fileOffset - entry.getKey());
- return fileAccess.read(b, offSet, length);
- } catch (IOException e) {
- throw new MetaMatrixComponentException(e, QueryExecPlugin.Util.getString("FileStoreageManager.error_reading", fileInfo.file.getAbsoluteFile())); //$NON-NLS-1$
- } finally {
- fileInfo.close();
- }
- }
-
- public void writeDirect(byte[] bytes, int offset, int length) throws MetaMatrixComponentException {
- Map.Entry<Long, FileInfo> entry = this.storageFiles.lastEntry();
- boolean createNew = false;
- FileInfo fileInfo = null;
- long fileOffset = 0;
- if (entry == null) {
- createNew = true;
- } else {
- fileInfo = entry.getValue();
- fileOffset = entry.getKey();
- createNew = entry.getValue().file.length() + length > getMaxFileSize();
- }
- if (createNew) {
- FileInfo newFileInfo = new FileInfo(createFile(name, storageFiles.size()));
- if (fileInfo != null) {
- fileOffset += fileInfo.file.length();
- }
- storageFiles.put(fileOffset, newFileInfo);
- fileInfo = newFileInfo;
- }
- try {
- RandomAccessFile fileAccess = fileInfo.open();
- long pointer = fileAccess.length();
- fileAccess.setLength(pointer + length);
- fileAccess.seek(pointer);
- fileAccess.write(bytes, offset, length);
- } catch(IOException e) {
- throw new MetaMatrixComponentException(e, QueryExecPlugin.Util.getString("FileStoreageManager.error_reading", fileInfo.file.getAbsoluteFile())); //$NON-NLS-1$
- } finally {
- fileInfo.close();
- }
- }
-
- public synchronized void removeDirect() {
- for (FileInfo info : storageFiles.values()) {
- info.delete();
- }
- }
-
- }
-
- // Initialization
- private int maxOpenFiles = DEFAULT_MAX_OPEN_FILES;
- private long maxFileSize = 2L * 1024L * 1024L * 1024L; // 2GB
- private String directory;
- private File dirFile;
-
- // State
- private Map<File, RandomAccessFile> fileCache = Collections.synchronizedMap(new LinkedHashMap<File, RandomAccessFile>() {
- @Override
- protected boolean removeEldestEntry(
- java.util.Map.Entry<File, RandomAccessFile> eldest) {
- if (this.size() > maxOpenFiles) {
- try {
- eldest.getValue().close();
- } catch (IOException e) {
- }
- return true;
- }
- return false;
- }
- });
-
- /**
- * Initialize with properties
- * @param props Initialization properties
- * @see com.metamatrix.common.buffer.BufferManager#BUFFER_STORAGE_DIRECTORY
- * @see com.metamatrix.common.buffer.BufferManager#MAX_OPEN_FILES
- * @see com.metamatrix.common.buffer.BufferManager#MAX_FILE_SIZE
- */
- public void initialize(Properties props) throws MetaMatrixComponentException {
- PropertiesUtils.setBeanProperties(this, props, "org.teiid.buffer"); //$NON-NLS-1$
- if(this.directory == null) {
- throw new MetaMatrixComponentException(QueryExecPlugin.Util.getString("FileStoreageManager.no_directory")); //$NON-NLS-1$
- }
-
- dirFile = new File(this.directory);
- if(dirFile.exists()) {
- if(! dirFile.isDirectory()) {
- throw new MetaMatrixComponentException(QueryExecPlugin.Util.getString("FileStoreageManager.not_a_directory", dirFile.getAbsoluteFile())); //$NON-NLS-1$
-
- }
- } else if(! dirFile.mkdirs()) {
- throw new MetaMatrixComponentException(QueryExecPlugin.Util.getString("FileStoreageManager.error_creating", dirFile.getAbsoluteFile())); //$NON-NLS-1$
- }
- }
-
- public void setMaxFileSize(long maxFileSize) {
- this.maxFileSize = maxFileSize * 1024L * 1024L;
- }
-
- void setMaxFileSizeDirect(long maxFileSize) {
- this.maxFileSize = maxFileSize;
- }
-
- public void setMaxOpenFiles(int maxOpenFiles) {
- this.maxOpenFiles = maxOpenFiles;
- }
-
- public void setStorageDirectory(String directory) {
- this.directory = directory;
- }
-
- File createFile(String name, int fileNumber) throws MetaMatrixComponentException {
- try {
- File storageFile = File.createTempFile(FILE_PREFIX + name + "_" + String.valueOf(fileNumber) + "_", null, this.dirFile); //$NON-NLS-1$ //$NON-NLS-2$
- if (LogManager.isMessageToBeRecorded(LogConstants.CTX_STORAGE_MGR, MessageLevel.DETAIL)) {
- LogManager.logDetail(LogConstants.CTX_STORAGE_MGR, "Created temporary storage area file " + storageFile.getAbsoluteFile()); //$NON-NLS-1$
- }
- return storageFile;
- } catch(IOException e) {
- throw new MetaMatrixComponentException(e, QueryExecPlugin.Util.getString("FileStoreageManager.error_creating", name + "_" + fileNumber)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- public FileStore createFileStore(String name) {
- return new DiskStore(name);
- }
-
- public long getMaxFileSize() {
- return maxFileSize;
- }
-
- public String getDirectory() {
- return directory;
- }
-
- Map<File, RandomAccessFile> getFileCache() {
- return fileCache;
- }
-
- public int getOpenFiles() {
- return this.fileCache.size();
- }
-
-}
Copied: trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java (from rev 1798, trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java)
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java (rev 0)
+++ trunk/engine/src/main/java/com/metamatrix/common/buffer/impl/FileStorageManager.java 2010-03-05 19:11:41 UTC (rev 1927)
@@ -0,0 +1,243 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.common.buffer.impl;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.TreeMap;
+
+import com.metamatrix.api.exception.MetaMatrixComponentException;
+import com.metamatrix.common.buffer.FileStore;
+import com.metamatrix.common.buffer.StorageManager;
+import com.metamatrix.common.log.LogManager;
+import com.metamatrix.core.log.MessageLevel;
+import com.metamatrix.core.util.Assertion;
+import com.metamatrix.dqp.util.LogConstants;
+import com.metamatrix.query.execution.QueryExecPlugin;
+
+/**
+ * Implements file storage that automatically splits large files and limits the number of open files.
+ */
+public class FileStorageManager implements StorageManager {
+
+ private static final int DEFAULT_MAX_OPEN_FILES = 128;
+ private static final String FILE_PREFIX = "b_"; //$NON-NLS-1$
+
+ private class FileInfo {
+ private File file;
+ private RandomAccessFile fileData; // may be null if not open
+
+ public FileInfo(File file) {
+ this.file = file;
+ }
+
+ public RandomAccessFile open() throws FileNotFoundException {
+ if(this.fileData == null) {
+ this.fileData = fileCache.remove(this.file);
+ if (this.fileData == null) {
+ this.fileData = new RandomAccessFile(file, "rw"); //$NON-NLS-1$
+ }
+ }
+ return this.fileData;
+ }
+
+ public void close() {
+ fileCache.put(this.file, this.fileData);
+ this.fileData = null;
+ }
+
+ public void delete() {
+ RandomAccessFile raf = fileCache.remove(this.file);
+ if (raf != null) {
+ try {
+ raf.close();
+ } catch (IOException e) {
+ }
+ }
+ file.delete();
+ }
+
+ public String toString() {
+ return "FileInfo<" + file.getName() + ", has fileData = " + (fileData != null) + ">"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+ }
+
+ public class DiskStore extends FileStore {
+ private String name;
+ private TreeMap<Long, FileInfo> storageFiles = new TreeMap<Long, FileInfo>();
+
+ public DiskStore(String name) {
+ this.name = name;
+ }
+
+ public synchronized int readDirect(long fileOffset, byte[] b, int offSet, int length) throws MetaMatrixComponentException {
+ Map.Entry<Long, FileInfo> entry = storageFiles.floorEntry(fileOffset);
+ Assertion.isNotNull(entry);
+ FileInfo fileInfo = entry.getValue();
+ try {
+ RandomAccessFile fileAccess = fileInfo.open();
+ fileAccess.seek(fileOffset - entry.getKey());
+ return fileAccess.read(b, offSet, length);
+ } catch (IOException e) {
+ throw new MetaMatrixComponentException(e, QueryExecPlugin.Util.getString("FileStoreageManager.error_reading", fileInfo.file.getAbsoluteFile())); //$NON-NLS-1$
+ } finally {
+ fileInfo.close();
+ }
+ }
+
+ public void writeDirect(byte[] bytes, int offset, int length) throws MetaMatrixComponentException {
+ Map.Entry<Long, FileInfo> entry = this.storageFiles.lastEntry();
+ boolean createNew = false;
+ FileInfo fileInfo = null;
+ long fileOffset = 0;
+ if (entry == null) {
+ createNew = true;
+ } else {
+ fileInfo = entry.getValue();
+ fileOffset = entry.getKey();
+ createNew = entry.getValue().file.length() + length > getMaxFileSize();
+ }
+ if (createNew) {
+ FileInfo newFileInfo = new FileInfo(createFile(name, storageFiles.size()));
+ if (fileInfo != null) {
+ fileOffset += fileInfo.file.length();
+ }
+ storageFiles.put(fileOffset, newFileInfo);
+ fileInfo = newFileInfo;
+ }
+ try {
+ RandomAccessFile fileAccess = fileInfo.open();
+ long pointer = fileAccess.length();
+ fileAccess.setLength(pointer + length);
+ fileAccess.seek(pointer);
+ fileAccess.write(bytes, offset, length);
+ } catch(IOException e) {
+ throw new MetaMatrixComponentException(e, QueryExecPlugin.Util.getString("FileStoreageManager.error_reading", fileInfo.file.getAbsoluteFile())); //$NON-NLS-1$
+ } finally {
+ fileInfo.close();
+ }
+ }
+
+ public synchronized void removeDirect() {
+ for (FileInfo info : storageFiles.values()) {
+ info.delete();
+ }
+ }
+
+ }
+
+ // Initialization
+ private int maxOpenFiles = DEFAULT_MAX_OPEN_FILES;
+ private long maxFileSize = 2L * 1024L * 1024L * 1024L; // 2GB
+ private String directory;
+ private File dirFile;
+
+ // State
+ private Map<File, RandomAccessFile> fileCache = Collections.synchronizedMap(new LinkedHashMap<File, RandomAccessFile>() {
+ @Override
+ protected boolean removeEldestEntry(
+ java.util.Map.Entry<File, RandomAccessFile> eldest) {
+ if (this.size() > maxOpenFiles) {
+ try {
+ eldest.getValue().close();
+ } catch (IOException e) {
+ }
+ return true;
+ }
+ return false;
+ }
+ });
+
+ /**
+ * Initialize
+ */
+ public void initialize() throws MetaMatrixComponentException {
+ if(this.directory == null) {
+ throw new MetaMatrixComponentException(QueryExecPlugin.Util.getString("FileStoreageManager.no_directory")); //$NON-NLS-1$
+ }
+
+ dirFile = new File(this.directory);
+ if(dirFile.exists()) {
+ if(! dirFile.isDirectory()) {
+ throw new MetaMatrixComponentException(QueryExecPlugin.Util.getString("FileStoreageManager.not_a_directory", dirFile.getAbsoluteFile())); //$NON-NLS-1$
+
+ }
+ } else if(! dirFile.mkdirs()) {
+ throw new MetaMatrixComponentException(QueryExecPlugin.Util.getString("FileStoreageManager.error_creating", dirFile.getAbsoluteFile())); //$NON-NLS-1$
+ }
+ }
+
+ public void setMaxFileSize(long maxFileSize) {
+ this.maxFileSize = maxFileSize * 1024L * 1024L;
+ }
+
+ void setMaxFileSizeDirect(long maxFileSize) {
+ this.maxFileSize = maxFileSize;
+ }
+
+ public void setMaxOpenFiles(int maxOpenFiles) {
+ this.maxOpenFiles = maxOpenFiles;
+ }
+
+ public void setStorageDirectory(String directory) {
+ this.directory = directory;
+ }
+
+ File createFile(String name, int fileNumber) throws MetaMatrixComponentException {
+ try {
+ File storageFile = File.createTempFile(FILE_PREFIX + name + "_" + String.valueOf(fileNumber) + "_", null, this.dirFile); //$NON-NLS-1$ //$NON-NLS-2$
+ if (LogManager.isMessageToBeRecorded(LogConstants.CTX_STORAGE_MGR, MessageLevel.DETAIL)) {
+ LogManager.logDetail(LogConstants.CTX_STORAGE_MGR, "Created temporary storage area file " + storageFile.getAbsoluteFile()); //$NON-NLS-1$
+ }
+ return storageFile;
+ } catch(IOException e) {
+ throw new MetaMatrixComponentException(e, QueryExecPlugin.Util.getString("FileStoreageManager.error_creating", name + "_" + fileNumber)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ public FileStore createFileStore(String name) {
+ return new DiskStore(name);
+ }
+
+ public long getMaxFileSize() {
+ return maxFileSize;
+ }
+
+ public String getDirectory() {
+ return directory;
+ }
+
+ Map<File, RandomAccessFile> getFileCache() {
+ return fileCache;
+ }
+
+ public int getOpenFiles() {
+ return this.fileCache.size();
+ }
+
+}
14 years, 10 months